[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
General Programming Concepts: Writing and Debugging Programs

List of Programmer's Workbench Library Subroutines

The Programmers Workbench Library (libPW.a) contains routines that are provided only for compatibility with existing programs. Their use in new programs is not recommended. These interfaces are from AT&T PWB Toolchest.

any (Character, String) Determines whether String contains Character
anystr (String1, String2) Determines the offset in String1 of the first character that also occurs in String2
balbrk (String, Open, Close, End) Determines the offset in String of the first character in the string End that occurs outside of a balanced string as defined by Open and Close
cat (Destination, Source1, Source0) Concatenates the Source strings and copies them to Destination
clean_up ( ) Defaults the cleanup routine
curdir (String) Puts the full path name of the current directory in String
dname (p) Determines which directory contains the file p
fatal (Message) General purpose error handler
fdfopen (fd, Mode) Same as the stdio fdopen subroutine
giveup (Dump) Forces a core dump
imatch (pref, String) Determines if the string pref is an initial substring of String
lockit (LockFile, Count, pid) Creates a lock file
move (String1, String2, n) Copies the first n characters of String1 to String2
patoi (String) Converts String to integer
patol (String) Converts String to long.
repeat (Destination, String, n) Sets Destination to String repeated n times
repl (String, Old, New) Replaces each occurrence of the character Old in String with the character New
satoi (String, *ip) Converts String to integer and saves it in *ip
setsig ( ) Causes signals to be caught by setsig1
setsig1 (Signal) General purpose signal handling routine
sname (String) Gets a pointer to the simple name of full path name String
strend (String) Finds the end of String.
trnslat (s, old, new, Destination) Copies string s into Destination and replace any character in old with the corresponding characters in new
unlockit (lockfile, pid) Deletes the lock file
userdir (uid) Gets the user's login directory
userexit (code) Defaults user exit routine
username (uid) Gets the user's login name
verify (String1, String2) Determines the offset in string String1 of the first character that is not also in string String2
xalloc (asize) Allocates memory
xcreat (name, mode) Creates a file
xfree (aptr) Frees memory
xfreeall ( ) Frees all memory
xlink (f1, f2) Links files
xmsg (file, func) Calls the routine fatal with an appropriate error message
xpipe (t) Creates a pipe
xunlink (f) Removes a directory entry
xwrite (fd, buffer, n) Writes n bytes to the file associated with fd from buffer
zero (p, n) Zeros n bytes starting at address p
zeropad (s) Replaces the initial blanks with the character 0 (zero) in string s

File

/usr/lib/libPW.a Contains routines provided only for compatibility with existing programs

Related Information

Subroutines Overview


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]