Mercurial > dropbear
view examples/ch1-02.c @ 16:09ab3354aa21 libtomcrypt
propagate of e8bea23df30f9f46c647d06db3b223427b4e3604 and b0b6b4a8843b94d9f049cb5ffe0b1ae91ec1bf8b from branch 'au.asn.ucc.matt.ltc-orig' to 'au.asn.ucc.matt.ltc-db'
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 15 Jun 2004 14:27:14 +0000 |
parents | d7da3b1e1540 |
children |
line wrap: on
line source
/* * Name : ch1-02.c * Purpose : Demonstration of error handling * Author : Tom St Denis * * History : v0.79 Initial release */ /* ch1-01-1 */ #include <mycrypt.h> int main(void) { int errno; if ((errno = some_func(...)) != CRYPT_OK) { printf("Error: %s\n", error_to_string(errno)); return EXIT_FAILURE; } return 0; } /*ch1-01-1 */