11 /* login = text(8), */
17 /* shell = text(32), */
19 /* home = text(32), */
21 /* last = text(16), */
23 /* first = text(16), */
25 /* middle = text(16), */
31 /* mit_year = text(8), */
32 ## char t_mit_year[9];
34 ## char t_expdate[26];
36 ## char t_modtime[26];
41 /* fullname = text(32), */
42 ## char t_fullname[33];
43 /* nickname = text(16), */
44 ## char t_nickname[17];
45 /* home_addr = text(80), */
46 ## char t_home_addr[81];
47 /* home_phone = text(16), */
48 ## char t_home_phone[17];
49 /* office_addr = text(16), */
50 ## char t_office_addr[17];
51 /* office_phone = text(12), */
52 ## char t_office_phone[13];
53 /* mit_dept = text(12), */
54 ## char t_mit_dept[13];
55 /* mit_affil = text(4), */
56 ## char t_mit_affil[5];
58 ## char t_fmodtime[26];
68 ## char t_pcreated[26];
70 u = open_file("users");
71 f = open_file("finger");
72 p = open_file("pobox");
74 ## range of u is users
75 ## range of m is machine
78 parse_str(u, t_login, 9);
81 t_users_id = parse_int(u);
85 parse_str(u, t_shell, 33);
87 parse_str(u, t_home, 33);
89 parse_str(u, t_last, 17);
91 parse_str(u, t_first, 17);
93 parse_str(u, t_middle, 17);
95 t_status = parse_int(u);
97 parse_str(u, t_mit_id, 14);
99 parse_str(u, t_mit_year, 9);
101 parse_str(u, t_expdate, 26);
103 parse_str(u, t_modtime, 26);
105 t_acl_id = parse_int(u);
108 while (t_fusers_id < t_users_id) {
109 t_fusers_id = parse_int(f);
111 parse_str(f, t_fullname, 33);
113 parse_str(f, t_nickname, 17);
115 parse_str(f, t_home_addr, 81);
117 parse_str(f, t_home_phone, 17);
119 parse_str(f, t_office_addr, 17);
121 parse_str(f, t_office_phone, 13);
123 parse_str(f, t_mit_dept, 13);
125 parse_str(f, t_mit_affil, 5);
127 parse_str(f, t_fmodtime, 26);
129 if (t_fusers_id < t_users_id)
130 printf("orphaned finger info for user \"%s\" (%d)\n",
131 t_fullname, t_fusers_id);
134 while (t_pusers_id < t_users_id) {
135 t_pusers_id = parse_int(p);
137 parse_str(p, t_type, 9);
139 t_mach_id = parse_int(p);
141 parse_str(p, t_box, 33);
143 parse_str(p, t_pcreated, 26);
145 if (t_pusers_id < t_users_id)
146 printf("orphaned pobox for user \"%s\" (%d)\n",
150 # repeat retrieve (flag = any(u.login where u.login = @t_login
151 # or u.users_id = @t_users_id))
153 printf("Conflict! User %s, users_id %d conflicts with another user in the database\n", t_login, t_users_id);
157 printf("adding \"%s\"\n", t_login);
158 if (t_users_id == t_fusers_id && t_users_id == t_pusers_id) {
161 ## users_id = t_users_id,
166 ## middle = t_middle,
167 ## status = t_status,
168 ## mit_id = t_mit_id,
169 ## mit_year = t_mit_year,
170 ## modtime = t_modtime,
171 ## modwith = "convert",
173 ## fullname = t_fullname,
174 ## nickname = t_nickname,
175 ## home_addr = t_home_addr,
176 ## home_phone = t_home_phone,
177 ## office_addr = t_office_addr,
178 ## office_phone = t_office_phone,
179 ## mit_dept = t_mit_dept,
180 ## mit_affil = t_mit_affil,
181 ## fmodtime = t_modtime,
182 ## fmodwith = "convert",
185 ## pop_id = t_mach_id,
186 ## box_id = t_mach_id,
187 ## pmodtime = t_created,
188 ## pmodwith = "convert",
191 } else if (t_users_id == t_fusers_id) {
194 ## users_id = t_users_id,
199 ## middle = t_middle,
200 ## status = t_status,
201 ## mit_id = t_mit_id,
202 ## mit_year = t_mit_year,
203 ## modtime = t_modtime,
204 ## modwith = "convert",
206 ## fullname = t_fullname,
207 ## nickname = t_nickname,
208 ## home_addr = t_home_addr,
209 ## home_phone = t_home_phone,
210 ## office_addr = t_office_addr,
211 ## office_phone = t_office_phone,
212 ## mit_dept = t_mit_dept,
213 ## mit_affil = t_mit_affil,
214 ## fmodtime = t_modtime,
215 ## fmodwith = "convert",
221 ## pmodwith = "convert",
227 ## users_id = t_users_id,
232 ## middle = t_middle,
233 ## status = t_status,
234 ## mit_id = t_mit_id,
235 ## mit_year = t_mit_year,
236 ## modtime = t_modtime,
237 ## modwith = "convert",
239 ## mit_affil = t_mit_year,
241 ## fmodwith = "convert",
247 ## pmodwith = "convert",