home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume35 / fill / part01 < prev    next >
Encoding:
Text File  |  1993-01-24  |  18.5 KB  |  632 lines

  1. Newsgroups: comp.sources.misc
  2. From: chad@anasazi.com (Chad R. Larson)
  3. Subject: v35i003:  fill - text formatting for your editor, Part01/01
  4. Message-ID: <1993Jan21.005126.5264@sparky.imd.sterling.com>
  5. X-Md4-Signature: 4b1cace15116d65ddc13e5da8accb31f
  6. Date: Thu, 21 Jan 1993 00:51:26 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: chad@anasazi.com (Chad R. Larson)
  10. Posting-number: Volume 35, Issue 3
  11. Archive-name: fill/part01
  12. Environment: UNIX
  13. Supersedes: fill: Volume 4, Issue 91
  14.  
  15. This is an updated version of "fill", a simple text formatter for your
  16. editor.  You can set left and right margins, center text between them,
  17. generate right-justified text and have paragraph indentation (or hanging
  18. indents).  It deals with text blocks that have a left delimiter such as
  19. comment blocks in code.  You can box paragraphs in a manner suitable for
  20. news article followups.
  21.  
  22. It only requires that you can pipe a text object through a filter from
  23. within you editor.
  24.  
  25. It has been tested under SysVr3, SysVr4 and BSD 4.3.  It should compile
  26. on almost any system including MS-DOS, as it uses no system specific
  27. features other than I/O redirection.
  28.  
  29. I have placed it in the Public Domain.
  30.  
  31.     -crl
  32. -=-=-=-=-=-=-=-=-=-=-=-=( cut here )-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  33. #! /bin/sh
  34. # This is a shell archive.  Remove anything before this line, then unpack
  35. # it by saving it into a file and typing "sh file".  To overwrite existing
  36. # files, type "sh file -c".  You can also feed this as standard input via
  37. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  38. # will see the following message at the end:
  39. #        "End of shell archive."
  40. # Contents:  Makefile fill.c fill.1 test_file
  41. # Wrapped by chad@anasazi.com on Tue Jan 19 00:04:11 1993
  42. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  43. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  44.   echo shar: Will not clobber existing file \"'Makefile'\"
  45. else
  46. echo shar: Extracting \"'Makefile'\" \(646 characters\)
  47. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  48. X#
  49. X# Makefile for fill, a simple text formatter
  50. X#
  51. X#    Last changed 1/19/93
  52. X#
  53. X
  54. XBINDIR = /usr/public/bin
  55. XMANDIR = /usr/catman/pub_man/man1
  56. XCOPY = /bin/cp
  57. X
  58. XDISTFILES = Makefile fill.c fill.1 test_file
  59. X
  60. Xfill:    fill.c
  61. X    $(CC) $(CFLAGS) -o fill fill.c
  62. X
  63. Xfill.man: fill.1
  64. X    nroff -man fill.1 > fill.man
  65. X
  66. X$(BINDIR)/fill: fill
  67. X    $(COPY) fill $(BINDIR)/fill
  68. X    strip $(BINDIR)/fill
  69. X
  70. X$(MANDIR)/fill.1.z:    fill.man
  71. X    -rm $@
  72. X    $(COPY) fill.man $(MANDIR)/fill.1
  73. X    pack $(MANDIR)/fill.1
  74. X
  75. Xinstall:    $(BINDIR)/fill $(MANDIR)/fill.1.z
  76. X    touch install
  77. X
  78. XLint:    fill.c
  79. X    lint -p fill.c >Lint
  80. X
  81. Xtar:
  82. X    tar cvf Fill.tar $(DISTFILES)
  83. X    compress -v Fill.tar
  84. X
  85. Xshar:
  86. X    shar -o shar $(DISTFILES)
  87. END_OF_FILE
  88. if test 646 -ne `wc -c <'Makefile'`; then
  89.     echo shar: \"'Makefile'\" unpacked with wrong size!
  90. fi
  91. # end of 'Makefile'
  92. fi
  93. if test -f 'fill.c' -a "${1}" != "-c" ; then 
  94.   echo shar: Will not clobber existing file \"'fill.c'\"
  95. else
  96. echo shar: Extracting \"'fill.c'\" \(11584 characters\)
  97. sed "s/^X//" >'fill.c' <<'END_OF_FILE'
  98. X/* fill - Simple text formatter - 2.7 */
  99. X
  100. X/*
  101. X** Fill is a simple text formatter meant to be used from within
  102. X** your editor to provide the same functionality as the ^B command
  103. X** in WordStar.  This presumes your editor can pipe an object through
  104. X** a filter.  In vi, you would do something like "!}fill" to word wrap
  105. X** a paragraph.  Of course, you may, in the spirit of Unix, find other
  106. X** uses for it.  For example, fill has the side-effect of de-tabifying
  107. X** lines passed to it.
  108. X**    Usage: fill [-b] [-c | -j] [-d] [-l n] [-r n] [-p n]
  109. X**        -b    box the output (replying to news)
  110. X**        -c    center the lines
  111. X**        -d    the block is left delimited ("** comment block")
  112. X**        -j    justify the right margin
  113. X**        -l n    set left margin to "n", defaults to 1
  114. X**        -r n    set right margin to "n", defaults to 72
  115. X**        -p n    sets a "paragraph" indent.
  116. X*/
  117. X
  118. X/*
  119. X** Author:
  120. X**   Chad R. Larson            This program is placed in the
  121. X**   DCF, Inc.                Public Domain.  You may do with
  122. X**   14623 North 49th Place        it as you please.
  123. X**   Scottsdale, AZ 85254
  124. X*/
  125. X
  126. X/* maximum length of a line (for centering only) */
  127. X#define LINE_MAX    512
  128. X
  129. X/* maximum length of a word */
  130. X#define WORD_MAX    128
  131. X
  132. X/* the default right margin */
  133. X#define DEF_MARGIN    72
  134. X
  135. X/* strings used in boxing output */
  136. X#define BOX_MARGIN "| "
  137. X#define BOX_STRING "+---------------"
  138. X
  139. X#include <stdio.h>
  140. X#include <string.h>
  141. X#include <memory.h>
  142. X
  143. X/* forward references */
  144. Xvoid    j_line();    /* justify a line */
  145. Xvoid    exit();
  146. Xchar    *append();
  147. Xchar    *malloc();
  148. X
  149. X/* global flags */
  150. X#define FALSE 0
  151. X#define TRUE  ~FALSE
  152. Xint    nl_flag;    /* new line has been processed */
  153. Xint    delimited = FALSE;    /* left delimited block */
  154. X
  155. X/* identifier */
  156. X#ifndef lint
  157. Xstatic char id[] = "@(#)fill, version 2.7";
  158. X#endif
  159. X
  160. X
  161. X/* main program */
  162. Xint
  163. Xmain(argc, argv)
  164. Xint    argc;
  165. Xchar    *argv[];
  166. X{
  167. X    int        c;            /* a generic character */
  168. X    int        center = FALSE;        /* center text flag */
  169. X    int        box = FALSE;        /* box text flag */
  170. X    int        justify = FALSE;    /* justify right margin flag */
  171. X    int        paragraph = 0;        /* paragraph indent value */
  172. X    int        w_length;        /* length of current word */
  173. X    int        l_length = 0;        /* length of current line */
  174. X    int        l_margin = 1;        /* left margin */
  175. X    int        r_margin = DEF_MARGIN;    /* right margin */
  176. X    int        wrap_point;        /* max chars allowed on a line */
  177. X    char    *margin;        /* points to left margin string */
  178. X    char    *out_line;        /* points to the output line */
  179. X    char    *delimit;        /* points to the block delimiter */
  180. X    char    word[WORD_MAX];        /* the current word */
  181. X    char    *bp;            /* a buffer pointer */
  182. X    extern char    *optarg;        /* option argument pointer */
  183. X
  184. X    /* parse the command line */
  185. X    while ((c = getopt(argc, argv, "bcdjr:l:p:")) != EOF)
  186. X    switch (c) {
  187. X    case 'b':
  188. X        box = TRUE;
  189. X        l_margin += strlen(BOX_MARGIN);
  190. X        break;
  191. X    case 'c':
  192. X        center = TRUE;
  193. X        break;
  194. X    case 'd':
  195. X        delimited = TRUE;
  196. X        break;
  197. X    case 'j':
  198. X        justify = TRUE;
  199. X        break;
  200. X    case 'r':
  201. X        r_margin = atoi(optarg);
  202. X        break;
  203. X    case 'l':
  204. X        l_margin += atoi(optarg) - 1;
  205. X        break;
  206. X    case 'p':
  207. X        paragraph = atoi(optarg);
  208. X        break;
  209. X    case '?':
  210. X        (void)fprintf(stderr,
  211. X          "Usage: %s [-b] [-c | -j] [-d] [-l n] [-r n] [-p n]\n", argv[0]);
  212. X        exit(-1);
  213. X    }
  214. X
  215. X    /* validate command line inputs */
  216. X    if (justify && center) {
  217. X    (void)fputs("Center and Justify are mutually exclusive.\n", stderr);
  218. X    exit(1);
  219. X    }
  220. X    if (box && center) {
  221. X    (void)fputs("Center and Box are mutually exclusive.\n", stderr);
  222. X    exit(1);
  223. X    }
  224. X    if (l_margin >= r_margin || l_margin < 1) {
  225. X    (void)fputs("Illogical margin setting.\n", stderr);
  226. X    exit(2);
  227. X    }
  228. X    if (paragraph < 0)        /* silently adjust */
  229. X    paragraph = (-paragraph > l_margin ? -l_margin : paragraph);
  230. X    else
  231. X    paragraph = (paragraph > r_margin ? r_margin : paragraph);
  232. X
  233. X    /* Center the text if requested.  Will exit without filling. */
  234. X    if (center) {
  235. X    if ( (out_line = malloc(LINE_MAX)) == NULL ) {
  236. X        (void)fputs("Unable to allocate centering buffer.\n", stderr);
  237. X        exit(3);
  238. X    }
  239. X    while ( fgets(out_line, LINE_MAX, stdin) != NULL ) {
  240. X        bp = out_line;
  241. X        while (*bp == ' ' || *bp == '\t')    /* strip leading spaces */
  242. X        bp++;
  243. X        l_length = strlen(bp) - 1;
  244. X        while (bp[l_length - 1] == ' ' || bp[l_length - 1] == '\t')
  245. X        l_length--;            /* strip trailing space */
  246. X        bp[l_length] = '\0';
  247. X        center = (r_margin - l_length) / 2;
  248. X        while (center--)
  249. X        (void)putc(' ', stdout);
  250. X        (void)puts(bp);
  251. X    }
  252. X    exit(0);
  253. X    }
  254. X
  255. X    /* create the left margin string */
  256. X    if ( (margin = malloc( (unsigned)l_margin) ) == NULL ) {
  257. X    (void)fputs("Unable to allocate space for margin.\n", stderr);
  258. X    exit(4);
  259. X    }
  260. X    (void)memset(margin, ' ', l_margin - 1);
  261. X    margin[l_margin - 1] = '\0';
  262. X    if (box)
  263. X    (void)strncpy(margin, BOX_MARGIN, strlen(BOX_MARGIN));
  264. X
  265. X    /* create a place for the block delimiter, if needed */
  266. X    if (delimited && (delimit = malloc(WORD_MAX)) == NULL ) {
  267. X    (void)fputs("Unable to allocate delimit buffer.\n", stderr);
  268. X    exit(5);
  269. X    }
  270. X
  271. X    /* create the output line buffer */
  272. X    wrap_point = r_margin - l_margin + 1;
  273. X    if ((out_line = malloc( (unsigned)wrap_point + 3) ) == NULL) {
  274. X    (void)fputs("Unable to allocate space for line buffer.\n", stderr);
  275. X    exit(6);
  276. X    }
  277. X
  278. X    /* establish the delimiter */
  279. X    if (delimited) {
  280. X    if (get_word(delimit) == 0)
  281. X        exit(0);
  282. X    else {
  283. X        (void)strcat(delimit, " ");
  284. X        wrap_point -= strlen(delimit);
  285. X    }
  286. X    /* check for delimiter only thing on line (or in file) */
  287. X    if (nl_flag)
  288. X        if (get_word(word) == 0) {
  289. X        if (box) {
  290. X            (void)puts(BOX_STRING);
  291. X            (void)fputs(BOX_MARGIN, stdout);
  292. X        }
  293. X        (void)puts(delimit);
  294. X        if (box)
  295. X            (void)puts(BOX_STRING);
  296. X        exit(0);
  297. X        }
  298. X    }
  299. X
  300. X    /* move words from the input to the output */
  301. X    if (box)
  302. X    (void)puts(BOX_STRING);
  303. X    bp = out_line;
  304. X    wrap_point -= paragraph;    /* one time adjustment */
  305. X    while ( (w_length = get_word(word)) != 0 ) {
  306. X    if ( (l_length + w_length) > wrap_point ) {    /* line wrap? */
  307. X        while (out_line[l_length - 1] == ' ')   /* trailing space strip */
  308. X        l_length--;
  309. X        out_line[l_length] = '\0';
  310. X        if (justify)            /* justify the line? */
  311. X        j_line(out_line, wrap_point);
  312. X        if (paragraph) {
  313. X        wrap_point += paragraph;    /* restore */
  314. X        if (paragraph > 0) {
  315. X            (void)fputs(margin, stdout);
  316. X            while (--paragraph)
  317. X            (void)putchar(' ');
  318. X        } else {
  319. X            c = 0;
  320. X            paragraph--;
  321. X            while (++paragraph)
  322. X            (void)putchar(margin[c++]);
  323. X        }
  324. X        } else    /* not paragraph */
  325. X        (void)fputs(margin, stdout);    /* set any offset */
  326. X        if (delimited)
  327. X        (void)fputs(delimit, stdout);
  328. X        (void)puts(out_line);        /* put the line to stdout */
  329. X        *out_line = '\0';            /* reset the output line */
  330. X        l_length = 0;
  331. X        bp = out_line;
  332. X    }
  333. X    bp = append(bp, word);
  334. X    bp = append(bp, " ");
  335. X    l_length += w_length + 1;
  336. X    if ((c = word[w_length - 1]) == '.' || c == '?' || c == '!') {
  337. X        bp = append(bp, " ");    /* end-of-sentence handling */
  338. X        l_length++;
  339. X    }
  340. X    else if (word[w_length - 1] == '"' &&  /* quoted sentence */
  341. X      (c = word[w_length - 2]) == '.' || c == '?' || c == '!') {
  342. X        bp = append(bp, " ");
  343. X        l_length++;
  344. X    }
  345. X    if (delimited && nl_flag && get_word(word) == 0)
  346. X        break;    /* flush next delimiter, or quit if none */
  347. X    }
  348. X
  349. X    /* clean up and exit */
  350. X    if (l_length) {        /* residual to flush */
  351. X    while (out_line[l_length - 1] == ' ')
  352. X        l_length--;
  353. X    out_line[l_length] = '\0';
  354. X    (void)fputs(margin, stdout);
  355. X    if (delimited)
  356. X        (void)fputs(delimit, stdout);
  357. X    (void)puts(out_line);
  358. X    }
  359. X    if (box)
  360. X    (void)puts(BOX_STRING);
  361. X    exit(0);
  362. X}
  363. X
  364. X
  365. X/*
  366. X** get_word - a routine to return the next word from the standard input.
  367. X** Copies the next word from the input stream to the location pointed to
  368. X** by its argument.  The word will be null terminated.  A word is any
  369. X** string of characters delimited by whitespace.  Returns the length
  370. X** of the word.
  371. X*/
  372. X
  373. Xint get_word(Word)
  374. Xchar    *Word;
  375. X{
  376. X    register int    c;    /* generic character */
  377. X    register int    i;    /* a counter */
  378. X
  379. X    /* first strip any leading whitespace */
  380. X    while (TRUE) {
  381. X    c = getchar();
  382. X    if (c == ' ' || c == '\t')
  383. X        continue;
  384. X    if (c == '\n' || c == '\f') {
  385. X        if (delimited) {    /* the delimiter is considered whitespace */
  386. X        while ((c = getchar()) == ' ' || c == '\n' ||
  387. X          c == '\t' || c == '\f') ;        /* strip more white */
  388. X        if (c == EOF) {
  389. X            *Word = '\0';
  390. X            return 0;
  391. X        }
  392. X        while ((c = getchar()) != ' ' && c != '\n' &&
  393. X          c != '\t' && c != '\f' && c != EOF) ;
  394. X        if (c == EOF) {
  395. X            *Word = '\0';
  396. X            return 0;
  397. X        }
  398. X        }
  399. X        continue;
  400. X    }
  401. X    if (c == EOF) {
  402. X        *Word = '\0';
  403. X        return 0;
  404. X    }
  405. X    break;
  406. X    }
  407. X
  408. X    /* copy the word */
  409. X    i = 0;
  410. X    do {
  411. X    *Word++ = c;
  412. X    if (++i >= WORD_MAX) {
  413. X        (void)fputs("Encountered word too large.\n", stderr);
  414. X        exit(7);
  415. X    }
  416. X    c = getchar();
  417. X    } while (c != ' ' && c != '\n' && c != '\t' && c != '\f' && c != EOF);
  418. X    *Word = '\0';
  419. X    if (c == '\n' || c == '\f')        /* did we just end an input line? */
  420. X    nl_flag = TRUE;
  421. X    else
  422. X    nl_flag = FALSE;
  423. X    return i;
  424. X}
  425. X
  426. X
  427. X/*
  428. X** Append - like strcpy except returns a pointer to the
  429. X** ending null.
  430. X*/
  431. X
  432. Xchar *append(s1, s2)
  433. Xregister char    *s1, *s2;
  434. X{
  435. X    while(*s1++ = *s2++);
  436. X    return --s1;
  437. X}
  438. X
  439. X
  440. X/*
  441. X** j_line - A routine to justify a line.  Attempts to scatter
  442. X** inserted white space between calls to avoid "rivers".
  443. X*/
  444. Xvoid j_line(buffer, margin)
  445. Xchar    *buffer;    /* the buffer to be justified */
  446. Xint    margin;        /* the margin to which we must stretch */
  447. X{
  448. X    static unsigned    direction = 0;    /* which end to we fill from? */
  449. X    static char        *work = NULL;    /* working storage */
  450. X    int            insert;        /* count of places to insert */
  451. X    int            spaces;        /* count of spaces to insert */
  452. X    int            multi;        /* spaces to insert each chance */
  453. X    int            extra;        /* count of extra spaces needed */
  454. X    int            count;        /* loop counter */
  455. X    int            loop;        /* loop counter */
  456. X    char        *Ibp;        /* Input buffer pointer */
  457. X    char        *Obp;        /* Output buffer pointer */
  458. X
  459. X    /*
  460. X    ** Allocate a working storage large enough to hold the line.  We
  461. X    ** only do this once (and only if we are justifing).
  462. X    */
  463. X    if (work == NULL)
  464. X    if ((work = malloc( (unsigned)margin + 1 )) == NULL) {
  465. X        (void)fputs("Unable to allocate work buffer.\n", stderr);
  466. X        exit(8);
  467. X    }
  468. X
  469. X    /* how many spaces do we have to insert? */
  470. X    loop = strlen(buffer);
  471. X    spaces = margin - loop;
  472. X    if (spaces == 0)
  473. X    return;
  474. X
  475. X    /* find how many opportunities there are for space stuffing */
  476. X    Ibp = buffer;
  477. X    insert = 0;
  478. X    while (loop--) {
  479. X    if ( (*Ibp++ == ' ') && (*Ibp != ' ') )    /* edge triggered */
  480. X        insert++;
  481. X    }
  482. X    if (insert == 0)
  483. X    return;
  484. X
  485. X    /* how many spaces do we need to stuff per chance? */
  486. X    multi = spaces / insert;        /* spaces per slot to insert */
  487. X    extra = spaces % insert;        /* extra spaces needed */
  488. X
  489. X    /* copy the buffer contents, inserting spaces */
  490. X    direction = ~direction;        /* flip end to fill from */
  491. X    (void)strcpy(work, buffer);        /* make a working copy */
  492. X    if (direction) {    /* spaces go at the left end of the line */
  493. X    Ibp = work;
  494. X    Obp = buffer;
  495. X    loop = strlen(buffer) + 1;
  496. X    while (loop--) {
  497. X        *Obp++ = *Ibp++;        /* move a character */
  498. X        if ((*(Ibp - 1) == ' ') && (*(Ibp - 2) != ' ')) {
  499. X        if (extra) {
  500. X            extra--;
  501. X            *Obp++ = ' ';
  502. X        }
  503. X        count = multi;
  504. X        while (count--)
  505. X            *Obp++ = ' ';
  506. X        }
  507. X    }
  508. X    } else {        /* spaces go at the right end of the line */
  509. X    loop = strlen(buffer);
  510. X    Ibp = work + loop;
  511. X    Obp = buffer + loop + spaces;
  512. X    *(Obp + 1) = '\0';
  513. X    while (loop--) {
  514. X        *Obp-- = *Ibp--;
  515. X        if ((*(Ibp + 1) == ' ') && (*(Ibp + 2) != ' ')) {
  516. X        if (extra) {
  517. X            extra--;
  518. X            *Obp-- = ' ';
  519. X        }
  520. X        for (count = multi; count; count--)
  521. X            *Obp-- = ' ';
  522. X        }
  523. X    }
  524. X    }
  525. X}
  526. END_OF_FILE
  527. if test 11584 -ne `wc -c <'fill.c'`; then
  528.     echo shar: \"'fill.c'\" unpacked with wrong size!
  529. fi
  530. # end of 'fill.c'
  531. fi
  532. if test -f 'fill.1' -a "${1}" != "-c" ; then 
  533.   echo shar: Will not clobber existing file \"'fill.1'\"
  534. else
  535. echo shar: Extracting \"'fill.1'\" \(1868 characters\)
  536. sed "s/^X//" >'fill.1' <<'END_OF_FILE'
  537. X.\" @(#)fill.1    2.3
  538. X.TH FILL 1 local
  539. X.SH NAME
  540. Xfill - a simple text formatter
  541. X.SH SYNOPSIS
  542. Xfill [[-b] [-j] | [-c]] [-d] [-r n] [-l n] [-p n]
  543. X.SH DESCRIPTION
  544. X.I Fill
  545. Xis a simple text formatter meant to be used from within
  546. Xyour editor to provide a functionality similar to the ^B command
  547. Xin WordStar.  This presumes your editor can pipe an object through
  548. Xa filter.  In vi, you would do something like "!}fill" to word wrap
  549. Xa paragraph.  Of course, you may, in the spirit of Unix, find other
  550. Xuses for it.  For example,
  551. X.I fill
  552. Xhas the side-effect of de-tabifying
  553. Xlines passed to it.
  554. X.PP
  555. XThe following options pertain:
  556. X.nf
  557. X    -b    box the output lines
  558. X    -c    center the lines
  559. X    -d    the text block has a delimiter on the left side
  560. X    -j    justify the right margin
  561. X    -p n    set paragraph indent value
  562. X    -r n    set right margin to column "n", defaults to 72
  563. X    -l n    set left margin to column "n", defaults to 1
  564. X.fi
  565. X.sp
  566. XThe "-d" option is used to preserve a left hand delimiter
  567. Xon the text, such as might be used on a comment block
  568. Xin a source file.  It does this by taking the first white-space
  569. Xdelimited word in the input text and replicating it down the
  570. Xleft-hand side of the output text block.  It concurrently
  571. Xdrops the first word on each line in its input.
  572. X.PP
  573. XThe "-p" option is used to set a paragraph indent.  The indent
  574. Xvalue specified is added to the left margin for the first line
  575. Xof output.  Negative values may be used for hanging indents.
  576. X.SH FEATURES
  577. X.I Fill
  578. Xhas no practical limit on line lengths (except when centering).
  579. X.SH BUGS
  580. XThe justification algorithm is a little crude.
  581. X.br
  582. XThe delimited text option can be easily confused.
  583. X.br
  584. XAbbreviations (eg.  this one) get an extra space after them.
  585. X.br
  586. X.I Fill
  587. Xmakes no attempt to preserve existing indentations or blank
  588. Xlines (this could be construed as a feature).
  589. X.SH AUTHOR
  590. XChad R. Larson
  591. X.SH "SEE ALSO"
  592. Xpr(1), nroff(1), troff(1)
  593. END_OF_FILE
  594. if test 1868 -ne `wc -c <'fill.1'`; then
  595.     echo shar: \"'fill.1'\" unpacked with wrong size!
  596. fi
  597. # end of 'fill.1'
  598. fi
  599. if test -f 'test_file' -a "${1}" != "-c" ; then 
  600.   echo shar: Will not clobber existing file \"'test_file'\"
  601. else
  602. echo shar: Extracting \"'test_file'\" \(852 characters\)
  603. sed "s/^X//" >'test_file' <<'END_OF_FILE'
  604. XThis is just a silly file of words to see if fill wraps them properly.
  605. XThis is just a silly file of words to see if fill wraps them properly.
  606. XThis is just a silly file of words to see if fill wraps them properly.
  607. XThis is just a silly file of words to see if fill wraps them properly.
  608. XThis is just a silly file of words to see if fill wraps them properly.
  609. XThis is just a silly file of words to see if fill wraps them properly.
  610. XThis is just a silly file of words to see if fill wraps them properly.
  611. XThis is just a silly file of words to see if fill wraps them properly.
  612. XThis is just a silly file of words to see if fill wraps them properly.
  613. XThis is just a silly file of words to see if fill wraps them properly.
  614. XThis is just a silly file of words to see if fill wraps them properly.
  615. XThis is just a silly file of words to see if fill wraps them properly.
  616. END_OF_FILE
  617. if test 852 -ne `wc -c <'test_file'`; then
  618.     echo shar: \"'test_file'\" unpacked with wrong size!
  619. fi
  620. # end of 'test_file'
  621. fi
  622. echo shar: End of shell archive.
  623. exit 0
  624. -- 
  625. --
  626. Chad R. Larson                         chad%anasaz.UUCP@asuvax.eas.asu.edu
  627. Anasazi, Inc. - 7500 North Dreamy Draw Drive, Suite 120, Phoenix, Az 85020
  628. (602) 870-3330            "I read the news today, oh boy!"  -- John Lennon
  629.  
  630.  
  631. exit 0 # Just in case...
  632.