/* gemshell.c forms gemshell.tos STdNet-StPaulMN 17Sep88 CJPurcell */ /* "one-liner" shell to compile w/gcc on an ATARI-1040ST or ATARI-520+ */ #include /* provides maximum available execute space in 1meg */ /* eventually,read this info from an initialization file, i.e., gnu.rc */ static char *envp[] = { "gcc=g:\\exec\\gcc.ttp", "cc1=g:\\exec\\gcc-cc1.ttp", "cpp=g:\\exec\\gcc-cpp.ttp", "ld=g:\\exec\\gcc-ld.ttp", "as=g:\\exec\\gcc-as.ttp", "GCCEXEC=g:\\exec\\gcc-", "INCLUDE=g:\\include", "GNULIB=g:\\lib", "TEMP=p:", "PATH=", "A:\\", 0 }; main() { unsigned char buffer[130]; int status; buffer[0] = 128; Cconws("gccGEMshell Enter: command_line_string (^C exits)\r\n:"); Cconrs(buffer); Cconws("\r\n"); buffer[1] = ' '; /* command buffer mandatory space prefix */ /* 0 selects loadgo */ status = (int) Pexec( 0 , "g:\\exec\\gcc.ttp", &buffer[1], *envp ); Cconws("\r\n Pause to read compiler messages; Any key continues: \r\n"); Bconin(2); return(status); } ed GCCEXEC whose value is the defau