source: trunk/athena/bin/delete/colpatch @ 1830

Revision 1830, 1.6 KB checked in by jik, 35 years ago (diff)
Initial revision
Line 
1*** col.c.orig  Tue Apr  4 13:59:20 1989
2--- col.c       Tue Apr  4 13:59:43 1989
3***************
4*** 64,81 ****
5          height++;
6       
7       if (number_flag) for (updown = 0; updown < height; updown++) {
8!         for (leftright = updown; leftright < num_to_print;
9!              leftright += height) {
10               (void) sprintf(buf, "%*d. %s", numwidth, leftright+1,
11                              strings[leftright]);
12!              fprintf(outfile, "%*s", -column_width, buf);
13          }
14          fprintf(outfile, "\n");
15       } else for (updown = 0; updown < height; updown++) {
16!         for (leftright = updown; leftright < num_to_print;
17!              leftright += height) {
18               (void) sprintf(buf, "%s", strings[leftright]);
19!              fprintf(outfile, "%*s", -column_width, buf);
20          }
21          fprintf(outfile, "\n");
22       }
23--- 64,85 ----
24          height++;
25       
26       if (number_flag) for (updown = 0; updown < height; updown++) {
27!         for (leftright = updown; leftright < num_to_print; ) {
28               (void) sprintf(buf, "%*d. %s", numwidth, leftright+1,
29                              strings[leftright]);
30!              if ((leftright += height) >= num_to_print)
31!                   fprintf(outfile, "%s", buf );
32!              else
33!                   fprintf(outfile, "%*s", -column_width, buf);
34          }
35          fprintf(outfile, "\n");
36       } else for (updown = 0; updown < height; updown++) {
37!         for (leftright = updown; leftright < num_to_print; ) {
38               (void) sprintf(buf, "%s", strings[leftright]);
39!              if ((leftright += height) >= num_to_print)
40!                   fprintf(outfile, "%s", buf );
41!              else
42!                   fprintf(outfile, "%*s", -column_width, buf);
43          }
44          fprintf(outfile, "\n");
45       }
Note: See TracBrowser for help on using the repository browser.