-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathth-en.c
37 lines (29 loc) · 1.13 KB
/
th-en.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2008 Crip5 Dominique Pastre
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
void main(argc,argv)
int argc;
char *argv[];
{ char cmd[256]; // to build the command (string)
strcpy(cmd,"/usr/bin/swipl -f muscadet-en -g true ");
if (argc >= 2 ) {
strcat(cmd," <<! 2> /dev/null \n th(["); // th(
int i;
strcat(cmd,"'"); // '
strcat(cmd, argv[1]); // file or path
strcat(cmd,"'"); // '
for (i=2;i<argc;i++) {
strcat(cmd, ","); // ,
strcat(cmd, argv[i]); // other arguments
}
strcat(cmd, "]). \n halt. \n ! ."); // ]).
// alt.
// !
// .
printf("\ngenerated command : \n%s\n",cmd);
}
else strcpy(cmd, "more th-commands");
system(cmd); // to run the command
return;
}