From: dmcg6174 AT yahoo DOT com (daniel gerard mcgrath) Newsgroups: comp.os.msdos.djgpp,comp.emacs Subject: Re: "shell" command in DJGPP Emacs? Message-ID: <3da2bdfe.2802949@news-server.optonline.net> References: <3da26e84 DOT 3476875 AT news-server DOT optonline DOT net> X-Newsreader: Forte Free Agent 1.21/32.243 Lines: 49 Date: Tue, 08 Oct 2002 11:32:35 GMT NNTP-Posting-Host: 24.190.226.156 X-Trace: news4.srv.hcvlny.cv.net 1034075992 24.190.226.156 (Tue, 08 Oct 2002 07:19:52 EDT) NNTP-Posting-Date: Tue, 08 Oct 2002 07:19:52 EDT Organization: Optimum Online To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On 8 Oct 2002 08:48:20 GMT, Hans-Bernhard Broeker wrote: >In comp.os.msdos.djgpp daniel gerard mcgrath wrote: >> Hi. I use the DJGPP version of Emacs under DOS (Windows 98). I am >> trying to figure out, how do you get a sort of "M-x shell" command, >> where you type in successive DOS commands? > >M-x shell and similar commands, i.e. anything where you type live >command input to some other program into an emacs window, cannot work >on DOS. DOS *is* a single-tasking operating system, after all. Hmmm, I guess maybe I should then get my C source code translated into Emacs-Lisp? Here it is: /************************************************* **** clif.c ************************************** *************************************************/ #include int main(int argc, char **argv) { int i; for (i = 1; i < argc; ++i) { int c, lines; FILE *file; lines = 0; file = fopen(argv[i], "r"); while ((c = getc(file)) != EOF) { if (c == '\n') { ++lines; } } printf("%d\n", lines); fclose(file); } return 0; } /*** end of clif.c ******************************/ Maybe I can get somewhere from there? -------------------------------------------------- daniel g. mcgrath (currently going through a depression) http://members.tripod.com/denyore_w0o/