[comp.os.os9] OS9Lib Part 01/05

ocker@lan.informatik.tu-muenchen.dbp.de (Wolfgang Ocker) (10/11/88)

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 5)."
# Contents:  README README.GERMAN MANIFEST LICENSE MAN umask.c
#   hostname.h strings.add.h regmagic.h regerror.c grp.h crypt.c man.h
#   stat.h mdir.h info.h regexp.h rndsalt.c MAN/Umask.prf
#   MAN/Getmuid.prf pwd.h MAN/Rename.prf utime.c MAN/Isatty.prf
#   MAN/Pipe.prf MAN/Ttyname.prf MAN/Random.prf bsearch.c
#   MAN/Perror.prf MAN/Getwd.prf MAN/Gethostname.prf MAN/Signal.prf
#   MAN/Getpass.prf MAN/Atime.prf MAN/Crypt.prf getmuid.c
#   MAN/Getlogin.prf MAN/Rnd.prf MAN/Change_passwd.prf MAN/Getargs.prf
#   MAN/Cuserid.prf MAN/Change_grppasswd.prf
# Wrapped by weo@recsys on Tue Oct 11 14:21:21 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(3578 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
X
XTOP Munich                                            Puchheim, Sep. 1988
X
X
XThis is the OS9Lib, a set of UNIX (tm) compatible library functions.
X
XSome highlights:
X
X  popen(), dup2(), complete password and group functions (!),
X  function for the module directory, utmp functions [getlogin()],
X  cuserid(), random functions, regular expressions (!), UNIX (tm)
X  compatible signal routines (!), SYSINFO (!).
X
X
XBTW: We don't know, whether we are allowed to post the crypt()
X     functions. For now, we have removed them. If somebody could
X     tell us that it is allowed, we will post the complete crypt()
X     routines.
X
XDocumentation: The documentation is in "proff" format. We have included
X               the "proff" formatter in this distribution. The printed
X               pages have nearly the size of the Microware documentation
X               so that you can include them into your compiler manual.
X
X
X
X
X        *************************************************************
X        *                                                           *
X        *  PLEASE SEND ANY BUG REPORTS/SUGGESTIONS/ENHANCEMENTS TO  *
X        *                                                           *
X        *      top@altger      (...!altnet!altger!top)              *
X        *                                                           *
X        *                            or                             *
X        *                                                           *
X        *      weo@recco       (...!pyramid!tmpmbx!recco!weo)       *
X        *                                                           *
X        *                            or                             *
X        *                                                           *
X        *      ud@nitmar       (...!pyramid!tmpmbx!nitmar!ud)       *
X        *                                                           *
X        *                            or                             *
X        *                                                           *
X        *      ram@ramsys      (...!pyramid!tmpmbx!ramsys!ram)      *
X        *                                                           *
X        *                            or                             *
X        *                                                           *
X        *      ocker@lan.informatik.tu-muenchen.dbp.de              *
X        *                                                           *
X        *************************************************************
X
X
X
X
X  + ------------------------------------------------------------------- +
X  | Please pay attention to the special notice in info.c on the SYSINFO |
X  |                             concept!                                |
X  + ------------------------------------------------------------------- +
X
X
X
X
X    Copyrights 1987, 1988 by Wolfgang Ocker, Puchheim,
X                             Ulli Dessauer, Germering,
X                             Reimer Mellin, Muenchen
X                             and:
X
X    utime():                      Michael Hoffmann, Muenchen
X    regular expression functions: The University of Toronto (Henry Spencer).
X    string, bsearch functions:    Terrence W. Holm
X    varargs.h:                    Bob Larson
X    random number functions:      have been distributed with the
X                                  "Berkley Fortune Database Program".
X                                  No copyright notice found.
X
X
XThe documentation (except for strings) was written by Ulli Dessauer with
Xhelp from Frank Kaefer and Reimer Mellin. 
X
X
X(weo)
END_OF_FILE
if test 3578 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'README.GERMAN' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README.GERMAN'\"
else
echo shar: Extracting \"'README.GERMAN'\" \(2034 characters\)
sed "s/^X//" >'README.GERMAN' <<'END_OF_FILE'
X
X
X
X
X
XTOP Muenchen                                      im Oktober 1988
X
X
X
X
X
XDie  hier  zur  Verfuegung  gestellte Software ist groesstenteils
Xurheberrechtlich  geschuetzt.  Wir moechten Sie darauf hinweisen,
Xdass  wir  keinerlei  kommerzielle Nutzung der von uns erstellten
XProgramme  dulden  werden. Zumindest in Deutschland scheint es ja
Xfast  schon  ueblich  zu  sein,  Software,  die man kostenlos zur
XNutzung  ueberlassen  bekommt,  weiter  zu  verkaufen,  z.B durch
Xeinen   sogenannten   "Public-Domain-Versand".   Das  ist  jedoch
Xunserer  Vorstellung,  wie  diese  Software weiterverteilt werden
Xsoll,  voellig  entgegengesetzt.  Wir haben viel Energie und Zeit
Xin   die  Erstellung  dieser  Software  investiert  und  uns  aus
Xvielerlei   Gruenden   zu  einer  nicht-kommerziellen  Weitergabe
Xentschlossen.     Wer     glaubt,    fuer    die    Arbeit    des
XDisketten-Kopierens  (ja,  wir wissen aus eigener Erfahrung, dass
Xdies  Arbeit ist) Geld verlangen zu muessen, soll es ganz lassen.
XOder genauer gesagt: Wir gestatten dies nicht.  
X
XEs  gibt  in  Deutschland  mindestens  eine  Firma,  die  mit dem
XVerkauf  von  Public-Domain-Software  fuer OS-9 sehr fragwuerdige
XGeschaefte  macht.  Von ihr wurde z.B. vor einem Jahr (wir wissen
Xnicht,  ob  dies  jetzt  auch noch gilt) der MicroEmacs 3.8i, der
Xdefinitiv  urheberrechtlich  geschuetzt ist (auf Lizenz-Gebuehren
Xverzichtet  der  Autor  jedoch),  fuer  fast  DM 400,-- verkauft.
XNicht  nur,  dass  dies  dem Willen des Autors widerspricht, auch
Xdie ahnungslosen Kaeufer werden geschaedigt.  
X
XWir  hoffen, dass Sie uns unterstuetzen. Wir haben noch viel vor.
XWenn   wir  jedoch  enttaeuscht  werden,  muessen  wir  ernsthaft
Xueberlegen,  ob wir nicht selber die kommerzielle Nutzung der von
Xuns  erstellten  Software uebernehmen. Dann kostet das alles Geld
Xund Sourcen gibt es auch nicht mehr.  
X
XAber  noch  sind wir guter Hoffung und wuenschen uns und vorallem
XIhnen, dass diese Software fuer Sie von Nutzen ist.  
X
X
X
X
XWolfgang Ocker, Ulli Dessauer
X(TOP Muenchen)
X
END_OF_FILE
if test 2034 -ne `wc -c <'README.GERMAN'`; then
    echo shar: \"'README.GERMAN'\" unpacked with wrong size!
fi
# end of 'README.GERMAN'
fi
if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MANIFEST'\"
else
echo shar: Extracting \"'MANIFEST'\" \(3933 characters\)
sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
X   File Name		Archive #	Description
X-----------------------------------------------------------
X LICENSE                    1	License agreement
X MAN                        1	Manuals ...
X MAN/Atime.prf              1	
X MAN/Bootdrive.prf          2	
X MAN/Change_grppasswd.prf   1	
X MAN/Change_passwd.prf      1	
X MAN/Crypt.prf              1	
X MAN/Cuserid.prf            1	
X MAN/Findmod.prf            2	
X MAN/Getargs.prf            1	
X MAN/Gethostname.prf        1	
X MAN/Getlogin.prf           1	
X MAN/Getmuid.prf            1	
X MAN/Getpass.prf            1	
X MAN/Getwd.prf              1	
X MAN/Group.prf              3	
X MAN/Isatty.prf             1	
X MAN/Mdir.prf               3	
X MAN/Passwd.prf             3	
X MAN/Perror.prf             1	
X MAN/Pipe.prf               1	
X MAN/Popen.prf              2	
X MAN/Random.prf             1	
X MAN/Rename.prf             1	
X MAN/Rnd.prf                1	
X MAN/Shell.prf              2	
X MAN/Signal.prf             1	
X MAN/Stat.prf               2	
X MAN/Strings.prf            2	
X MAN/Sysinfo.prf            3	
X MAN/Ttyname.prf            1	
X MAN/Umask.prf              1	
X MAN/Utmp.prf               3	
X MANIFEST                   1	This shipping list
X README                     1	Do it!
X README.GERMAN              1	Inportant notice for Germans
X atime.c                    2	Print time
X bootdrv.c                  2	Determine boot drive
X bsearch.c                  1	Binary search routines
X chgrppass.c                3	Change group password
X chpass.c                   3	Change password
X crypt.c                    1	Crypting
X cuserid.c                  2	Determine user ID
X findmod.c                  2	Find module
X getargs.c                  2	Separate arguments
X gethname.c                 2	Determine host name
X getinfo.c                  4	Display SYSINFO entries
X getlog.c                   2	Get login user ID
X getmuid.c                  1	Get module onwer's id
X getpass.c                  2	Read password from tty
X getwd.c                    2	Get working/execution directory
X grp.c                      3	Group functions
X grp.h                      1	Include for group
X hostname.h                 1	Include for gethostname()
X info.c                     5	SYSINFO
X info.h                     1	Include for SYSINFO
X infomod.h                  2	Include for SYSINFO
X isatty.c                   2	Is path on a tty/pipe?
X makefile                   2	Makefile
X man.c                      4	Print online manuals
X man.h                      1	Include for man
X mdir.c                     3	Module directory functions
X mdir.h                     1	Include for mdir
X perror.c                   4	Print error message
X pipe.c                     2	Pipe() and dup2()
X popen.c                    3	Pipe functions
X pw.c                       4	Password functions
X pwd.h                      1	Include for password functions
X regerror.c                 1	Regular expressions
X regexp.c                   5	Regular expressions
X regexp.h                   1	Regular expressions
X regmagic.h                 1	Regular expressions
X regsub.c                   2	Regular expressions
X rename.c                   2	Rename/copy a file
X rnd.c                      5	Random functions
X rndsalt.c                  1	Random functions
X setup.c                    4	SYSINFO setup program
X shell.c                    3	Call a shell
X signal.a                   3	Signal functions
X stat.c                     2	stat(), fstat()
X stat.h                     1	Include file for stat(), fstat()
X strings.add.h              1	Include file for string functions
X strings.c                  3	String functions
X ttynam.c                   2	Determine tty name
X umask.c                    1	Dummy umask()
X utime.c                    1	Set file modification time
X utmp.c                     4	Utmp functions
X utmp.h                     2	Include file for utmp functions
X varargs.h                  2	Include file for VARARGS
END_OF_FILE
if test 3933 -ne `wc -c <'MANIFEST'`; then
    echo shar: \"'MANIFEST'\" unpacked with wrong size!
fi
# end of 'MANIFEST'
fi
if test -f 'LICENSE' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'LICENSE'\"
else
echo shar: Extracting \"'LICENSE'\" \(3762 characters\)
sed "s/^X//" >'LICENSE' <<'END_OF_FILE'
X
X
X
X
X
X
X                  OS9LIB General Public License
X
X          (C) Copyright 1986, 1987, 1988 by Dave Taylor
X
X                   Software copyright (c) 1988
X   by Wolfgang Ocker, Ulli Dessauer, Reimer Mellin and others
X
X                        COPYING POLICIES
X
XPermission  is  hereby  granted  for  copying and distribution of
Xcopies  of the OS9Lib source files, and that of any part thereof,
Xsubject to the following  license conditions: 
X
X     1. You  may, without additional permission from the authors,
X        distribute   the OS9Lib or components of the OS9Lib, with
X        or  without  additions  developed by  you or by others at
X        no  charge.  You  may  also  distribute  the OS9Lib along
X        with  any  other product for sale, provided that the cost
X        of  the   bundled  package  is  the  same  regardless  of
X        whether  the  OS9Lib is included, and provided that those
X        interested  only  in the OS9Lib must be notified  that it
X        is a product freely available from the authors (TOP).  
X
X     2. Furthermore,  if  you  distribute  the OS9Lib or parts of
X        the  OS9Lib,  with  or without additions developed by you
X        or  others,  then  you  must   either  make available the
X        source  to  all portions of the OS9Lib  (exclusive of any
X        additions  made  by  you  or by others) upon request,  or
X        instead  you  may notify anyone requesting source that it
X        is  freely available from the authors (TOP).  
X
X     3. In  addition,  you  may  not  omit  any  of the copyright
X        notices  on either the source files, the executable file,
X        or the  documentation, and 
X
X     4. Also,  you  may  not  omit  transmission  of this License
X        agreement  with  whatever portions of the OS9Lib that are
X        distributed.  
X
X     5. Lastly,  any users of this software must be notified that
X        it  is  without  warrantee  or  guarantee  of any nature,
X        express  or  implied,   nor  is there any fitness for use
X        represented.  
X
X        Software  is  a malleable thing and the authors can in no
X        way  guarantee  that  using  this  program will not cause
X        grevious  damage  to  your  system.  Of course this isn't
X        anticipated,  but  if  it does happen, the authors cannot
X        be  held  liable  for  any  damages  either  directly  or
X        indirectly caused by this event.  
X
X
X        Modification  of the system is encouraged, providing that
X        the  portions  of   the system that are from the original
X        still  carry  the  appropriate copyright notices and that
X        the  changed  sections are clearly delimited as such. The
X        authors  request  copies  of  any  changes made to ensure
X        that  the  various  versions stay reasonably in sync with
X        each other.  
X
XNOTE  that it is not permitted to copy, sublicense, distribute or
Xtransfer   any   of  the  OS9Lib  software  except  as  expressly
Xindicated   herein.   Any   attempts  to  do  otherwise  will  be
Xconsidered  a  violation  of  this license and your rights to the
XOS9Lib software will be voided.  
X
X
XComments  on  the  OS9Lib  and/or  this  licensing  agreement  is
Xencouraged.          Send        electronic        mail        to
X"ocker@lan.informatik.tu-muenchen.dbp.de".    This   license   is
Xoriginally  written by Dave Taylor with help from Scott McGregor.
XThanks Dave and Scott! 
X
X
X
XIMPORTANT: 
X
XThis   License   agreement   is   not  valid  for  the  following
Xsources/programs: 
X
X    string functions in strings.c
X    bsearch functions in bsearch.c
X    regular expression function in reg*.?
X    random functions in rnd.c
X    crypt functions in crypt.c
X    varargs.h
X
XPlease refer to the copyright notices in these files.
X
END_OF_FILE
if test 3762 -ne `wc -c <'LICENSE'`; then
    echo shar: \"'LICENSE'\" unpacked with wrong size!
fi
# end of 'LICENSE'
fi
if test ! -d 'MAN' ; then
    echo shar: Creating directory \"'MAN'\"
    mkdir 'MAN'
fi
if test -f 'umask.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'umask.c'\"
else
echo shar: Extracting \"'umask.c'\" \(29 characters\)
sed "s/^X//" >'umask.c' <<'END_OF_FILE'
Xint umask()
X{
X  return(0);
X}
END_OF_FILE
if test 29 -ne `wc -c <'umask.c'`; then
    echo shar: \"'umask.c'\" unpacked with wrong size!
fi
# end of 'umask.c'
fi
if test -f 'hostname.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'hostname.h'\"
else
echo shar: Extracting \"'hostname.h'\" \(72 characters\)
sed "s/^X//" >'hostname.h' <<'END_OF_FILE'
X/*
X * hostname.h
X */
X#define HNAMELEN (11)
Xextern char *gethostname();
X
END_OF_FILE
if test 72 -ne `wc -c <'hostname.h'`; then
    echo shar: \"'hostname.h'\" unpacked with wrong size!
fi
# end of 'hostname.h'
fi
if test -f 'strings.add.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'strings.add.h'\"
else
echo shar: Extracting \"'strings.add.h'\" \(108 characters\)
sed "s/^X//" >'strings.add.h' <<'END_OF_FILE'
X/* add to DEFS/strings.h */
X
Xextern int  strcspn(), strspn();
Xextern char *strpbrk(), *strstr(), *strtok();
END_OF_FILE
if test 108 -ne `wc -c <'strings.add.h'`; then
    echo shar: \"'strings.add.h'\" unpacked with wrong size!
fi
# end of 'strings.add.h'
fi
if test -f 'regmagic.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'regmagic.h'\"
else
echo shar: Extracting \"'regmagic.h'\" \(153 characters\)
sed "s/^X//" >'regmagic.h' <<'END_OF_FILE'
X/*
X * The first byte of the regexp internal "program" is actually this magic
X * number; the start node begins in the second byte.
X */
X#define	MAGIC	0234
END_OF_FILE
if test 153 -ne `wc -c <'regmagic.h'`; then
    echo shar: \"'regmagic.h'\" unpacked with wrong size!
fi
# end of 'regmagic.h'
fi
if test -f 'regerror.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'regerror.c'\"
else
echo shar: Extracting \"'regerror.c'\" \(170 characters\)
sed "s/^X//" >'regerror.c' <<'END_OF_FILE'
X#include <stdio.h>
X
Xvoid
Xregerror(s)
Xchar *s;
X{
X#ifdef ERRAVAIL
X	error("regexp: %s", s);
X#else
X	fprintf(stderr, "regexp(3): %s", s);
X	exit(1);
X#endif
X	/* NOTREACHED */
X}
END_OF_FILE
if test 170 -ne `wc -c <'regerror.c'`; then
    echo shar: \"'regerror.c'\" unpacked with wrong size!
fi
# end of 'regerror.c'
fi
if test -f 'grp.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'grp.h'\"
else
echo shar: Extracting \"'grp.h'\" \(293 characters\)
sed "s/^X//" >'grp.h' <<'END_OF_FILE'
X#define MAX_MEM 20
X
Xstruct group {
X  char *gr_name;
X  char *gr_passwd;
X  int  gr_gid;
X  char **gr_mem;
X};
X
Xextern struct group *getgrent(), *getgrgid(), *getgrnam();
Xextern int          setgrent();
Xextern void         endgrent();
Xextern struct group *fgetgrent();
X
X#define GROUP   "SYS/group"
END_OF_FILE
if test 293 -ne `wc -c <'grp.h'`; then
    echo shar: \"'grp.h'\" unpacked with wrong size!
fi
# end of 'grp.h'
fi
if test -f 'crypt.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'crypt.c'\"
else
echo shar: Extracting \"'crypt.c'\" \(311 characters\)
sed "s/^X//" >'crypt.c' <<'END_OF_FILE'
X/*	From Andy Tanenbaum's book "Computer Networks",
X	rewritten in C
X*/
X
X/* 
X * insert your own crypt functions here (perhaps from MINIX :-)
X */
X
Xsetkey(k)
X	register char *k;
X{
X
X	/* ... */
X}
X
Xencrypt(blck, edflag)
X	char *blck;
X{
X	/* ... */
X}
X
Xchar *
Xcrypt(pw,salt)
X	register char *pw;
X	char *salt;
X{
X	/* ... */
X}
END_OF_FILE
if test 311 -ne `wc -c <'crypt.c'`; then
    echo shar: \"'crypt.c'\" unpacked with wrong size!
fi
# end of 'crypt.c'
fi
if test -f 'man.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'man.h'\"
else
echo shar: Extracting \"'man.h'\" \(347 characters\)
sed "s/^X//" >'man.h' <<'END_OF_FILE'
X# include <stdio.h>
X
Xextern int	os9forkc ();
X
X/* Some static datas */
X# define PROFF		"proff"
X# define PAGER		"less"
X# define INDEX		"/h0/USR/DOC/.MAN/.index"
X# define MANDIR		"/h0/USR/DOC/.MAN"
X# define WORKSPACE	"SOURCE"
X# define PRINTERPORT	"/p"
X# define PRINTER	"dumb"
X# define EDITOR		"me"
X# define SHELL		"shell"
X# define STRINGS	"strings"
X
END_OF_FILE
if test 347 -ne `wc -c <'man.h'`; then
    echo shar: \"'man.h'\" unpacked with wrong size!
fi
# end of 'man.h'
fi
if test -f 'stat.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'stat.h'\"
else
echo shar: Extracting \"'stat.h'\" \(356 characters\)
sed "s/^X//" >'stat.h' <<'END_OF_FILE'
X#ifndef CLK_TCK
X#include <time.h>
X#endif
X
Xstruct stat
X{
X  int             st_dev;
X  long            st_ino;
X  unsigned short  st_mode;
X  unsigned short  st_nlink;
X  unsigned short  st_uid;
X  unsigned short  st_gid;
X  int             st_rdev;
X  long            st_size;
X  time_t          st_atime;
X  time_t          st_mtime;
X  time_t          st_ctime;
X};
END_OF_FILE
if test 356 -ne `wc -c <'stat.h'`; then
    echo shar: \"'stat.h'\" unpacked with wrong size!
fi
# end of 'stat.h'
fi
if test -f 'mdir.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'mdir.h'\"
else
echo shar: Extracting \"'mdir.h'\" \(373 characters\)
sed "s/^X//" >'mdir.h' <<'END_OF_FILE'
X#ifndef MODSYNC
X#include <module.h>
X#endif MODSYNC
X
Xtypedef struct _mentry {
X  char           m_name[33];
X  int            m_link;
X  struct modhcom *m_ptr;
X  struct modhcom m_head;
X} mentry;
X
Xextern int     _mopen();
Xextern int     _mclose();
Xextern mentry  *_mread();
Xextern int     _mseek();
Xextern int     _mtell();
Xextern int     _mrewind();
Xextern mentry  *_mexist();
END_OF_FILE
if test 373 -ne `wc -c <'mdir.h'`; then
    echo shar: \"'mdir.h'\" unpacked with wrong size!
fi
# end of 'mdir.h'
fi
if test -f 'info.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'info.h'\"
else
echo shar: Extracting \"'info.h'\" \(389 characters\)
sed "s/^X//" >'info.h' <<'END_OF_FILE'
X/*
X * sysinfo Library
X *
X * Copyright (c) 1988 by Wolfgang Ocker, Puchheim
X */
X
Xextern char *info_str();          /* char *, char *, int  */ 
Xextern int  info_is_locked();     /* char *               */ 
Xextern int  info_lock();          /* char *, int          */ 
Xextern int  info_unlock();        /* char *               */
Xextern int  info_change();        /* char *, int          */
X
END_OF_FILE
if test 389 -ne `wc -c <'info.h'`; then
    echo shar: \"'info.h'\" unpacked with wrong size!
fi
# end of 'info.h'
fi
if test -f 'regexp.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'regexp.h'\"
else
echo shar: Extracting \"'regexp.h'\" \(574 characters\)
sed "s/^X//" >'regexp.h' <<'END_OF_FILE'
X/*
X * Definitions etc. for regexp(3) routines.
X *
X * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
X * not the System V one.
X */
X#define NSUBEXP  10
Xtypedef struct regexp {
X	char *startp[NSUBEXP];
X	char *endp[NSUBEXP];
X	char regstart;		/* Internal use only. */
X	char reganch;		/* Internal use only. */
X	char *regmust;		/* Internal use only. */
X	int regmlen;		/* Internal use only. */
X	char program[1];	/* Unwarranted chumminess with compiler. */
X} regexp;
X
Xextern regexp *regcomp();
Xextern int regexec();
Xextern void regsub();
Xextern void regerror();
END_OF_FILE
if test 574 -ne `wc -c <'regexp.h'`; then
    echo shar: \"'regexp.h'\" unpacked with wrong size!
fi
# end of 'regexp.h'
fi
if test -f 'rndsalt.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'rndsalt.c'\"
else
echo shar: Extracting \"'rndsalt.c'\" \(574 characters\)
sed "s/^X//" >'rndsalt.c' <<'END_OF_FILE'
X# include <time.h>
X
Xstatic char salt[3];
X
Xrnd(num)
X{
X  return(random() % num);
X}
X
Xsrnd(num)
X{
X  srandom(num);
X}
X
X
X
Xstatic char make_char(r)
X  int r;
X{
X  if (r == 0)
X    return ('.');
X  else
X    if (r == 1)
X      return ('/');
X    else
X      if (r < 12)
X        return(r - 2 + '0');
X      else
X        if (r < 38)
X          return(r - 12 + 'A');
X        else
X          return(r - 38 + 'a');
X}
X
Xchar *_rnd_salt()
X{
X  int t;
X  int r;
X	
X  time(&t);
X  srnd(t);
X  r = rnd(63);
X  salt[0] = make_char(r);
X  r = rnd(63);
X  salt[1] = make_char(r);
X  salt[2] = '\0';
X  return(salt);
X}
END_OF_FILE
if test 574 -ne `wc -c <'rndsalt.c'`; then
    echo shar: \"'rndsalt.c'\" unpacked with wrong size!
fi
# end of 'rndsalt.c'
fi
if test -f 'MAN/Umask.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Umask.prf'\"
else
echo shar: Extracting \"'MAN/Umask.prf'\" \(635 characters\)
sed "s/^X//" >'MAN/Umask.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Umask/OS9Lib/Umask
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XUmask - Dummy function for compatibility
X.endtopic
X.topic SYNOPSIS
X.noform
Xint	umask()
X
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XUmask()
Xis just a dummy function to provide source compatibility with UNIX(tm).
X.endtopic
X.topic RETURN VALUE
XUmask() returns always 0.
X.endtopic
END_OF_FILE
if test 635 -ne `wc -c <'MAN/Umask.prf'`; then
    echo shar: \"'MAN/Umask.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Umask.prf'
fi
if test -f 'MAN/Getmuid.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Getmuid.prf'\"
else
echo shar: Extracting \"'MAN/Getmuid.prf'\" \(756 characters\)
sed "s/^X//" >'MAN/Getmuid.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Getmuid/OS9Lib/Getmuid
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XGetmuid - Determinates the owner-id of the module
X.endtopic
X.topic SYNOPSIS
X.noform
Xint	getmuid ()
X
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XGetmuid
Xdetermines the owner-id of the current running module.
X.endtopic
X.topic RETURN VALUE
XGetmuid returns the id of the owner of this module.
X.endtopic
X.topic EXAMPLES
X.noform
Xint	mod_id;
X
Xmod_id = getmuid ();
Xsetuid (mod_id);
X.noformend
X.endtopic
END_OF_FILE
if test 756 -ne `wc -c <'MAN/Getmuid.prf'`; then
    echo shar: \"'MAN/Getmuid.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Getmuid.prf'
fi
if test -f 'pwd.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'pwd.h'\"
else
echo shar: Extracting \"'pwd.h'\" \(866 characters\)
sed "s/^X//" >'pwd.h' <<'END_OF_FILE'
X/*
X * Password Definitions
X */
X 
Xstruct passwd {
X  char *pw_name;
X  char *pw_passwd;
X  int  pw_uid;
X  int  pw_gid;
X  int  pw_prio;                 /* OS9: Priority of entry */
X  char *pw_age;
X  char *pw_comment;
X  char *pw_gecos;
X  char *pw_dir;
X  char *pw_xdir;                /* OS9: Execution Directory */
X  char *pw_shell;
X  char *pw_junk;                /* everything else... */
X};
X
Xextern struct passwd  *getpwent(), *getpwuid(), *getpwnam();
Xextern int            setpwent();
Xextern void           endpwent();
Xextern struct passwd  *fgetpwent();
X
X#define PASSWD	"SYS/password"
X
X#define PW_TIME     't'
X#define PW_FLAG     'f'
X#define PW_MOTD     'm'
X#define PW_NAME     'n'
X#define PW_COMMENT  'c'
X#define PW_GECOS    'g'
X
X
Xstruct gecos {
X  char *fullname;
X  char *organization;
X  char *office_phone;
X  char *home_phone;
X};
X
Xextern struct gecos *getgecos();
X
END_OF_FILE
if test 866 -ne `wc -c <'pwd.h'`; then
    echo shar: \"'pwd.h'\" unpacked with wrong size!
fi
# end of 'pwd.h'
fi
if test -f 'MAN/Rename.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Rename.prf'\"
else
echo shar: Extracting \"'MAN/Rename.prf'\" \(970 characters\)
sed "s/^X//" >'MAN/Rename.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Rename/OS9Lib/Rename
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XRename - Renames a file
X.endtopic
X.topic SYNOPSIS
X.noform
Xint	rename(old, new)
Xchar	*old, *new;
X
Xint	copy(src, dest, over)
Xchar	*src, *dest;
Xint	over;
X
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XRename()
Xtakes the first argument as a filename which should be renamed to the
Xother argument. This function simply calls the programm `rename`. Copy()
Xmake a copy from the src file to the dest file. If over has a non-zero
Xvalue, the destination file will be overwritten if it exists. Copy()
Xwill call the program `copy`.
X.endtopic
X.topic SEE ALSO
X.noform
Xrename, copy
Xin the OS9 User's Manual
X.noformend
X.endtopic
END_OF_FILE
if test 970 -ne `wc -c <'MAN/Rename.prf'`; then
    echo shar: \"'MAN/Rename.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Rename.prf'
fi
if test -f 'utime.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'utime.c'\"
else
echo shar: Extracting \"'utime.c'\" \(1028 characters\)
sed "s/^X//" >'utime.c' <<'END_OF_FILE'
X/*
X * Copyright (c) 1988 by Michael Hoffmann, Muenchen
X */
X
X#include <stdio.h>
X#include <direct.h>
X#include <stat.h>
X#include <modes.h>
X
X/*
X * u t i m e
X */
Xint utime(file, timep)
X  char   *file;
X  time_t timep[2];
X{
X  struct tm     *localtime();
X  struct tm     *tbuf;
X  int           fd;
X  struct fildes buf;
X  struct stat   st;
X  int           flag;
X
X  flag = 0;
X
X  stat(file, &st);
X  if (st.st_mode & S_IFDIR)
X    flag = S_IFDIR;
X
X  if ((fd = open (file, S_IREAD | S_IWRITE | flag)) < 0)
X    return -1;
X
X  if (_gs_gfd(fd, &buf, sizeof(struct fildes)) < 0) {
X    close (fd);
X    return(-1);
X  }
X
X  tbuf = localtime(&(timep[1]));
X
X  sprintf(buf.fd_date, "%c%c%c%c%c", (char) tbuf->tm_year,
X                                     (char) tbuf->tm_mon+1,
X                                     (char) tbuf->tm_mday,
X                                     (char) tbuf->tm_hour,
X                                     (char) tbuf->tm_min);
X
X  if (_ss_pfd(fd, &buf) < 0) {
X    close(fd);
X    return(-1);
X  }
X
X  close(fd);
X  return(0);
X}
X
X
X
END_OF_FILE
if test 1028 -ne `wc -c <'utime.c'`; then
    echo shar: \"'utime.c'\" unpacked with wrong size!
fi
# end of 'utime.c'
fi
if test -f 'MAN/Isatty.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Isatty.prf'\"
else
echo shar: Extracting \"'MAN/Isatty.prf'\" \(1012 characters\)
sed "s/^X//" >'MAN/Isatty.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Isatty/OS9Lib/Isatty
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XIsatty - Determines the class of a device
X.endtopic
X.topic SYNOPSIS
X.noform
Xint	iswhat (p)
Xint	p;
X
Xint	isatty (f)
Xint	f;
X
Xint	isapipe (f)
Xint	f;
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XIswhat
Xreturns the class of the device on which the given path had been opened.
X.bold
XIsatty
Xand
X.bold
Xisapipe
Xexamines the device on the given path and returns a boolean value whether
Xit is or not.
X.endtopic
X.topic RETURN VALUE
XIswhat returns the class of the device on success.  Isatty and isapipe
Xreturns 1 on success, 0 on failure.
X
X.endtopic
X.topic EXAMPLES
X.noform
Xif (!isatty (0))
X	exit (_errmsg (1,"Can only read from SCF-Devices !");
X.noformend
X.endtopic
END_OF_FILE
if test 1012 -ne `wc -c <'MAN/Isatty.prf'`; then
    echo shar: \"'MAN/Isatty.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Isatty.prf'
fi
if test -f 'MAN/Pipe.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Pipe.prf'\"
else
echo shar: Extracting \"'MAN/Pipe.prf'\" \(1032 characters\)
sed "s/^X//" >'MAN/Pipe.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Pipe/OS9Lib/Pipe
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XPipe - Opens a pipe with read and write paths
X.endtopic
X.topic SYNOPSIS
X.noform
Xint	pipe(pv)
Xint	pv[2];
X
Xint	dup2( src, dest)
Xint	src, dest;
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XPipe()
Xrequires a pointer to a vector of int whith a minimum of two free entries. An
Xunnamed pipe will be opend, in pv[0] is the path for reading, in pv[1]
Xthe one for writing (Thats the convention from UNIX(tm)).
X.bold
XDup2()
Xwill take the first argument as a file descriptor and dup's it to the
Xfile descriptor dest.
X.endtopic
X.topic RETURN VALUE
XPipe and dup2 return 0 on success, -1 on failure.
X.endtopic
X.topic SEE ALSO
X.noform
XDup()
Xin the C Compiler User's Manual
X.noformend
X.endtopic
END_OF_FILE
if test 1032 -ne `wc -c <'MAN/Pipe.prf'`; then
    echo shar: \"'MAN/Pipe.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Pipe.prf'
fi
if test -f 'MAN/Ttyname.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Ttyname.prf'\"
else
echo shar: Extracting \"'MAN/Ttyname.prf'\" \(1034 characters\)
sed "s/^X//" >'MAN/Ttyname.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Ttyname/OS9Lib/Ttyname
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XTtyname - Determine the device of an open path
X.endtopic
X.topic SYNOPSIS
X.noform
Xchar	*ttyname (path)
Xint	path;
X
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XTtyname()
Xcan be used to determine the devicename for a given open path.
X.endtopic
X.topic CAVEATS
XTTyname() returns a pointer to static data which will be overwritten by
Xeach call of this function.
X.endtopic
X.topic RETURN VALUE
XOn success ttyname retuns a pointer to the devicename, otherwise NULL.
X.endtopic
X.topic EXAMPLES
X.noform
Xchar	*device;
X
Xif ((device = ttyname (0)) == (char *) NULL)
X	return (-1);
X.noformend
X.endtopic
X.topic SEE ALSO
X.noform
X_gs_devn()
Xin the C Compiler User's Manual
X.noformend
X.endtopic
END_OF_FILE
if test 1034 -ne `wc -c <'MAN/Ttyname.prf'`; then
    echo shar: \"'MAN/Ttyname.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Ttyname.prf'
fi
if test -f 'MAN/Random.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Random.prf'\"
else
echo shar: Extracting \"'MAN/Random.prf'\" \(1055 characters\)
sed "s/^X//" >'MAN/Random.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Random/OS9Lib/Random
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XRandom - Generation of random numbers
X.endtopic
X.topic SYNOPSIS
X.noform
Xvoid		srandom (x)
Xunsigned int	x;
X
Xlong		random ()
X
X.noformend
X.endtopic
X.topic DESCRIPTION
XThe random functions provides a simple method of random number generation.
XTo initialize the generator you use
X.bold
Xsrandom()
Xwith a uniqe number (e.g. got by a time() call). Each following call to
X.bold
Xrandom()
Xshould return a pseudo random number.
X.endtopic
X.topic RETURN VALUE
X
XRandom returns a long random number.
X.endtopic
X.topic EXAMPLES
X.noform
Xint t;
X
Xt = time (0);
Xsrandom (t);
Xt = random () % 100;
X.noformend
X.endtopic
X.topic SEE ALSO
X.noform
Xrnd(), srnd(), rnd_salt()
Xin the Top OS9Lib Documentation
X.noformend
X.endtopic
END_OF_FILE
if test 1055 -ne `wc -c <'MAN/Random.prf'`; then
    echo shar: \"'MAN/Random.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Random.prf'
fi
if test -f 'bsearch.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'bsearch.c'\"
else
echo shar: Extracting \"'bsearch.c'\" \(1076 characters\)
sed "s/^X//" >'bsearch.c' <<'END_OF_FILE'
X/*  bsearch(3)
X *
X *  Author: Terrence Holm          Aug. 1988
X *
X *
X *  Performs a binary search for a given <key> within a sorted
X *  table. The table contains <count> entries of size <width>
X *  and starts at <base>.
X *
X *  Entries are compared using keycmp( key, entry ), each argument
X *  is a (char *), the function returns an int < 0, = 0 or > 0
X *  according to the order of the two arguments.
X *
X *  Bsearch(3) returns a pointer to the matching entry, if found,
X *  otherwise NULL is returned.
X */
X
X#include <stdio.h>
X
Xchar *bsearch(key, base, count, width, keycmp)
X  char                  *key;
X  register char         *base;
X  register unsigned int count;
X  unsigned int          width;
X  int                   (*keycmp)();
X{
X  register char *mid_point;
X  register int  cmp;
X
X  while (count > 0) {
X    mid_point = base + width * (count >> 1);
X
X    cmp = keycmp(key, mid_point);
X
X    if (cmp == 0)
X      return(mid_point);
X
X    if (cmp < 0)
X      count >>= 1;
X    else {
X      base  = mid_point + width;
X      count = (count - 1) >> 1;
X    }
X  }
X
X  return(NULL);
X}
X
END_OF_FILE
if test 1076 -ne `wc -c <'bsearch.c'`; then
    echo shar: \"'bsearch.c'\" unpacked with wrong size!
fi
# end of 'bsearch.c'
fi
if test -f 'MAN/Perror.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Perror.prf'\"
else
echo shar: Extracting \"'MAN/Perror.prf'\" \(1098 characters\)
sed "s/^X//" >'MAN/Perror.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Perror/OS9Lib/Perror
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XPerror - Print an error text
X.endtopic
X.topic SYNOPSIS
X.noform
Xextern remote char	*sys_errlist[];
X
Xint	perror(msg)
Xchar	*msg;
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XPerror
Xrequires a string as an argument and prints it on stderr. In
Xaddition it also prints the current value of errno and a short
Xdescription of this error.
X.bold
Xsys_errlist
Xcontains the OSK error messages.
X.endtopic
X.topic RETURN VALUE
XThe function returns the actual error code.
X.endtopic
X.topic EXAMPLES
X.noform
Xif ((i = open ("/dd/test", S_IREAD)) < 0)
X	perror ("Can't open /dd/test");
X
Xfprintf (stderr, "%s: %s\n", filename, sys_errlist[errno]);
X.noformend
X.endtopic
X.topic SEE ALSO
X.noform
Xerrno, _errmsg ()
Xin the C Compiler User's Manual
X.noformend
X.endtopic
END_OF_FILE
if test 1098 -ne `wc -c <'MAN/Perror.prf'`; then
    echo shar: \"'MAN/Perror.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Perror.prf'
fi
if test -f 'MAN/Getwd.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Getwd.prf'\"
else
echo shar: Extracting \"'MAN/Getwd.prf'\" \(1123 characters\)
sed "s/^X//" >'MAN/Getwd.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Getwd/OS9Lib/Getwd
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XGetwd - Determines the current working directory
X.endtopic
X.topic SYNOPSIS
X.noform
Xchar	*getwd (pathname)
Xchar	*pathname;
X
Xchar	*getxd (pathname)
Xchar	*pathname;
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XGetwd
Xdetermines the path to the current datadirectory. The path will be
Xstored in
X.ul
Xpathname
Xwhich should be long enough to hold the whole pathname.
X.bold
XGetxd
Xis the same function for the current execution directory.
X.endtopic
X.topic RETURN VALUE
XGetwd returns a pointer to pathname on success or NULL on failure.
X.endtopic
X.topic EXAMPLES
X.noform
Xextern char	*getwd ();
Xchar		path[1024];	/* Maximal length of pathname */
X
Xif (getwd (path) == NULL)
X	return (-1);
X.noformend
X.endtopic
X.topic SEE ALSO
X.noform
Xpd
Xin the OS9 User Manual
X.noformend
X.endtopic
END_OF_FILE
if test 1123 -ne `wc -c <'MAN/Getwd.prf'`; then
    echo shar: \"'MAN/Getwd.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Getwd.prf'
fi
if test -f 'MAN/Gethostname.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Gethostname.prf'\"
else
echo shar: Extracting \"'MAN/Gethostname.prf'\" \(1194 characters\)
sed "s/^X//" >'MAN/Gethostname.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Gethostname/OS9Lib/Gethostname
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XGethostname - Determines the systemname
X.endtopic
X.topic SYNOPSIS
X.noform
Xchar	*gethostname (hostname, len)
Xchar	*hostname;
Xint	len;	
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XGethostname
Xexpects a buffer
X.bold
Xhostname
Xand the maximum length of the buffer
X.bold
Xlen
Xin which the hostname of the system will be copied. If the hostname is
Xlonger than len the rest will be cut off.
X.endtopic
X.topic RETURN VALUE
XGethostname returns a pointer to the buffer on success, NULL at failure.
X
X.endtopic
X.topic SYSINFO
X.noform
Xhostname,s=
X.in +5
XThe hostname of the local system.
X.in -5
X.noformend
X.endtopic
X.topic EXAMPLES
X.noform
Xchar	hostname[40];
X
Xif (gethostname (buffer, sizeof (buffer)) == NULL)
X	return (-1);
X.noformend
X.endtopic
X.topic SEE ALSO
X.noform
XThe complete mailing and uucp stuff of TOP Munich
X.noformend
X.endtopic
END_OF_FILE
if test 1194 -ne `wc -c <'MAN/Gethostname.prf'`; then
    echo shar: \"'MAN/Gethostname.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Gethostname.prf'
fi
if test -f 'MAN/Signal.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Signal.prf'\"
else
echo shar: Extracting \"'MAN/Signal.prf'\" \(1209 characters\)
sed "s/^X//" >'MAN/Signal.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Signal/OS9Lib/Signal
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XSignal - Installs a Signal handler
X.endtopic
X.topic SYNOPSIS
X.noform
Xint	(*signal (sig, func))()
Xint	sig;
Xint	(*func)();
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XSignal
Xgives the programmer the possibility to install for different signals
Xdifferent signal handler. The first argument is the signal number for
Xwhich the `func` should be called. `func` is a pointer to a function returning int
Xwhich will be called if the signal `sig` is sent to the current process.
X.endtopic
X.topic CAVEATS
XA maximum of 10 signals are supported. If a signal is caught, the signal
Xisn't reseted  to SIG_DFL as it is in UNIX(tm).
X.endtopic
X.topic RETURN VALUE
XSignal returns the address of the old signal handler for this signal.
X.endtopic
X.topic EXAMPLES
X.noform
X# include	<signal.h>
X
Xsig_hand (sig)
X{
X   \.
X   \.
X}
X
Xsignal (SIGINT, sig_hand);
X.noformend
X.endtopic
END_OF_FILE
if test 1209 -ne `wc -c <'MAN/Signal.prf'`; then
    echo shar: \"'MAN/Signal.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Signal.prf'
fi
if test -f 'MAN/Getpass.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Getpass.prf'\"
else
echo shar: Extracting \"'MAN/Getpass.prf'\" \(1242 characters\)
sed "s/^X//" >'MAN/Getpass.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Getpass/OS9Lib/Getpass
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XGetpass - Accepts an non-echoed input
X.endtopic
X.topic SYNOPSIS
X.noform
Xchar	*getpass (prompt)
Xchar	*prompt;
X
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XGetpass
Xdisplays the string
X.ul
Xprompt
Xand waits for input by the user. The input is not echoed, so the
Xfunction is useful to ask for a password.
X.endtopic
X.topic CAVEATS
XGetpass returns a pointer to static data which will be overwritten by
Xeach call of this function.
X.endtopic
X.topic RETURN VALUE
XGetpass returns the input line typed by the user. A typed EOF will
Xreturn an empty string. No newline will be at the end of the string.
X.endtopic
X.topic BUGS
XThis function uses readln, so the input is redisplayable at the next
Xtime an input is requested using readln by input of CONTROL-A.
X.endtopic
X.topic EXAMPLES
X.noform
Xextern char	*getpass ();
Xchar		*password;
X
Xpassword = getpass ("Your password: ");
X.noformend
X.endtopic
END_OF_FILE
if test 1242 -ne `wc -c <'MAN/Getpass.prf'`; then
    echo shar: \"'MAN/Getpass.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Getpass.prf'
fi
if test -f 'MAN/Atime.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Atime.prf'\"
else
echo shar: Extracting \"'MAN/Atime.prf'\" \(1252 characters\)
sed "s/^X//" >'MAN/Atime.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Atime/OS9Lib/Atime
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XAtime - Generate a formated timestring
X.endtopic
X.topic SYNOPSIS
X.noform
X# include	<time.h>
X
Xchar*	atime (tp)
Xtime_t	*tp;
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XAtime
Xexpects a pointer to
X.ul
Xtime_t
Xwhich is defined in time.h. Normally this is set by a call to
X.ul
Xtime ()
Xwhich returns the calendar time.
X.bold
XAtime
Xcreates a string with the pattern
X.ul
X<month-in-words> <day>, <year> <day-in-words> <hour>:<minutes>:<seconds> <timezone>
Xthat is returned to the calling function.
X.endtopic
X.topic CAVEATS
XAtime returns a pointer to static data which will be overwritten by each
Xcall.
X.endtopic
X.topic RETURN VALUE
XThe function returns a pointer to a string containing the formated time
Xstring.
X.endtopic
X.topic EXAMPLES
X.noform
XJul 5, 1988 Thu  12:03:45 MET
X.noformend
X.endtopic
X.topic SEE ALSO
X.noform
Xtime (), ctime (), localtime ()
Xin the C-Compiler User's Manual
X.noformend
X.endtopic
END_OF_FILE
if test 1252 -ne `wc -c <'MAN/Atime.prf'`; then
    echo shar: \"'MAN/Atime.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Atime.prf'
fi
if test -f 'MAN/Crypt.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Crypt.prf'\"
else
echo shar: Extracting \"'MAN/Crypt.prf'\" \(1252 characters\)
sed "s/^X//" >'MAN/Crypt.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Crypt/OS9Lib/Crypt
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XCrypt - Encrypt passwords for the password/group file
X.endtopic
X.topic SYNOPSIS
X.noform
Xchar	*crypt (pw, salt)
Xchar	*pw;
Xchar	*salt;
X
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XCrypt
Xencrypts a given password to a 13 character string which will be
Xreturned to the calling function. As parameters you pass the
Xpassword
X.ul
Xpw
Xand the salt
X.ul
Xsalt
Xwhich will be used as a key to encrypt the password.
X.ul
Xpw
Xshould not be longer than eight characters,
X.ul
Xsalt
Xshould be exact two characters.
X.endtopic
X.topic RETURN VALUE
XCrypt returns the pointer to the encrypted password on success or NULL
Xon failure.
X.endtopic
X.topic EXAMPLES
X.noform
Xchar	*encrypted_password;
X
Xencrypted_password = crypt ("foo","ba");
X.noformend
X.endtopic
X.topic SEE ALSO
X.noform
Xchange_passwd (), change_grppasswd ()
Xin the TOP OS9Lib Documentation and
Xnewgrp, passwd, chgrppasswd
Xin the TOP Release
X.noformend
X.endtopic
END_OF_FILE
if test 1252 -ne `wc -c <'MAN/Crypt.prf'`; then
    echo shar: \"'MAN/Crypt.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Crypt.prf'
fi
if test -f 'getmuid.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'getmuid.c'\"
else
echo shar: Extracting \"'getmuid.c'\" \(1285 characters\)
sed "s/^X//" >'getmuid.c' <<'END_OF_FILE'
X/* ------------------------------------------------------------------- *
X |
X | OS9Lib:  getmuid()
X |
X |
X |     Copyright (c) 1988 by Wolfgang Ocker, Puchheim,
X |                           Ulli Dessauer, Germering and
X |                           Reimer Mellin, Muenchen
X |                           (W-Germany)
X |
X |  This  programm can  be  copied and  distributed freely  for any
X |  non-commercial  purposes.   It can only  be  incorporated  into
X |  commercial software with the written permission of the authors.
X |
X |  If you should modify this program, the authors would appreciate
X |  a notice about the changes. Please send a (context) diff or the
X |  complete source to:
X |
X |  address:     Wolfgang Ocker
X |               Lochhauserstrasse 35a
X |               D-8039 Puchheim
X |               West Germany
X |
X |  e-mail:      weo@altger.UUCP, ud@altger.UUCP, ram@altger.UUCP
X |               pyramid!tmpmbx!recco!weo
X |               pyramid!tmpmbx!nitmar!ud
X |               pyramid!tmpmbx!ramsys!ram
X |
X * ----------------------------------------------------------------- */
X
X#define PATCHLEVEL 1
X
X#include <procid.h>
X
X/*
X * g e t m u i d
X */
Xint getmuid()
X{
X  procid pbuf;
X
X  _get_process_desc(getpid(), sizeof(procid), &pbuf);
X
X  return((pbuf._pmodul)->_mh._mowner);
X}
END_OF_FILE
if test 1285 -ne `wc -c <'getmuid.c'`; then
    echo shar: \"'getmuid.c'\" unpacked with wrong size!
fi
# end of 'getmuid.c'
fi
if test -f 'MAN/Getlogin.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Getlogin.prf'\"
else
echo shar: Extracting \"'MAN/Getlogin.prf'\" \(1272 characters\)
sed "s/^X//" >'MAN/Getlogin.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Getlogin/OS9Lib/Getlogin
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XGetlogin - Determines the login name
X.endtopic
X.topic SYNOPSIS
X.noform
Xchar	*getlogin ()
X
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XGetlogin
Xexamines the file 
X.ul
X/dd/SYS/utmp
Xto determine the name by which the user logged on.
X.endtopic
X.topic CAVEATS
XGetlogin returns a pointer to static data which will be overwritten by
Xeach call of this function.
X.endtopic
X.topic RETURN VALUE
XGetlogin returns a pointer to a string containing the username on
Xsuccess, NULL on failure.
X.endtopic
X.topic FILES
X.noform
X/dd/SYS/utmp
X.in +5
XThis file contains the data of all logged-in users
X.in -5
X.noformend
X.endtopic
X.topic EXAMPLES
X.noform
Xextern char	*getlogin ();
Xextern char	*getenv ();
Xchar		*user;
X
Xif ((user = getlogin ()) == NULL)
X	user = getenv ("USER");
X.noformend
X.endtopic
X.topic SEE ALSO
X.noform
Xthe utmp-Library
Xin the TOP OS9Lib Documentation and
Xlogon, who
Xin the TOP Munich Release
X.noformend
X.endtopic
END_OF_FILE
if test 1272 -ne `wc -c <'MAN/Getlogin.prf'`; then
    echo shar: \"'MAN/Getlogin.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Getlogin.prf'
fi
if test -f 'MAN/Rnd.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Rnd.prf'\"
else
echo shar: Extracting \"'MAN/Rnd.prf'\" \(1306 characters\)
sed "s/^X//" >'MAN/Rnd.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Rnd/OS9Lib/Rnd
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XRnd - Useful functions using random()
X.endtopic
X.topic SYNOPSIS
X.noform
Xint	rnd (num)
Xint	num;
X
Xvoid	srnd (num)
Xint	num;
X
Xchar	*_rnd_salt ()
X
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XRnd()
Xreturns a random number between 0 and (less than)
X.ul
Xnum.
XTo provide getting differnet random numbers with each call you first
Xshould call 
X.bold
Xsrnd()
Xwith a uniqe number (e.g. from a time() call).
X.bold
X_rnd_salt()
Xreturns a random salt for creating a password using the crypt() function.
X.endtopic
X.topic CAVEATS
X_rnd_salt returns a pointer to static data which will be overwritten by
Xeach call.
X.endtopic
X.topic RETURN VALUE
XRnd returns a random number between 0 and less than num. _rnd_salt
Xreturns a pointer to character with a length of two characters.
X.endtopic
X.topic EXAMPLES
X.noform
Xint t;
X
Xt = time (0);
Xsrnd (t);
Xt = rnd (100);
X.noformend
X.endtopic
X.topic SEE ALSO
X.noform
Xradnom(), srandom()
Xin the Top OS9Lib Documentation
X.noformend
X.endtopic
END_OF_FILE
if test 1306 -ne `wc -c <'MAN/Rnd.prf'`; then
    echo shar: \"'MAN/Rnd.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Rnd.prf'
fi
if test -f 'MAN/Change_passwd.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Change_passwd.prf'\"
else
echo shar: Extracting \"'MAN/Change_passwd.prf'\" \(1285 characters\)
sed "s/^X//" >'MAN/Change_passwd.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Change_passwd/OS9Lib/Change_passwd
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XChange_passwd - Change a password for an user
X.endtopic
X.topic SYNOPSIS
X.noform
Xchange_passwd (name, password)
Xchar	*name;
Xchar	*password;
X
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XChange_password
Xcan be used to change the password for an entry in the password file.
XArguments are the
X.ul
Xname
Xof the user for which the password should be changed and
X.ul
Xpassword
Xis the new password of the user. The password is crypted so everyone can
Xread the password file without determing the password of another
Xuser.
X.endtopic
X.topic RETURN VALUE
XOn success change_password returns 1, otherwise 0.
X.endtopic
X.topic FILES
X.noform
X/<bootdrive>/SYS/password
X/dd/SYS/password
X.noformend
X.endtopic
X.topic EXAMPLES
X.noform
Xif (change_password ("foo", "bar") == 0)
X	return (-1);
Xelse
X	return (0);
X.noformend
X.endtopic
X.topic SEE ALSO
X.noform
Xchange_grppasswd (), crypt ()
Xin the TOP OS9Lib Documentation
X.noformend
X.endtopic
END_OF_FILE
if test 1285 -ne `wc -c <'MAN/Change_passwd.prf'`; then
    echo shar: \"'MAN/Change_passwd.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Change_passwd.prf'
fi
if test -f 'MAN/Getargs.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Getargs.prf'\"
else
echo shar: Extracting \"'MAN/Getargs.prf'\" \(1303 characters\)
sed "s/^X//" >'MAN/Getargs.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Getargs/OS9Lib/Getargs
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XGetargs - Seperate a string into single arguments
X.endtopic
X.topic SYNOPSIS
X.noform
Xint	getargs (s, args)
Xchar	*s;
Xchar	***args;
X
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XGetargs
Xtakes the string
X.ul
Xs
Xand seperates it. Seperator is one ore more spaces. All parts are stored in
X.bold
X*args.
XThe memory for *args is automatically allocated and expanded. It has
Xto be free()ed after using *args.
XQuoting of several arguments will be recognized.
X.endtopic
X.topic RETURN VALUE
XGetargs returns the number of seperated parts on success or -1 if not
Xenough memory is available.
X.endtopic
X.topic EXAMPLES
X.noform
X
Xchar *args[];
Xif (getargs ("foo bar bar \\"bar foo\\"",&args,) < 0)
X	return (-1);
X	.
X	.
X	.
Xfree(args);
X
XAfter the call, args contains:
Xarg[0] = 'foo'
Xarg[1] = 'bar'
Xarg[2] = 'bar'
Xarg[3] = 'bar foo';
Xarg[4] = NULL;
X.noformend
X.endtopic
X.topic SEE ALSO
X.noform
Xos9exec (), free ()
Xin the C Compiler User's Manual
X.noformend
X.endtopic
END_OF_FILE
if test 1303 -ne `wc -c <'MAN/Getargs.prf'`; then
    echo shar: \"'MAN/Getargs.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Getargs.prf'
fi
if test -f 'MAN/Cuserid.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Cuserid.prf'\"
else
echo shar: Extracting \"'MAN/Cuserid.prf'\" \(1341 characters\)
sed "s/^X//" >'MAN/Cuserid.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Cuserid/OS9Lib/Cuserid
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XCuserid - Determines the username of the current user-id
X.endtopic
X.topic SYNOPSIS
X.noform
Xchar	*cuserid ()
X
Xchar	*chome ()
X
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold
XCuserid
Xdetermines the user-id of the currently running process and tries to
Xfind an entry for this user in the password file.
X
X.bold
XChome
Xtries to find the homedirectory of the user-id of the current process.
X.endtopic
X.topic CAVEATS
XCuserid and Chome returning pointer to static data which will be
Xoverwritten by each call of these functions.
X.endtopic
X.topic RETURN VALUE
XCuserid and chome returns a pointer to the username or homedirectory on
Xsuccess or NULL on failure.
X.endtopic
X.topic FILES
X.noform
X/<bootdrive>/SYS/password
X/dd/SYS/password
X.noformend
X.endtopic
X.topic EXAMPLES
X.noform
Xextern char	*cuserid ();
Xextern char	*chome ();
X
Xchar		*name, *home;
X
Xname = cuserid ();
Xhome = chome ();
X.noformend
X.endtopic
X.topic SEE ALSO
X.noform
Xgetlogin ()
Xin the TOP OS9Lib Documentation
X.noformend
X.endtopic
END_OF_FILE
if test 1341 -ne `wc -c <'MAN/Cuserid.prf'`; then
    echo shar: \"'MAN/Cuserid.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Cuserid.prf'
fi
if test -f 'MAN/Change_grppasswd.prf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAN/Change_grppasswd.prf'\"
else
echo shar: Extracting \"'MAN/Change_grppasswd.prf'\" \(1342 characters\)
sed "s/^X//" >'MAN/Change_grppasswd.prf' <<'END_OF_FILE'
X.fill
X.justify
X.offset 5
X.rightmargin 55
X.pagesize 48
X.m1 2
X.m2 1
X.m3 2
X.m4 3
X.ec \
X.header /Change_grppasswd/OS9Lib/Change_grppasswd
X.footer /Page #//Printed (%)/
X.in +5
X.define topic
X.bold
X.in -5
X$1 $2 $3 $4 $5
X.in +5
X.en
X.define endtopic
X
X
X.en
X.define noform
X.nojustify
X.nofill
X.en
X.define noformend
X.justify
X.fill
X.en
X.! Manual created with MWB
X.! END-OF-MACRO
X.topic NAME
XChange_grppasswd - Change the password for a group
X.endtopic
X.topic SYNOPSIS
X.noform
Xchange_grppasswd (name, password)
Xchar	*name;
Xchar	*password;
X
X.noformend
X.endtopic
X.topic DESCRIPTION
X.bold 
XChange_grppasswd 
Xchanges the password of a group.  It expects the
Xname of the group 
X.ul 
Xname
Xand the new password 
X.ul 
Xpassword
Xfor this
Xgroup.  The password will be crypted so everyone can read the group
Xfile, but no one can determine the passwords of the groups.  This
Xroutine should only be called by the superuser. 
X
X.endtopic
X.topic RETURN VALUE
XOn success the function returns 1, on failure it returns 0.
X.endtopic
X.topic FILES
X.noform
X/<bootdrive>/SYS/group
X/dd/SYS/group
X.noformend
X.endtopic
X.topic EXAMPLES
X.noform
Xif (change_grppasswd ("foo", "bar") == 0)
X	return (-1);
Xelse
X	return (0);
X.noformend
X.endtopic
X.topic SEE ALSO
X.noform
Xchange_passwd (), crypt ()
Xin the TOP OS9Lib Documentation and
Xnewgrp, chgrppasswd
Xin the TOP-Release
X.noformend
X.endtopic
END_OF_FILE
if test 1342 -ne `wc -c <'MAN/Change_grppasswd.prf'`; then
    echo shar: \"'MAN/Change_grppasswd.prf'\" unpacked with wrong size!
fi
# end of 'MAN/Change_grppasswd.prf'
fi
echo shar: End of archive 1 \(of 5\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 3 4 5 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 5 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0
-- 
  |  Wolfgang Ocker          |  ocker@lan.informatik.tu-muenchen.dbp.de  |
  |  Lochhauserstr. 35a      |      pyramid!tmpmbx!recco!weo (home)      |
  |  D-8039 Puchheim         |     Technische Universitaet Muenchen      |
  |  Voice: +49 89 80 77 02  |          Huh, What? Where am I?           |