19. System Dependencies

19.1 How can I read a single character from the keyboard without waiting for the RETURN key?

19.2 How can I find out how many characters are available for reading, or do a non-blocking read?

19.3 How can I display a percentage-done indication that updates itself in place, or show one of those ``twirling baton'' progress indicators?

19.4 How can I clear the screen, or print things in inverse video, or move the cursor?

19.5 How do I read the arrow keys? What about function keys?

19.6 How do I read the mouse?

19.7 How can I do serial (``comm'') port I/O?

19.8 How can I direct output to the printer?

19.9 How do I send escape sequences to control a terminal or other device?

19.10 How can I do graphics?

19.11 How can I check whether a file exists?

19.12 How can I find out the size of a file, prior to reading it in?

19.13 How can a file be shortened in-place without completely clearing or rewriting it?

19.14 How can I insert or delete a line in the middle of a file?

19.15 How can I recover the file name given an open file descriptor?

19.16 How can I delete a file?

19.17 What's wrong with the call "fopen("c:\newdir\file.dat", "r")"?

19.18 How can I increase the allowable number of simultaneously open files?

19.20 How can I read a directory in a C program?

19.22 How can I find out how much memory is available?

19.23 How can I allocate arrays or structures bigger than 64K?

19.24 What does the error message ``DGROUP exceeds 64K'' mean?

19.25 How can I access memory located at a certain address?

19.27 How can I invoke another program from within a C program?

19.30 How can I invoke another program and trap its output?

19.31 How can my program discover the complete pathname to the executable from which it was invoked?

19.32 How can I automatically locate a program's configuration files in the same directory as the executable?

19.33 How can a process change an environment variable in its caller?

19.36 How can I read in an object file and jump to routines in it?

19.37 How can I implement a delay, or time a user's response, with sub-second resolution?

19.38 How can I trap or ignore keyboard interrupts like control-C?

19.39 How can I handle floating-point exceptions gracefully?

19.40 How do I... Use sockets? Do networking? Write client/server applications?

19.40b How do I use BIOS calls? How can I write ISR's? How can I create TSR's?

19.41 But I can't use all these nonstandard, system-dependent functions, because my program has to be ANSI compatible!