Changeset 4276 for trunk/athena/bin/lpr/quota/bill_db.c
- Timestamp:
- 01/23/91 08:28:04 (19 years ago)
- Files:
-
- 1 modified
-
trunk/athena/bin/lpr/quota/bill_db.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/athena/bin/lpr/quota/bill_db.c
r3577 r4276 14 14 #include "quota.h" 15 15 16 /* These have to be defined here because quota_dba.o declares them */ 17 /* extern. Normally, the are declared in qmain.c. */ 18 #ifdef DEBUG 19 char *progname = "bill_db"; 20 int quota_debug=1; 21 #endif 22 16 23 /* Define all codes that that the bursar files will use. */ 17 24 #define STUFF "SU1" 18 #define ATHCODE " 385"25 #define ATHCODE "721" 19 26 #define TITLE "Printing: " 20 #define TITLE1 " Printing Charges"27 #define TITLE1 "Athena Printing Charges" 21 28 #define ACC "24745" 22 29 #define OBJ "480" … … 28 35 29 36 int clean1=0, clean2=0, clean3=0; 37 extern int errno; 30 38 31 39 FILE *fp, *fp2, *fp3; … … 77 85 if (kresult != KSUCCESS) 78 86 fprintf(stderr, "bill_db: error in obtaining realm\n"); 79 else if (!(name_list = read_name_list(argv[1])) )87 else if (!(name_list = read_name_list(argv[1])) && errno) 80 88 fprintf(stderr, "error in reading name list file %s\n", argv[1]); 81 89 else if (quota_db_set_name(argv[2])) … … 129 137 current = new = name_list = (struct person *)NULL; 130 138 139 errno = ENOENT; 131 140 if(!(fp = fopen(argv, "r"))) return NULL; 141 errno = 0; 132 142 while (fscanf(fp, "%[^:]:%d:%c:%[^\n]\n", user_name, &number, 133 143 &flag, real_name) != EOF) { … … 154 164 (void)fclose(fp); 155 165 if (trip == 0) 156 return( NULL);166 return((struct person *)NULL); 157 167 return(name_list); 158 168 }
