File: comp.c

package info (click to toggle)
lpe 1.2.6.11
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,792 kB
  • ctags: 1,020
  • sloc: ansic: 12,804; sh: 10,515; makefile: 351; cs: 137; perl: 111; sed: 93
file content (29 lines) | stat: -rw-r--r-- 501 bytes parent folder | download | duplicates (4)
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
#include <config.h>
#include SLANG_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int
main ( int argc, char **argv )
{
	int i;
	char *s;
	char *c1="byte_compile_file(\"";

	SLang_init_all ();

	for ( i = 1; i < argc; i++ )
	{
		printf ("Compiling: %s ...", argv[i] );
		s = (char *) malloc ( strlen ( argv[i] ) + strlen ( c1 ) + 6 );
		s[0]='\0';
		strcat(s,c1);
		strcat(s,argv[i]);
		strcat(s,"\",0);");
		SLang_load_string ( s );
		free ( s );
		printf (" done.\n");
	}
	return 0;
}