source: trunk/third/ssh/rfc-pg.c @ 10564

Revision 10564, 984 bytes checked in by danw, 27 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r10563, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2
3rfc-pg.c
4
5Author: Tatu Ylonen <ylo@cs.hut.fi>
6
7Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8                   All rights reserved
9
10Created: Fri Jul  7 02:14:16 1995 ylo
11
12*/
13
14/*
15 * $Id: rfc-pg.c,v 1.1.1.1 1997-10-17 22:25:50 danw Exp $
16 * $Log: not supported by cvs2svn $
17 * Revision 1.1.1.1  1996/02/18 21:38:10  ylo
18 *      Imported ssh-1.2.13.
19 *
20 * Revision 1.2  1995/07/13  01:31:15  ylo
21 *      Removed "Last modified" header.
22 *      Added cvs log.
23 *
24 * $Endlog$
25 */
26
27#include <stdio.h>
28
29int main()
30{
31  int add_formfeed = 0;
32  int skipping = 0;
33  int ch;
34
35  while ((ch = getc(stdin)) != EOF)
36    {
37      if (ch == '\n')
38        {
39          if (add_formfeed)
40            {
41              putc('\n', stdout);
42              putc('\014', stdout);
43              putc('\n', stdout);
44              add_formfeed = 0;
45              skipping = 1;
46              continue;
47            }
48          if (skipping)
49            continue;
50        }
51      skipping = 0;
52      if (ch == '\014')
53        {
54          add_formfeed = 1;
55          continue;
56        }
57      putc(ch, stdout);
58    }
59  exit(0);
60}
Note: See TracBrowser for help on using the repository browser.