Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ programmers(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

logname

regcmp, regex

programmers workbench library

Purpose

     Provides subroutines for compatibility with existing pro-
     grams.

Library

     Programmers Workbench Library (libPW.a)

Description

     The libpw subroutines are provided only for compatibility
     with existing programs.  Their use in new programs is not
     recommended.

     any (c, s)
               Determines  whether the  string s  contains the
               character c.

     anystr (s1, s2)
               Determines the offset in string s1 of the first
               character that also occurs in string s2.

     balbrk (s, open, close, end)
               Determines the offset in  string s of the first
               character in the string end that occurs outside
               of  a balanced  string as  defined by  open and
               close.

     cat (dest, source1, . . . , 0)
               Concatenates the  source strings and  copy them
               to dest.

     clean_up ( )
               Defaults the cleanup routine.

     curdir (s)
               Puts the  full path name of  the current direc-
               tory in the string s.

     dname (p)
               Determines which directory contains the file p.

     fatal (msg)
               General purpose error handler.

     fdfopen (fd, mode)
               Same as the stdio fdopen subroutine.

     giveup (dump)
               Forces a core dump.

     imatch (pref, s)
               Determines  if the  string pref  is an  initial
               substring of the string s.

     index (s1, s2)
               Determines the  offset of the  first occurrence
               in string s1 of string s2.

     lockit (lockfile, count, pid)
               Creates a lock file.

     move (s1, s2, n)
               Copies the  first n characters of  string s1 to
               string s2.

     patoi (s)
               Converts string s to int.

     patol (s)
               Converts string s to long.

     rename (oldname, newname)
               Renames the file oldname to newname.

               Note:  The rename subroutine  is no longer part
               of the Programmers  Workbench Library (libPW.a)
               because AIX provides a  rename system call (see
               "rename") that performs the same function.

     repeat (dest, s, n)
               Sets dest to the string s repeated n times.

     repl (s, old, new)
               Replaces each  occurrence of the  character old
               in string s with the character new.

     satoi (s, ip)
               Converts string s to int and save it in *ip.

     setsig ( )
               Causes signals to be caught by setsig1.

     setsig1 (sig)
               General purpose signal handling routine.

     sname (s)
               Gets a pointer to the  simple name of full path
               name s.

     strend (s)
               Finds the end of the string s.

     substr (s, dest, origin, len)
               Places a  substring of  string s in  dest using
               the offset origin and the length len.

     trnslat (s, old, new, dest)
               Copies string s into dest and replace any char-
               acter 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 (s1, s2)
               Determines the offset in string s1 of the first
               character that is not also in string s2.

     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.

     xopen (name, mode)
               Opens a file.

     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)
               Zeroes n bytes starting at address p.

     zeropad (s)
               Replaces the initial  blanks with the character
               "'0'" in string s.

Related Information

     In this book:  "logname" and "regcmp, regex."

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026