home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
forum5.lzh
/
SPRACHEN
/
C
/
GSHELL
/
compiler.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-04-20
|
786b
|
42 lines
#include <stdio.h>
#include "selectfile.h"
#define COMPILER "cc"
usage()
{
fprintf(stderr,"Syntax: compiler [<path>]\n");
fprintf(stderr,"Function: a menue driven compiler shell\n");
fprintf(stderr,"Options: none\n");
exit(1);
}
main(argc,argv)
int argc;
char *argv[];
{
char prog[100],dir[100],h[100];
if(argc==2) {
if(strcmp(argv[1],"-?")==0) usage();
strcpy(dir,argv[1]);
} else strcpy(dir,".");
while(select_file("CC-SHELL V1.0 Uwe Simon 1988",
"Compile what File ?",dir,CHD|PARA,"*.c",prog)) {
strcpy(h,COMPILER);
strcat(h," ");
if(strcmp(dir,".")&&(prog[0]!='/')) {
strcat(h,dir); strcat(h,"/");
}
strcat(h,prog);
system(h);
printf("\n\n >>>>>>> press <CR> <<<<<<<"); fflush(stdout);
readln(0,prog,1);
}
printf("\n\n");
}