The SNIPPETS Portable C Source Code Archive
Tuesday, 09-Feb-2010, 05:34:15 GMT
Last updated: 26-Nov-2007, 15:45:38 GMT

Archivist: Bob Stout

Back
O/S code: DOSDOS
UnxUnix
MacMacintosh
W32Win32
D/WDOS and Win32
NovNovell
DNtGeneral DOS network
anyGenerally portable
n/anot applicable

A minimum screen size of 600 x 800 is recommended
for viewing the SNIPPETS file browser




Index

Back to index General-purpose header files
File Mod Date O/S Description
Ascii.H 16-Sep-2003 any Convenient enumeration for ASCII control characters
Big_Mall.H 16-Sep-2003 D/W Portably allocate memory > 64Kb
Cast.H 16-Sep-2003 any Cast any object to any type
Dirport.How 16-Sep-2003 any Brief tutorial on DIRPORT.H and DIRPORT.C
Dirport.H 16-Sep-2003 any Write portable directory code for various compilers & OS's
Dirport.C 16-Sep-2003 any DOS, Win32 and Unix/Linux (sic!) support functions for DIRPORT.H
Extkword.H 16-Sep-2003 any Correct extended keywords syntax
Hilobyte.H 16-Sep-2003 any Extract high, low bytes from an int
Mk_Fp.H 16-Sep-2003 D/W Makes sure the Intel MK_FP() macro is defined
Minmax.H 16-Sep-2003 any Macros & typesafe C++ templates for min() and max()
Metric.H 16-Sep-2003 any English <-> Metric and other conversion macros
Pi.H 01-Dec-2003 any Useful definitions using PI
Round.H 16-Sep-2003 any Rounding macros
Sniptype.H 16-Sep-2003 any Common include file for SNIPPETS data types and macros
Stat.H 16-Sep-2003 D/W Posix compliant sys/stat additions
Stringiz.H 16-Sep-2003 any Macros to use the ANSI/ISO preprocessor "stringize" macro

Back to index Miscellaneous C-callable functions
File Mod Date O/S Description
A2E.H 27-Aug-2004 any Header file for A2E.C
A2E.C 27-Aug-2004 any ASCII <=> EBCDIC conversions
Toascii.C 16-Sep-2003 any EBCDIC-ASCII conversion arrays
Bastrngs.H 16-Sep-2003 any Header file for BASTRNGS.C
Bastrngs.C 16-Sep-2003 any BASIC-like string functions
Ccard.H 16-Sep-2003 any Header file for credit card validation functions
Ccard.C 16-Sep-2003 any Credit card validation functions
Ccardplv.H 16-Sep-2003 any Patch level include file for credit card validation
Ctrlprnt.H 16-Sep-2003 any Header file for CTRLPRNT.C
Ctrlprnt.C 16-Sep-2003 any Print a line, displaying Ctrl characters
Errors.H 16-Sep-2003 any Header file for SNIPPETS formatted error handlers
Err_Exit.C 16-Sep-2003 any Print formatted error message to stderr and exit
Ferrorf.C 16-Sep-2003 any Has ferrorf() and cant() for formatted error messages
Fscanbin.H 16-Sep-2003 any Header file for FSCANBIN.C
Fscanbin.C 16-Sep-2003 any Scan binary fields via format string
Isisbn.H 16-Sep-2003 any Header file for ISISBN.C
Isisbn.C 16-Sep-2003 any Validate ISBN (book) numbers
Memrev.H 16-Sep-2003 any Header file for MEMREV.C
Memrev.C 16-Sep-2003 any Assymetrical memory swap
Rolldice.H 16-Sep-2003 any Header file for ROLLDICE.C
Rolldice.C 16-Sep-2003 any Roll specified # of dice, each with speficied # of faces
Strucfil.H 16-Sep-2003 any Header file for STRUCFIL.C
Strucfil.C 16-Sep-2003 any Read/write structures to/from a file
Windchil.H 16-Sep-2003 any Header file for WINDCHIL.C
Windchil.C 16-Sep-2003 any Compute wind chill factor

Back to index Extensible C to determine which archiver was used on a packed file
File Mod Date O/S Description
Whicharc.Doc 16-Sep-2003 n/a Information about archive detection
Whicharc.H 16-Sep-2003 any Prototype declarations for WHICHARC.CPP

Back to index Functions to read configuration files
File Mod Date O/S Description
Ini.H 16-Sep-2003 any Header file for INI.C
Ini.C 16-Sep-2003 any Read Win-style (i.e. with section headers) initialization file data
Cfg.H 16-Sep-2003 any Header file for CFG.C
Cfg.C 16-Sep-2003 any Read configuration file data
Cfg.Tst 16-Sep-2003 any Test data file for CFG.C #ifdef TEST section
Initvars.H 16-Sep-2003 any Header file for INITVARS.C
Initvars.C 16-Sep-2003 any Read data into variables
Initvars.Tst 16-Sep-2003 any Test data file for INITVARS.C #ifdef TEST section

Back to index Portable file operations
File Mod Date O/S Description
Snipfile.H 16-Sep-2003 any Header for portable file functions
Ansiflen.C 16-Sep-2003 any ANSI-compliant file size function in C and C++
Existsx.C 16-Sep-2003 any POSIX-compliant functions to search paths for files
Fcompare.C 16-Sep-2003 any Compare 2 files for equality
Fopenx.C 16-Sep-2003 any Open files using EXISTSX.C path conventions
Srchfile.C 16-Sep-2003 any Search files for text, forwards or backwards
Textmod.C 16-Sep-2003 D/O Demo how to change lines in a text file
Wb_Fcopy.C 16-Sep-2003 any Fast file copy
Wb_Fapnd.C 16-Sep-2003 any Fast file append
Update.H 16-Sep-2003 any Header file for UPDATE.C
Update.C 16-Sep-2003 any Automate .BAK file generation
Redirect.H 16-Sep-2003 any Header file for Redirect.C
Redirect.C 16-Sep-2003 any General purpose I/O redirection functions

Back to index Assorted string manipulation functions, some unique, some for porting
File Mod Date O/S Description
Snip_Str.H 16-Sep-2003 any Header file for SNIPPETS string functions
Pluraltx.How 16-Sep-2003 any How the plural text macros in SNIP_STR.H work
Memmem.C 16-Sep-2003 any Like strstr(), but for non-text buffers
Fmemmem.C 16-Sep-2003 DOS Like memmem() above, but for large DOS buffers
Sstrcpy.C 16-Sep-2003 any Overlapping strcpy() and strcat() work-alikes
Sstrdel.C 16-Sep-2003 any Delete multiple substrings from a string
Stptok.C 04-Mar-2004 any Improved tokenizing function
Strchcat.C 16-Sep-2003 any Append a single character to a string
Strdel.C 16-Sep-2003 any Delete a section of a string
Strdelch.C 16-Sep-2003 any Delete specific character(s) in a string
Strdup.C 16-Sep-2003 any Portable strdup()
Strecpy.C 16-Sep-2003 any Like strcpy, but returns pointer to NUL
Stristr.C 16-Sep-2003 any Case-insensitive strstr() work-alike
Strrepl.C 16-Sep-2003 any Replace substrings
Strrev.C 16-Sep-2003 any Reverse a string in place using XOR swapping
Strrpbrk.C 16-Sep-2003 any Like ANSI/ISO strpbrk(), but searches from end of string
Strupr.C 16-Sep-2003 any Portable strupr() strlwr()
Translat.C 16-Sep-2003 any Translate string w/ C-style escape sequences
Xstrcat.C 16-Sep-2003 any String concatenation function
Ruleline.C 16-Sep-2003 any Create various styles of text ruler lines
Rmallws.C 16-Sep-2003 any Remove all whitespace from a string
Rmlead.C 16-Sep-2003 any Remove leading whitespace from a string
Rmtrail.C 24-Sep-2003 any Remove trailing whitespace from a string
Notrail.C 24-Sep-2003 any Remove trailing whitespace from a string in a single pass
Trim.C 16-Sep-2003 any Trim leading, trailing, & embedded spaces
Lv1Ws.C 16-Sep-2003 any Convert all whitespace in a string to single spaces
Permute1.C 16-Sep-2003 any Returns permutations of an input string
Permute2.C 16-Sep-2003 any Print all permutations of an input sting

Back to index Assorted (sic) sorting functions
File Mod Date O/S Description
Snipsort.H 16-Sep-2003 any Header file for SNIPPETS sorting functions
Hugesort.C 16-Sep-2003 DOS Quicksort using huge pointers
Ll_Msort.C 16-Sep-2003 any Linked list mergesort
Ll_Qsort.C 16-Sep-2003 any Linked list quicksort
Rg_Isort.C 16-Sep-2003 any Insertion sort function
Rg_Qsort.C 16-Sep-2003 any Non-Recursive ANSI/ISO quicksort function
Rgiqsort.C 16-Sep-2003 any Recursive ANSI/ISO quicksort function
Rg_Ssort.C 16-Sep-2003 any ANSI/ISO quicksort-compatible shellsort function
Strsort.C 16-Sep-2003 any (Shell) Sort a string array
Binsrch.H 16-Sep-2003 any Header for binary searchfunctions in C & C++
Binsrch.C 16-Sep-2003 any Binary search in C & C++

Back to index Mark Corgan's functions for indexing and looking up data in text files
File Mod Date O/S Description
Indxlook.H 16-Sep-2003 any Header for INDEX.C and LOOKUP.C
Index.C 16-Sep-2003 any Create a binary searchable index file from a text file
Lookup.C 16-Sep-2003 any Search a text file using a binary search index

Back to index Assorted math functions
File Mod Date O/S Description
Snipmath.H 16-Sep-2003 any Header file for SNIPPETS math functions
Dtotp6.H 16-Sep-2003 DOS Header file for DTOTP6.C
Dtotp6.C 16-Sep-2003 DOS Convert between Turbo Pascal 6-byte reals and C doubles
Bcdl.C 16-Sep-2003 any BCD math (to/from long) functions
Bcdd.C 16-Sep-2003 any BCD math (to/from double) functions
Bcdd.Doc 16-Sep-2003 n/a Manual pages for BCDD.C functions
Combin.C 16-Sep-2003 any Compute combinations without overflow
Cubic.C 16-Sep-2003 any Solve cubic equations
Dbl2Long.C 16-Sep-2003 any Rounds doubles to longs
Dblround.C 16-Sep-2003 any Rounds a double to nearest whole number
Dblround.How 16-Sep-2003 any How DBLROUND.C works
Etphi.C 16-Sep-2003 any Compute Euler's Totient function (phi)
Factoryl.C 16-Sep-2003 any Factorial, combinations, permutations
Fibo.C 16-Sep-2003 any Return any term in the Fibonacci series
Frand.C 16-Sep-2003 any Return random double in the range of 0.0 to 1.0
Ipow.C 16-Sep-2003 any Raise a number to an integer power
Ispow2.C 16-Sep-2003 any Is a number an integral power of 2?
Isqrt.C 16-Sep-2003 any Integer square root
Ldfloor.C 16-Sep-2003 any Long double floor
Logscale.C 16-Sep-2003 any Fast logarithmic integer scaling function
Msb2Ieee.C 16-Sep-2003 any Convert MSBIN format to/from IEEE float
Perm_Idx.C 16-Sep-2003 any Determine permutation index
Rad2Deg.C 16-Sep-2003 any Convert radians <=> degrees
Rnd_Div.C 16-Sep-2003 any Integer division with rounding
Parity.H 16-Sep-2003 any Header for PARITY.C
Parity.C 16-Sep-2003 any Compute parity for any integral type
Triglib.H 16-Sep-2003 any Header file for TRIGLIB.C
Triglib.C 16-Sep-2003 any Comprehensive trig functions in radians, degrees, grads

Back to index Bob Stout's statistical analysis package
File Mod Date O/S Description
Mathstat.H 16-Sep-2003 any Header file for statistical functions in C and C++
Mathstat.C 16-Sep-2003 any Statistical functions in C and C++

Back to index Random number functions
File Mod Date O/S Description
Rand1.C 16-Sep-2003 any Random number generator
Rand2.C 16-Sep-2003 any Random number generator
Rg_Rand.C 16-Sep-2003 any Minimal random number generator

Back to index Cliff Rhodes' package of unsigned integer math for arbitrarily large numbers
File Mod Date O/S Description
Bignum.H 16-Sep-2003 any Header declaring the BigNum struct and prototypes
Bignum1.C 16-Sep-2003 any Add, subtract, and multiply BigNum's
Bignum2.C 16-Sep-2003 any Divide BigNum's
Bigtest.C 16-Sep-2003 any Test and demo program using BigNum's

Back to index Various ways of computing PI to ridiculous lengths
File Mod Date O/S Description
Spigot.C 16-Sep-2003 any Calculate PI to ~1,000 digits using integer math
Pi.C 16-Sep-2003 any Calculate PI to 8,000+ digits
Pi8.C 16-Sep-2003 any Another PI calculator
Pi8.Nfo 16-Sep-2003 any A discourse on the PI8.C algorithm
Pi_Agm.C 16-Sep-2003 any Calculate PI to 10's of thousands of digits

Back to index Numerical <=> string conversion functions
File Mod Date O/S Description
Numcnvrt.H 16-Sep-2003 any Header for SNIPPETS numerical <=> string conversions
Bascnvrt.C 16-Sep-2003 any Convert radix of a numeric string
Commaflt.C 16-Sep-2003 any Format doubles using commas and variable precision
Commafmt.C 16-Sep-2003 any Format long integers using commas
Eng.C 16-Sep-2003 any Convert floating point value to engineering notation
Eval.C 16-Sep-2003 any Simple arithmetic expression evaluator
Eval.How 16-Sep-2003 any How EVAL.C works
Fmtmoney.C 16-Sep-2003 any Format US dollar amounts into text strings
Hexorint.C 16-Sep-2003 any Auto-convert hex or decimal strings
Hstr_I.C 16-Sep-2003 any Convert hex string to int
Ltoa.C 16-Sep-2003 any Convert long to a string
Ltostr.C 16-Sep-2003 any A safer version of ltoa()
Ord_Text.C 16-Sep-2003 any Format ordinal numbers in English
Scanfrac.C 16-Sep-2003 any Scans/converts text fractions
Str27Seg.C 16-Sep-2003 any Convert numeric string to 7-segment displays
L2Roman.C 16-Sep-2003 any Convert long integers to roman numerals
Roman2L.C 16-Sep-2003 any Convert roman numerals to long integers

Back to index Multi-dimensional array functions
File Mod Date O/S Description
Snparray.H 16-Sep-2003 any Header for multi-dimentional array functions
Amalloc.C 16-Sep-2003 any Multi-dimensional array allocation (limited to <64K on PC)
Mdalloc.C 16-Sep-2003 any Multi-dimentional array allocte and free (any size)
Mdasort.C 16-Sep-2003 any Test program demonstrating array sorting

Back to index Bit-level operations
File Mod Date O/S Description
Bitops.H 20-Sep-2003 any Prototypes, plus macros to set, clear, and test bits
Bitops.How 16-Sep-2003 any How the BitXxx() macros in BITOPS.H work
Bitarray.C 20-Sep-2003 any Bit array functions
Bitcnt_1.C 16-Sep-2003 any Count bits in a number (fast, clever)
Bitcnt_2.C 16-Sep-2003 any Count bits in a number (fascinating)
Bitcnt_3.C 16-Sep-2003 any Count bits in a number (table look-up)
Bitcnt_4.C 16-Sep-2003 any Count bits in a number (recursive table look-up)
Bitcnts.C 16-Sep-2003 any Benchmark to test BITCNT_x.C functions
Bitfiles.C 16-Sep-2003 any Read/write bit files
Bitstrng.C 16-Sep-2003 any Print binary formatted strings
Bstr_I.C 16-Sep-2003 any Convert binary string to int

Back to index Auke Reitsma's comprehensive linked list functions
File Mod Date O/S Description
Llist.Nts 16-Sep-2003 any Notes on linked list functions
Ll_Defs.H 16-Sep-2003 any Common includes and macros
Lls.H 16-Sep-2003 any Singly linked list header
Lls_Blob.H 16-Sep-2003 any Singly linked list for Binary Large OBjects
Lls_Str.H 16-Sep-2003 any Singly linked list for strings
Ll_Que.H 16-Sep-2003 any Singly linked list as queue
Ll_Stack.H 16-Sep-2003 any Singly linked list as stack
Lld.H 16-Sep-2003 any Doubly linked list header
Lld_Blob.H 16-Sep-2003 any Doubly linked list for Binary Large OBjects
Lld_Str.H 16-Sep-2003 any Doubly linked list for strings
Lls.C 16-Sep-2003 any Singly linked list functions
Lls_Blob.C 16-Sep-2003 any Singly linked list BLOB functions
Lld.C 16-Sep-2003 any Doubly linked list functions
Lld_Blob.C 16-Sep-2003 any Doubly linked list BLOB functions
Stack.H 16-Sep-2003 any Header for stack management functions
Stk_Defs.H 16-Sep-2003 any Common definitions and debugging macros
Stack.C 16-Sep-2003 any Stack management functions
Stk_Blob.H 16-Sep-2003 any Header for stack management of Binary Large OBjects
Stk_Str.H 16-Sep-2003 any Header for stack management of strings as BLOB's
Stk_Blob.C 16-Sep-2003 any Stack management functions for Binary Large OBjects
Ll_Demo.C 16-Sep-2003 any Demonstration of linked list functions in action

Back to index Auke Reitsma's finite state machine (FSM) functions
File Mod Date O/S Description
Fsm.H 16-Sep-2003 any Header file for simplified FSM implementation
Fsm.C 16-Sep-2003 any Simplified FSM implementation

Back to index Frank Mitchell's "Bushy" (B-tree) package
File Mod Date O/S Description
Bushv055.Txt 16-Sep-2003 any Bushy Tree documentation
B-License.Txt 16-Sep-2003 any Bushy Tree free license
Bstuff.H 16-Sep-2003 any Bushy Tree header file
Btree.C 16-Sep-2003 any Bushy Tree primary functions
Treescan.C 16-Sep-2003 any Code for traversing a Bushy Tree
Btree.Mak 16-Sep-2003 any Bushy Tree (gnu) make file
Maintest.C 16-Sep-2003 any Bushy Tree test/demo program
Maintest.Bat 16-Sep-2003 any Test/demo DOS/Win build script

Back to index Peter Yard's double ended queue functions
File Mod Date O/S Description
Deque.H 16-Sep-2003 any Header file supporting queues, stacks, FIFOs
Deque.C 16-Sep-2003 any Functions, including sort and search

Back to index Bob Stout's fast and simple double ended queue functions
File Mod Date O/S Description
Qq.H 16-Sep-2003 any Header file supporting queues, stacks, FIFOs
Qq.C 16-Sep-2003 any Essential queue, stack, & FIFO functions
Qqd.H 16-Sep-2003 any Header file supporting specialized version of QQ for doubles
Qqd.C 16-Sep-2003 any Essential queue, stack, & FIFO functions for doubles

Back to index Dustin Puryear's stack managment functions
File Mod Date O/S Description
Stk.H 16-Sep-2003 any Header for stack manager
Stk.C 16-Sep-2003 any Stack manager - init, push, pop, count

Back to index Jerry Coffin's hash table functions
File Mod Date O/S Description
Hash.H 16-Sep-2003 any Header for hash table functions
Hash.C 16-Sep-2003 any Hash table management

Back to index J. Kercheval's PD regular expression comparator
File Mod Date O/S Description
Match.Doc 16-Sep-2003 any Documentation for Match.C
Match.H 16-Sep-2003 any Header file
Match.C 16-Sep-2003 any Portable source including optional test code

Back to index Functions to match similar sounding strings
File Mod Date O/S Description
Phonetic.H 16-Sep-2003 any Header for all phonetic comparison functions
Soundex.C 16-Sep-2003 any Standard English soundex
Soundex4.C 16-Sep-2003 any English soundex optimized for use with surnames
Soundex5.C 16-Sep-2003 any Another soundex variant
Metaphon.C 16-Sep-2003 any Phonetic string matching: English, but better than soundex
Approx.C 09-Mar-2004 any Fuzzy string search

Back to index Ray Gardner's scalar date functions plus other date and time functions
File Mod Date O/S Description
Scaldate.H 16-Sep-2003 any Scalar ("Julian") date header
Scaldate.C 16-Sep-2003 any Scalar ("Julian") date functions
Daynum.C 16-Sep-2003 any Return statistics about a given date
Isdst.C 16-Sep-2003 any Determine if a given date is in Daylight Savings Time
Today.C 16-Sep-2003 any Return today's date as a scalar value
Dow.C 16-Sep-2003 any Return day of the week for any date
Fdate.C 16-Sep-2003 Dnt Return DOS file date as a scalar value
Cal.C 16-Sep-2003 any Calendar using Scaldate.C
Datetime.H 16-Sep-2003 any Header for other time and date functions
Jdn_L.C 16-Sep-2003 any Long integer Julian Day Number computation
Addtime.C 16-Sep-2003 any Add two times (hh:mm:ss) together, normalizing the result
Easter.C 16-Sep-2003 any Determine the date of Easter in any given year
Moon_Age.C 16-Sep-2003 any Determine the phase of the moon for any given date
Parsdate.C 16-Sep-2003 any Parse a date string
Parstime.C 16-Sep-2003 any Parse a time string
Strftime.H 16-Sep-2003 any Header file for STRFTIME.C
Strftime.C 16-Sep-2003 any Non-locale version of ANSI/ISO strftime()

Back to index Jerry Coffin's word wrapping functions
File Mod Date O/S Description
W_Wrap.H 16-Sep-2003 any C header w/ prototypes and enum'ed constants
W_Wrap.C 16-Sep-2003 any C functions
Center.C 16-Sep-2003 any Center a wrapped line

Back to index Various CRC and checksum functions
File Mod Date O/S Description
Crc.Txt 16-Sep-2003 n/a CRC calculation tutorial
Crc.H 16-Sep-2003 any Header file for SNIPPETS CRC and checksum functions
Arccrc16.C 16-Sep-2003 any Compute CRC's using ARC, LZH algorithm
Crc_16.C 16-Sep-2003 any Calculated 16-bit CRC
Crc_16F.C 16-Sep-2003 any Fast 16-bit CRC
Crc_32.C 16-Sep-2003 any Table lookup 32-bit CRC
Checksum.C 16-Sep-2003 any Calculate checksum
Checkexe.C 16-Sep-2003 DOS Checksum protection for executable files

Back to index Craig Morrison's registration key functions
File Mod Date O/S Description
Regkey.H 16-Sep-2003 any Header file for REGIT.C and CHKREG.C
Regit.C 16-Sep-2003 any Generate registration key
Chkreg.C 16-Sep-2003 any Validate registration key

Back to index Bob Stout's functions to get command line options
File Mod Date O/S Description
Getopts.Man 16-Sep-2003 n/a Manual for using getopts()
Getopts.H 16-Sep-2003 any Header for Getopts.C
Getopts.C 26-Nov-2007 any Scan command line for switches, filenames, response files
Getoptst.C 16-Sep-2003 any Test program to exercise getopts()
Palnfilt.C 16-Sep-2003 any Palindrome filter, demo for Getopts.C
Getoptsl.Man 16-Sep-2003 n/a Manual for using getopts_lite()
Getoptsl.H 16-Sep-2003 any Header for getopts lite
Getoptsl.C 16-Sep-2003 any "Getopts Lite" - Smaller & simpler than full GETOPTS

Back to index String searching functions
File Mod Date O/S Description
Search.H 16-Sep-2003 any SNIPPETS Header for string searching functions
Pbmsrch.C 16-Sep-2003 any Pratt-Boyer-Moore string search
Bmhsrch.C 16-Sep-2003 any Case-sensitive Boyer-Moore-Horspool search
Bmhisrch.C 16-Sep-2003 any Case-insensitive Boyer-Moore-Horspool search
Bmhasrch.C 16-Sep-2003 any Case-insensitive BMH search w/ accented chars

Back to index Walter Bright's memory allocation debugging package
File Mod Date O/S Description
Mem.Txt 16-Sep-2003 n/a Information on the Mem package
Toolkit.H 16-Sep-2003 DOS Compiler-independent portability header
Mem.H 16-Sep-2003 DOS Mem package header
Mem.C 16-Sep-2003 DOS Mem package code

Back to index Jeff Dunlop's memory allocation debugging package
File Mod Date O/S Description
Jmalloc.H 16-Sep-2003 DOS Jmalloc package header
Jmalloc.C 16-Sep-2003 DOS Like MEM, more functions, check the copyright


Please support SNIPPETS!

©2001-2007 by Bob Stout, all rights reserved
All source code free as noted.
Tested with: Get Firefox Get MSIE . .

Support: Rapid PHP