gno/bin/upper/upper.c
gdr-ftp 784e3de7cd Initial checkin of aroff, binprint, center, less, ls, make, makemake,
passwd, ps, purge, shutdown, stty, upper, and vi.  These sources are
for the versions of the utils shipped with GNO v2.0.4.
1998-03-09 08:30:21 +00:00

23 lines
415 B
C

/* converts text to upper case, used to gsh pipe mechanism */
/* program by Tim Meekins, Copyright (C) 1991 Procyon, Inc. */
#include <stdio.h>
#include <texttool.h>
#pragma optimize -1
#pragma stacksize 1024
main()
{
char ch;
while(1)
{
ch = ReadChar(0) & 0x7f;
if (ch==0) return;
if (ch >= 'a' && ch <= 'z')
ch = ch - ('a'-'A');
WriteChar(ch);
if (ch==13) WriteChar(10);
}
}