From: Jon DeMarks Newsgroups: comp.os.msdos.djgpp Subject: Terminal Programming Date: Fri, 23 Jul 1999 19:43:23 -0400 Organization: Tachyeon Systems Lines: 10 Message-ID: <3798FE1B.AE7EEEC@mindspring.com> NNTP-Posting-Host: d1.8a.b2.20 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 23 Jul 1999 23:43:08 GMT X-Mailer: Mozilla 4.04 [en] (Win95; U) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I am trying to write a terminal that will get a command typed by the user and execute a function corresponding to it. Any suggestions? The following code snippet is stand-alone and can be compiled. #include void _freedbgkern() { char buf[128]; printf("\nFreedows Terminal v.1.0a By Jon DeMarks\n\n"); for(;;) { fflush(stdin); scanf("%s", buf); if(buf=="sd") { sd(); } else { printf("Invaild command %s, come again?\n", buf); } } }