1*da2e3ebdSchinThe advanced software technology department has been collecting useful C 2*da2e3ebdSchinroutines in a single library called libast. libast is used by nmake, the 3*da2e3ebdSchinnmake cpp (which is mainly based on another library (libpp)), CIA 4*da2e3ebdSchin(C information abstractor from Robin Chen), and a collection of other 5*da2e3ebdSchin/bin and /usr/bin commands that benefit from concentrating functionality 6*da2e3ebdSchinin libast. 7*da2e3ebdSchin 8*da2e3ebdSchinMore detail is available in the man pages. libast contains: 9*da2e3ebdSchin 10*da2e3ebdSchin (1) routines to support a generic environment for 11*da2e3ebdSchin a variety of UNIX operating system variants 12*da2e3ebdSchin 13*da2e3ebdSchin (2) routines that update standard libc routines 14*da2e3ebdSchin 15*da2e3ebdSchin (3) routines shared between several commands 16*da2e3ebdSchin 17*da2e3ebdSchinIf you already have nmake 2.0 or newer installed then use 18*da2e3ebdSchin`nmake install' from this directory, otherwise use 19*da2e3ebdSchinship/shipin from the root of the distribution directory tree. 20*da2e3ebdSchin 21*da2e3ebdSchinSome of the routines not found in section 3: 22*da2e3ebdSchin 23*da2e3ebdSchinhash: generic, scoped hash table support 24*da2e3ebdSchin 25*da2e3ebdSchin hashalloc create a hash table or push new scope 26*da2e3ebdSchin hashdump debug dump of one or all hash tables 27*da2e3ebdSchin hashfree free a hashalloc()'d table 28*da2e3ebdSchin hashlook low level name lookup 29*da2e3ebdSchin hashscan entry generator for scoped table scan 30*da2e3ebdSchin hashsize explicitly change table size (usually automatic) 31*da2e3ebdSchin hashwalk apply function to each table entry 32*da2e3ebdSchin memhash return hash code for n-char chunk of memory 33*da2e3ebdSchin strhash return hash code for null terminated string 34*da2e3ebdSchin 35*da2e3ebdSchininclude/ast: libast support headers 36*da2e3ebdSchin 37*da2e3ebdSchin align.h compile time type alignmnent support 38*da2e3ebdSchin dirent.h POSIX directory(3) interface definitions 39*da2e3ebdSchin error.h error() interface definitions 40*da2e3ebdSchin ftw.h ftwalk() interface definitions 41*da2e3ebdSchin hash.h hash*() interface definitions 42*da2e3ebdSchin ls.h strls() interface definitions 43*da2e3ebdSchin re.h re*() interface definitions 44*da2e3ebdSchin tar.h POSIX ustar format interface definitions 45*da2e3ebdSchin tm.h tm*() interface definitions 46*da2e3ebdSchin 47*da2e3ebdSchinmisc: 48*da2e3ebdSchin 49*da2e3ebdSchin cmdargs apply a sequence of cmd line option parsers 50*da2e3ebdSchin cmdopen like popen() but stdin and stdout are specified 51*da2e3ebdSchin cvtatoe convert ASCII to EBCDIC 52*da2e3ebdSchin cvtetoa convert EBCDIC to ASCII 53*da2e3ebdSchin error output generic error and trace messages 54*da2e3ebdSchin ftwalk an ftw(3) that works -- used in new tw(1) 55*da2e3ebdSchin getcwd uses $PWD if ok, doesn't use /bin/pwd 56*da2e3ebdSchin getshell return full path of shell for cmdopen() 57*da2e3ebdSchin ooptget optget() for obsolete ar(1) and tar(1) options 58*da2e3ebdSchin optget YA getopt(3) but no argc or error message output 59*da2e3ebdSchin pathaccess find file with specific acces on list of dirs 60*da2e3ebdSchin pathcanon canonicalize path name in place 61*da2e3ebdSchin pathcmd return full path name of executable using $PATH 62*da2e3ebdSchin pathroot determine `related root' directory for command 63*da2e3ebdSchin perror uses strerror() 64*da2e3ebdSchin readargs append each line of file to argv[0] 65*da2e3ebdSchin 66*da2e3ebdSchinre: egrep(1) and ed(1) style re's from V9 67*da2e3ebdSchin (not the good awk(1) algorithm) 68*da2e3ebdSchin 69*da2e3ebdSchin recomp compile re pattern 70*da2e3ebdSchin reerror report re*() errors 71*da2e3ebdSchin reexec match string using compiled re 72*da2e3ebdSchin resub ed(1) style substitute using last reexec() 73*da2e3ebdSchin 74*da2e3ebdSchinstring: 75*da2e3ebdSchin 76*da2e3ebdSchin chresc return next char in string converting \ sequences 77*da2e3ebdSchin ctoi convert char constant string to int 78*da2e3ebdSchin strcopy like strcpy(3) but returns end of destination 79*da2e3ebdSchin strdup malloc(3) and strcpy(3) smashed together 80*da2e3ebdSchin strerror return error message string given errno 81*da2e3ebdSchin stresc convert \ sequences in string in place 82*da2e3ebdSchin streval evaluate C expression in string 83*da2e3ebdSchin strls ls -l format support 84*da2e3ebdSchin strmatch Korn shell file pattern match 85*da2e3ebdSchin strmode return ls -l style output given st.st_mode 86*da2e3ebdSchin strsignal return signal id string given SIG* number 87*da2e3ebdSchin strtape convert generic tape unit to /dev/* file 88*da2e3ebdSchin token generate space separated tokens in string 89*da2e3ebdSchin 90*da2e3ebdSchintm: time conversion support 91*da2e3ebdSchin 92*da2e3ebdSchin tmdate convert date string to time_t 93*da2e3ebdSchin tmform format time_t to date string 94*da2e3ebdSchin tmmake return current time_t 95*da2e3ebdSchin tmtime convert struct tm to time_t 96