postgresql/contrib/spi/preprocessor/step1.c

28 lines
317 B
C
Raw Normal View History

#include <stdio.h>
1999-05-26 00:15:34 +08:00
char *
strtoupper(char *string)
{
1999-05-26 00:15:34 +08:00
int i;
for (i = 0; i < strlen(string); i++)
string[i] = toupper(string[i]);
return string;
}
1999-05-26 00:15:34 +08:00
void
main(char argc, char **argv)
{
1999-05-26 00:15:34 +08:00
char str[250];
int sw = 0;
while (fgets(str, 240, stdin))
{
if (sw == 0)
printf("%s", strtoupper(str));
}
}