Article View: alt.msdos.programmer
Article #1126Re: C questions (intermediate?)
From: Glynn Brooks
Date: Mon, 16 Mar 1992 19:02
Date: Mon, 16 Mar 1992 19:02
22 lines
1145 bytes
1145 bytes
veilm00@terre.DMI.USherb.CA (MARC VEILLEUX) writes: >Here a some C questions : >HOw can you tell if a file is already in use (like in windows)? >HOw can you flush the keyboard buffer? >What's is the fastest way to delete all file in current dir? Here is an answer to your second question: #define HEAD *(int far *)MK_FP(0x40, 0x1a)) #define TAIL *(int far *)MK_FP(0x40, 0x1c)) HEAD = TAIL; // Flush keyboard buffer This routine works by resetting the head pointer (offset) to the same value as the tail pointer, which by definition, means the buffer is empty. -- Glynn Brooks Internet: rgb@mitek.com OpenConnect Systems CompuServe: 76326,502 2033 Chennault Dr. Carrollton, TX 75006
Technical Details
Message-ID:
<rgb.700772579@pssparc2>Path:
arc1-ca.pugleaf.net!wupost!darwin.sura.net!convex!mips.mitek.com!pssparc2!rgbReferences:
<1992Mar16.051932.18878@DMI.USherb.CA>Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer,alt.sources Path: arc1-ca.pugleaf.net!wupost!darwin.sura.net!convex!mips.mitek.com!pssparc2!rgb From: rgb@pssparc2.oc.com (Glynn Brooks) Subject: Re: C questions (intermediate?) Organization: OpenConnect Systems Date: 16 Mar 92 19:02:59 GMT Message-ID: <rgb.700772579@pssparc2> References: <1992Mar16.051932.18878@DMI.USherb.CA> Sender: news@mips.mitek.com (USENET Administrator) Lines: 22