summaryrefslogtreecommitdiffstats
path: root/Tests/CustomCommand/wrapper.cxx
blob: f65eb9b506c4853d95378e96d7b9b9597a4922dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>

int main(int argc, char *argv[])
{
  if ( argc < 3 )
    {
    fprintf(stderr, "Usage: %s <file1> <file2>\n", argv[0]);
    return 1;
    }
  FILE *fp = fopen(argv[1],"w");
  fprintf(fp,"extern int wrapped_help(void);\n");
  fprintf(fp,"int wrapped(void) { return wrapped_help(); }\n");
  fclose(fp);
  fp = fopen(argv[2],"w");
  fprintf(fp,"int wrapped_help(void) { return 5; }\n");
  fclose(fp);
  return 0;
}