58 lines
1.1 KiB
C
58 lines
1.1 KiB
C
// test15d.c
|
|
//
|
|
// This program will test a call to COBOL sub program from C.
|
|
//
|
|
// David Essex March 2000
|
|
|
|
#include <stdio.h>
|
|
|
|
//extern void test15a(char *f1, char *f2, int *f3);
|
|
//extern int test15a(char *f1, char *f2, int *f3, char *f4);
|
|
extern int test15a(char *f1, char *f2, unsigned int *f3, char *f4);
|
|
|
|
int main(int ac, char *av[])
|
|
{
|
|
|
|
int r=0;
|
|
unsigned int c3;
|
|
char c1[6], c2[2], c4[3];
|
|
|
|
c1[0] = '=';
|
|
c1[1] = '=';
|
|
c1[2] = '=';
|
|
c1[3] = '=';
|
|
c1[4] = '=';
|
|
c1[5] = '=';
|
|
|
|
c2[0] = '0';
|
|
c2[1] = '6';
|
|
|
|
c3=84;
|
|
|
|
c4[0] = '1';
|
|
c4[1] = '4';
|
|
c4[2] = '4';
|
|
|
|
printf("main (test15d) C input :%c%c%c%c%c%c:%c%c:%02d:%c%c%c:\n",
|
|
c1[0], c1[1], c1[2], c1[3], c1[4], c1[5],
|
|
c2[0], c2[1],
|
|
c3,
|
|
c4[0], c4[1], c4[2]
|
|
);
|
|
|
|
// test15a(c1, c2, &c3);
|
|
// r = test15a(c1, c2, &c3);
|
|
r = test15a(c1, c2, &c3, c4);
|
|
|
|
printf("main (test15d) C return :%c%c%c%c%c%c:%c%c:%02d:%c%c%c:\n",
|
|
c1[0], c1[1], c1[2], c1[3], c1[4], c1[5],
|
|
c2[0], c2[1],
|
|
c3,
|
|
c4[0], c4[1], c4[2]
|
|
);
|
|
|
|
printf("program return code: %d\n", r);
|
|
return r;
|
|
|
|
}
|