]> andersk Git - moira.git/commitdiff
add "Sr." as a suffix on names; don't change class on STAFF people
authormar <mar>
Tue, 30 Jan 1990 18:09:36 +0000 (18:09 +0000)
committermar <mar>
Tue, 30 Jan 1990 18:09:36 +0000 (18:09 +0000)
regtape/employee.dc

index 885ae9d67a4ac665ac774cef0f24f61024d4dea9..cfd198392e7e9c5b815e9860e6e0228d7d3ce1b0 100644 (file)
@@ -41,7 +41,7 @@
 
 #define LEN_ID 9
 #define LEN_NAME 30
-#define LEN_OFFICE 23
+#define LEN_OFFICE 12
 #define LEN_PHONE 12
 #define LEN_PHONE2 12
 #define LEN_DEPT 19
@@ -138,10 +138,11 @@ FILE *in;
 {
     static struct entry e;
     static char buf[BUFSIZ], mid[16], eid[16], email[256], phone[13];
-    int ends_jr, ends_iii, ends_iv;
+    int ends_sr, ends_jr, ends_iii, ends_iv;
     char *p;
 
-    fgets(buf, sizeof(buf), in);
+    if (fgets(buf, sizeof(buf), in) == NULL)
+      return((struct entry *)NULL);
     buf[LEN_NAME] = 0;
     p = index(&buf[LOC_NAME], ',');
     if (p)
@@ -157,11 +158,11 @@ FILE *in;
     } else
       e.first = "";
     e.first = strtrim(e.first);
-    ends_jr = ends_iii = ends_iv = 0;
+    ends_sr = ends_jr = ends_iii = ends_iv = 0;
     LookForSt(e.last);
     LookForO(e.last);
-    LookForJrAndIII(e.last, &ends_jr, &ends_iii, &ends_iv);
-    LookForJrAndIII(e.first, &ends_jr, &ends_iii, &ends_iv);
+    LookForJrAndIII(e.last, &ends_sr, &ends_jr, &ends_iii, &ends_iv);
+    LookForJrAndIII(e.first, &ends_sr, &ends_jr, &ends_iii, &ends_iv);
     FixCase(e.last);
     FixCase(e.first);
     FixCase(e.middle);
@@ -222,13 +223,13 @@ struct entry *e;
        newuser(e);
        return;
     }
-    if (strcmp(e->class, strtrim(class))) {
+    if (strcmp(e->class, strtrim(class)) && strcmp(class, "STAFF")) {
        com_err(whoami, 0, "updating class for %s %s from %s to %s",
                first, last, class, e->class);
        strcpy(class, e->class);
 ##     repeat replace u (mit_year = @class,
 ##                modtime = "now", modby = WHO, modwith = PROG)
-##         where u.users_id = id
+##         where u.users_id = @id
     }
     changed = nochange = 0;
     strcpy(buf, e->address);
This page took 0.0469270000000001 seconds and 5 git commands to generate.