summaryrefslogtreecommitdiffstats
path: root/Tests/CustomCommand/wrapper.cxx
blob: 3ad0794a9734dff8b6769f35daea7b4f665d7a8b (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();\n");
  fprintf(fp,"int wrapped() { return wrapped_help(); }\n");
  fclose(fp);
  fp = fopen(argv[2],"w");
  fprintf(fp,"int wrapped_help() { return 5; }\n");
  fclose(fp);
  return 0;
}