1/*-
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Ken Arnold.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 193 unchanged lines hidden (view full) ---
202 }
203 } while (sp != NULL);
204
205 /*
206 * write the tables in
207 */
208
209 (void) fclose(inf);
210
211 if (Oflag)
212 do_order();
213 else if (Rflag)
214 randomize();
215
216 if (Xflag)
217 Tbl.str_flags |= STR_ROTATED;
--- 7 unchanged lines hidden (view full) ---
225 printf("Longest string: %lu byte%s\n", Tbl.str_longlen,
226 Tbl.str_longlen == 1 ? "" : "s");
227 printf("Shortest string: %lu byte%s\n", Tbl.str_shortlen,
228 Tbl.str_shortlen == 1 ? "" : "s");
229 }
230
231 rewind(outf);
232 Tbl.str_version = htonl(Tbl.str_version);
233 Tbl.str_numstr = htonl(Num_pts - 1);
234 Tbl.str_longlen = htonl(Tbl.str_longlen);
235 Tbl.str_shortlen = htonl(Tbl.str_shortlen);
236 Tbl.str_flags = htonl(Tbl.str_flags);
237 (void) fwrite((char *) &Tbl, sizeof Tbl, 1, outf);
238 if (STORING_PTRS) {
239 for (p = Seekpts, cnt = Num_pts; cnt--; ++p)
240 *p = htonl(*p);
241 (void) fwrite((char *) Seekpts, sizeof *Seekpts, (int) Num_pts, outf);
--- 206 unchanged lines hidden ---
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Ken Arnold.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 193 unchanged lines hidden (view full) ---
202 }
203 } while (sp != NULL);
204
205 /*
206 * write the tables in
207 */
208
209 (void) fclose(inf);
210
211 if (Oflag)
212 do_order();
213 else if (Rflag)
214 randomize();
215
216 if (Xflag)
217 Tbl.str_flags |= STR_ROTATED;
--- 7 unchanged lines hidden (view full) ---
225 printf("Longest string: %lu byte%s\n", Tbl.str_longlen,
226 Tbl.str_longlen == 1 ? "" : "s");
227 printf("Shortest string: %lu byte%s\n", Tbl.str_shortlen,
228 Tbl.str_shortlen == 1 ? "" : "s");
229 }
230
231 rewind(outf);
232 Tbl.str_version = htonl(Tbl.str_version);
233 Tbl.str_numstr = htonl(Num_pts - 1);
234 Tbl.str_longlen = htonl(Tbl.str_longlen);
235 Tbl.str_shortlen = htonl(Tbl.str_shortlen);
236 Tbl.str_flags = htonl(Tbl.str_flags);
237 (void) fwrite((char *) &Tbl, sizeof Tbl, 1, outf);
238 if (STORING_PTRS) {
239 for (p = Seekpts, cnt = Num_pts; cnt--; ++p)
240 *p = htonl(*p);
241 (void) fwrite((char *) Seekpts, sizeof *Seekpts, (int) Num_pts, outf);
--- 206 unchanged lines hidden ---