Mail Archives: djgpp/2002/10/08/07:30:14
On 8 Oct 2002 08:48:20 GMT, Hans-Bernhard Broeker
<broeker AT physik DOT rwth-aachen DOT de> wrote:
>In comp.os.msdos.djgpp daniel gerard mcgrath <dmcg6174 AT yahoo DOT com> 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 <stdio.h>
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/
- Raw text -