view examples/ch1-02.c @ 50:c61e66431001 libtomcrypt

Merge of the normal Dropbear makefile: - Don't include mpi.o, since it does Bad Things (tm) (wrt LTM) - Don't try to make clean in tests if it doesn't exist (infinite looping makefiles, mmmmm)
author Matt Johnston <matt@ucc.asn.au>
date Sat, 07 Aug 2004 16:33:31 +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 */