[digraphanalysis-cvs] digraphanalysis/src main.c,JBREKER
Status: Planning
Brought to you by:
jbreker
|
From: Jeff B. <jb...@us...> - 2005-04-04 16:14:36
|
Update of /cvsroot/digraphanalysis/digraphanalysis/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19521 Modified Files: Tag: JBREKER main.c Log Message: more cleanup for LIST_* macros Index: main.c =================================================================== RCS file: /cvsroot/digraphanalysis/digraphanalysis/src/main.c,v retrieving revision 1.2.2.6 retrieving revision 1.2.2.7 diff -C2 -d -r1.2.2.6 -r1.2.2.7 *** main.c 4 Apr 2005 03:27:36 -0000 1.2.2.6 --- main.c 4 Apr 2005 16:14:16 -0000 1.2.2.7 *************** *** 239,245 **** { char c; - char *keyring = NULL; char *outputdir = NULL; ! list_t *keys; while ((c = getopt(argc, argv, "o:")) != -1) --- 239,244 ---- { char c; char *outputdir = NULL; ! struct list_t *keys; while ((c = getopt(argc, argv, "o:")) != -1) *************** *** 266,275 **** } ! void output_file(pgpkey_t *key, list_t *nnlist, list_t *nslist, list_t *snlist, list_t *sslist) { char *file_dir; FILE *filep; ! list_t *tmp_list; struct stat *sb; file_dir = (char *) malloc(3); --- 265,275 ---- } ! void output_file(pgpkey_t *key, struct list_t *nnlist, struct list_t *nslist, struct list_t *snlist, struct list_t *sslist) { char *file_dir; FILE *filep; ! struct list_t *tmp_list; struct stat *sb; + unsigned int tmp_size; file_dir = (char *) malloc(3); *************** *** 293,305 **** fprintf(filep, "Signatures to this key:\n"); ! tmp_list = list_union(nslist, sslist); print_list(filep, tmp_list); ! fprintf(filep, " Total: %u signature%s to this key from this set.\n\n", tmp_list->size, ((tmp_list->size == 1)?"":"s")); list_free(tmp_list); fprintf(filep, "Signatures from this key:\n"); ! tmp_list = list_union(snlist, sslist); print_list(filep, tmp_list); ! fprintf(filep, " Total: %u signature%s from this key to this set.\n\n", tmp_list->size, ((tmp_list->size == 1)?"":"s")); list_free(tmp_list); --- 293,307 ---- fprintf(filep, "Signatures to this key:\n"); ! tmp_list = list_union(nslist, sslist, &pgpkey_compare); print_list(filep, tmp_list); ! tmp_size = list_size(tmp_list); ! fprintf(filep, " Total: %u signature%s to this key from this set.\n\n", tmp_size, ((tmp_size == 1)?"":"s")); list_free(tmp_list); fprintf(filep, "Signatures from this key:\n"); ! tmp_list = list_union(snlist, sslist, &pgpkey_compare); print_list(filep, tmp_list); ! tmp_size = list_size(tmp_list); ! fprintf(filep, " Total: %u signature%s from this key to this set.\n\n", tmp_size, ((tmp_size == 1)?"":"s")); list_free(tmp_list); *************** *** 308,324 **** fprintf(filep, "This key has not signed, nor been signed by:\n"); print_list(filep, nnlist); ! fprintf(filep, " Total: %u key%s in this set.\n\n", nnlist->size, ((nnlist->size == 1)?"":"s")); fprintf(filep, "This key has not signed, but has been signed by:\n"); print_list(filep, nslist); ! fprintf(filep, " Total: %u key%s in this set.\n\n", nslist->size, ((nslist->size == 1)?"":"s")); fprintf(filep, "This key has signed, but has not been signed by:\n"); print_list(filep, snlist); ! fprintf(filep, " Total: %u key%s in this set.\n\n", snlist->size, ((snlist->size == 1)?"":"s")); fprintf(filep, "This key has signed and has been signed by:\n"); print_list(filep, sslist); ! fprintf(filep, " Total: %u key%s in this set.\n\n", sslist->size, ((sslist->size == 1)?"":"s")); fclose(filep); --- 310,330 ---- fprintf(filep, "This key has not signed, nor been signed by:\n"); print_list(filep, nnlist); ! tmp_size = list_size(nnlist); ! fprintf(filep, " Total: %u key%s in this set.\n\n", tmp_size, ((tmp_size == 1)?"":"s")); fprintf(filep, "This key has not signed, but has been signed by:\n"); print_list(filep, nslist); ! tmp_size = list_size(nslist); ! fprintf(filep, " Total: %u key%s in this set.\n\n", tmp_size, ((tmp_size == 1)?"":"s")); fprintf(filep, "This key has signed, but has not been signed by:\n"); print_list(filep, snlist); ! tmp_size = list_size(snlist); ! fprintf(filep, " Total: %u key%s in this set.\n\n", tmp_size, ((tmp_size == 1)?"":"s")); fprintf(filep, "This key has signed and has been signed by:\n"); print_list(filep, sslist); ! tmp_size = list_size(sslist); ! fprintf(filep, " Total: %u key%s in this set.\n\n", tmp_size, ((tmp_size == 1)?"":"s")); fclose(filep); |