]> andersk Git - moira.git/blobdiff - regtape/student.pc
Years apparently now flip in June, not July.
[moira.git] / regtape / student.pc
index 39469954cb77f6750080b6fb2829dbdfb7652787..e70eba01bc73e8aa614e6bcbe0d499160de7669f 100644 (file)
@@ -101,12 +101,21 @@ int main(int argc, char **argv)
     {
       if (!strcmp(argv[i], "-w"))
        wait++;
-      else if (file)
-       fprintf(stderr, "Usage: %s [-w] [-D] [-n] inputfile\n", whoami);
+      if (file)
+       {
+         fprintf(stderr, "Usage: %s [-w] inputfile\n", whoami);
+         exit(1);
+       }
       else
        file = argv[i];
     }
 
+  if (!file)
+    {
+      fprintf(stderr, "Usage: %s [-w] inputfile\n", whoami);
+      exit(1);
+    }
+
   in = fopen(file, "r");
   if (!in)
     {
@@ -171,7 +180,7 @@ struct entry *get_next_entry(FILE *in)
       gettimeofday(&tv, NULL);
       tm = localtime(&tv.tv_sec);
       nyear = tm->tm_year;
-      if (tm->tm_mon > 5)
+      if (tm->tm_mon >= 5)
        nyear++;
     }
 
@@ -222,7 +231,7 @@ struct entry *get_next_entry(FILE *in)
   e.id = id;
 
   e.xtitle = title;
-  if (year[0] == 'G')
+  if (year[0] == 'G' || year[0] == 'N')
     {
       e.type = "G";
       sprintf(title, "Grad Student");
This page took 0.03242 seconds and 4 git commands to generate.