STDLIB32 v0.10 (c) Ng Yew Choong 1995 arjuna/sad little people 1.0 INTRODUCTION ---------------- This is just a simple set of routines to make life programming for PMC (Tran's protected mode extender for BC4++) easier. Basically, I wrote this so that I could at least do a printf using Tran's package. But, it seems like I had to write a few extra routines to support printf. Anyway, most of the code here is quite PMC independent, but bearing in mind that some assumptions were made due to PMC's mode of operation. Anyway, this rag-tag library is yet to be complete, I hope to at least bring up an ANSI C library for PMC. Anyone care to help? 1.1 SYSTEM REQUIREMENTS ----------------------- STDLIB32 requires Tran's PMC header. 1.2 COPYING ----------- The STDLIB32 library was coded by Ng Yew Choong. Feel free to use, copy and distribute this software however you wish. Use it in your programs any way you wish. Just send me an e-mail message, if you find it of any use at all. 1.3 STANDARD DISCLAIMER ----------------------- All software and documentation associated with the STDLIB32 library is provided "as is": ie., it is provided wihout warranty of any kind, not even an implied warranty of merchantability or fitness for any purpose. I will in no way be held liable for any loss of profit or any other commercial damage including but not limited to special, incidental, consequential or other damages from use of this software. 2.0 THE STDLIB32 LIBRARY ------------------------ In its current incarnation, it is pretty pathetic, but sprintf more than makes up for it. Source code is included. I guess you may modify it for your own use. Pretty simple stuff here, should be portable for other 32-bit environments. Sorry the source code's got no comments. Too lazy... :) I like TASM's IDEAL/C mode a lot, you will notice it in my source code, because of that, I had to modify Tran's PMC.INC to suit my tastes. The modified PMC.INC is included with the archive. I haven't really tested the library much, so there might be a few bugs here and there. In any case, if you find any, please tell me, thanks! Enjoy! 2.1 LIBRARY FUNCTIONS --------------------- ctype: (ANSI) int isalnum(char c); int isalpha(char c); int isascii(char c); int iscntrl(char c); int isdigit(char c); int isgraph(char c); int islower(char c); int isprint(char c); int ispunct(char c); int isspace(char c); int isupper(char c); int isxdigit(char c); int _toupper(char c); int _tolower(char c); stdlib: (ANSI) int _itoa(int num, STR str, int radix, int sign, int prec); int _atoi(STR str, int radix); These are the transitory (actually very much enhanced) versions of atoi and itoa. Haven't bothered to put up an ANSI interface... stdio: (ANSI) int sprintf(STR buff, STR fmt, ...); Currently supports only these types: diouxcs%nP (i'm ignoring X for the time being). arg: (non-ANSI) extern int argc; extern char *argv[]; int get_args(void); This is to grab command-line arguments. Call get_args() once, at the very start of your program. The arguments will be put into *argv[] and the argument count will be in argc. It behaves a bit differently from standard argument parsing, it supports argument "quoting". tty: (non-ANSI) int tty_putchr(int c); int tty_putstr(PTR str); int tty_putstr_raw(PTR str); Uses BIOS to display text. tty_putstr() maps LF to CRLF, tty_putstr_raw() does not. 3.0 END ------- 3.1 ACKNOWLEDGEMENTS -------------------- Tran for his fantastic PMODE extender Mandar A. Chitre 3.2 CONTACTING ME ----------------- I can be reached via INTERNET e-mail: nick@raffles0005.pc.nus.sg eng30394@nus.sg