source: buchla-68k/orig/GP/GPTEST.C@ 73dd55f

Last change on this file since 73dd55f was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago

Imported original source code.

  • Property mode set to 100755
File size: 2.6 KB
RevLine 
[3ae31e9]1/*
2 =============================================================================
3 gptest.c -- test gp_main and friends
4 Version 1 -- 1987-10-14 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "stddefs.h"
9#include "stdio.h"
10
11#include "gp_main.h"
12
13/*
14 =============================================================================
15 tp_clin() -- gp_clin test stub
16 =============================================================================
17*/
18
19int
20tp_clin(argc, argv)
21int argc;
22char *argv[];
23{
24 register int i;
25
26 printf("tp_clin(%d, $%08lx) executed\n", argc, argv);
27
28 for (i = 0; i < argc; i++)
29 printf(" argv[%d] = \042%s\042\n", i, argv[i]);
30
31 return(argc GT 1);
32}
33
34/*
35 =============================================================================
36 tp_btch() -- gp_btch test stub
37 =============================================================================
38*/
39
40int
41tp_btch(argc, argv)
42int argc;
43char *argv[];
44{
45 printf("tp_btch(%d, $%08lx) executed\n", argc, argv);
46 return(SUCCESS);
47}
48
49/*
50
51*/
52
53/*
54 =============================================================================
55 tp_intr() -- gp_intr test stub
56 =============================================================================
57*/
58
59int
60tp_intr(argc, argv)
61int argc;
62char *argv[];
63{
64 printf("tp_intr(%d, $%08lx) executed\n", argc, argv);
65 return(SUCCESS);
66}
67
68/*
69 =============================================================================
70 tp_exit() -- gp_exit test stub
71 =============================================================================
72*/
73
74int
75tp_exit(arg)
76int arg;
77{
78 printf("tp_exit(%d) executed\n", arg);
79 return(arg);
80}
81
82/*
83
84*/
85
86/*
87 =============================================================================
88 gp_init() -- initialize the application for gp_main()
89 =============================================================================
90*/
91
92int
93gp_init(argc, argv)
94int argc;
95char *argv[];
96{
97 gp_clin = tp_clin;
98 gp_btch = tp_btch;
99 gp_intr = tp_intr;
100 gp_exit = tp_exit;
101
102 printf("gp_init(%d, $%08lx): Application initialized.\n",
103 argc, argv);
104
105 return(SUCCESS);
106}
107
108/*
109 =============================================================================
110 main driver for the test
111 =============================================================================
112*/
113
114main(argc, argv)
115int argc;
116char *argv[];
117{
118 printf("main(%d, $%08lx) executed.\n", argc, argv);
119
120 gp_main(argc, argv); /* run gp_main */
121
122 printf("main(): ERROR -- gp_main() returned.\n");
123
124 exit(1); /* it should never return */
125}
Note: See TracBrowser for help on using the repository browser.