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
/
editor.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-04-20
|
689b
|
39 lines
#include <stdio.h>
#include "selectfile.h"
#define EDITOR "umacs"
usage()
{
fprintf(stderr,"Syntax: editor [<path>]\n");
fprintf(stderr,"Function: a menue driven umacs 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("UMACS-SHELL V1.0 Uwe Simon 1988",
"Edit what File ?",dir,CHD,"*",prog)) {
strcpy(h,EDITOR);
strcat(h," ");
if(strcmp(dir,".")&&(prog[0]!='/')) {
strcat(h,dir); strcat(h,"/");
}
strcat(h,prog);
system(h);
}
printf("\n\n");
}