diff options
Diffstat (limited to 'PG')
| -rw-r--r-- | PG/Loop.c | 46 | ||||
| -rw-r--r-- | PG/PGTest.c | 104 |
2 files changed, 75 insertions, 75 deletions
@@ -1,24 +1,24 @@ -#include <stdio.h> -#include <windows.h> - -/* - * TST_PG.C - * - * Little test program of "PG" command for FBB BBS software. - * - * (C) F6FBB 1991. - * - * FBB software 5.14 and up. - * - * - * This program echoes to the user what he types - * or executes a BBS command preceded by "CMD" - * until "BYE" is received - */ - - -main(int argc, char **argv) -{ - Sleep(10000); - return 0; +#include <stdio.h>
+#include <windows.h>
+
+/*
+ * TST_PG.C
+ *
+ * Little test program of "PG" command for FBB BBS software.
+ *
+ * (C) F6FBB 1991.
+ *
+ * FBB software 5.14 and up.
+ *
+ *
+ * This program echoes to the user what he types
+ * or executes a BBS command preceded by "CMD"
+ * until "BYE" is received
+ */
+
+
+main(int argc, char **argv)
+{
+ Sleep(10000);
+ return 0;
}
\ No newline at end of file diff --git a/PG/PGTest.c b/PG/PGTest.c index 4d3742d..43dcac4 100644 --- a/PG/PGTest.c +++ b/PG/PGTest.c @@ -1,53 +1,53 @@ -#include <stdio.h> - -/* - * TST_PG.C - * - * Little test program of "PG" command for FBB BBS software. - * - * (C) F6FBB 1991. - * - * FBB software 5.14 and up. - * - * - * This program echoes to the user what he types - * or executes a BBS command preceded by "CMD" - * until "BYE" is received - */ - - -main(int argc, char **argv) -{ - int i; - int level = atoi(argv[2]); /* Get level from argument list */ - - /* and transform it to integer */ - if (level == 0) { /* Is level equal to 0 ? */ - /* This is the first call */ - printf("Hello %s, type BYE when you want to stop !\n", argv[1]); - return(1); /* program will be called again */ - } - else { - strupr(argv[5]); /* Capitalise the first word */ - if (strcmp(argv[5], "BYE") == 0) { /* is BYE received ? */ - printf("Ok, bye-bye\n"); - return(0); /* Yes, go on BBS */ - } - else if (strcmp(argv[5], "CMD") == 0) { /* is CMD received ? */ - for (i = 6 ; i < argc ; i++) /* List line arguments */ - printf("%s ", argv[i]); /* sent by user */ - putchar('\n'); - for (i = 6 ; i < argc ; i++) /* List line arguments */ - printf("%s ", argv[i]); /* sent by user */ - putchar('\n'); - return(4); /* Yes, send command */ - } - else { - printf("You told me : "); /* These are other lines */ - for (i = 5 ; i < argc ; i++) /* List line arguments */ - printf("%s ", argv[i]); /* sent by user */ - putchar('\n'); - return(1); /* No, call again program */ - } - } +#include <stdio.h>
+
+/*
+ * TST_PG.C
+ *
+ * Little test program of "PG" command for FBB BBS software.
+ *
+ * (C) F6FBB 1991.
+ *
+ * FBB software 5.14 and up.
+ *
+ *
+ * This program echoes to the user what he types
+ * or executes a BBS command preceded by "CMD"
+ * until "BYE" is received
+ */
+
+
+main(int argc, char **argv)
+{
+ int i;
+ int level = atoi(argv[2]); /* Get level from argument list */
+
+ /* and transform it to integer */
+ if (level == 0) { /* Is level equal to 0 ? */
+ /* This is the first call */
+ printf("Hello %s, type BYE when you want to stop !\n", argv[1]);
+ return(1); /* program will be called again */
+ }
+ else {
+ strupr(argv[5]); /* Capitalise the first word */
+ if (strcmp(argv[5], "BYE") == 0) { /* is BYE received ? */
+ printf("Ok, bye-bye\n");
+ return(0); /* Yes, go on BBS */
+ }
+ else if (strcmp(argv[5], "CMD") == 0) { /* is CMD received ? */
+ for (i = 6 ; i < argc ; i++) /* List line arguments */
+ printf("%s ", argv[i]); /* sent by user */
+ putchar('\n');
+ for (i = 6 ; i < argc ; i++) /* List line arguments */
+ printf("%s ", argv[i]); /* sent by user */
+ putchar('\n');
+ return(4); /* Yes, send command */
+ }
+ else {
+ printf("You told me : "); /* These are other lines */
+ for (i = 5 ; i < argc ; i++) /* List line arguments */
+ printf("%s ", argv[i]); /* sent by user */
+ putchar('\n');
+ return(1); /* No, call again program */
+ }
+ }
}
\ No newline at end of file |
