home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume15 / getty_ps / part05 < prev    next >
Encoding:
Text File  |  1990-10-05  |  5.2 KB  |  212 lines

  1. Newsgroups: comp.sources.misc
  2. X-UNIX-From: paul@devon.lns.pa.us
  3. organization: Devon Computer Services, Lancaster, PA
  4. keywords: getty uugetty
  5. subject: v15i008: Enhanced SYSV Getty/Uugetty, Ver 2.0, part 5 of 5 (REPOST)
  6. from: paul@devon.lns.pa.us (Paul Sutcliffe Jr.)
  7. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  8.  
  9. Posting-number: Volume 15, Issue 8
  10. Submitted-by: paul@devon.lns.pa.us (Paul Sutcliffe Jr.)
  11. Archive-name: getty_ps/part05
  12.  
  13. #! /bin/sh
  14.  
  15. # Make a new directory for the getty sources, cd to it, and run kits 1
  16. # thru 5 through sh.  When all 5 kits have been run, read README.
  17.  
  18. echo "This is getty 2.0 kit 5 (of 5).  If kit 5 is complete, the line"
  19. echo '"'"End of kit 5 (of 5)"'" will echo at the end.'
  20. echo ""
  21. export PATH || (echo "You didn't use sh, you clunch." ; kill $$)
  22. mkdir  2>/dev/null
  23. echo Extracting strdup.c
  24. sed >strdup.c <<'!STUFFY!FUNK!' -e 's/X//'
  25. X/*
  26. X**    $Id: strdup.c,v 2.0 90/09/19 20:18:12 paul Rel $
  27. X**
  28. X**    Implements strdup(3c) [strdup(S) for you Xenix-types].
  29. X*/
  30. X
  31. X/*
  32. X**    Copyright 1989,1990 by Paul Sutcliffe Jr.
  33. X**
  34. X**    Permission is hereby granted to copy, reproduce, redistribute,
  35. X**    or otherwise use this software as long as: there is no monetary
  36. X**    profit gained specifically from the use or reproduction or this
  37. X**    software, it is not sold, rented, traded or otherwise marketed,
  38. X**    and this copyright notice is included prominently in any copy
  39. X**    made.
  40. X**
  41. X**    The author make no claims as to the fitness or correctness of
  42. X**    this software for any use whatsoever, and it is provided as is. 
  43. X**    Any use of this software is at the user's own risk.
  44. X*/
  45. X
  46. X/*
  47. X**    $Log:    strdup.c,v $
  48. X**    Revision 2.0  90/09/19  20:18:12  paul
  49. X**    Initial 2.0 release
  50. X**    
  51. X*/
  52. X
  53. X
  54. X#if defined(RCSID) && !defined(lint)
  55. Xstatic char *RcsId =
  56. X"@(#)$Id: strdup.c,v 2.0 90/09/19 20:18:12 paul Rel $";
  57. X#endif
  58. X
  59. X/*
  60. X**    strdup() - duplicates string s in memory.
  61. X**
  62. X**    Returns a pointer to the new string, or NULL if an error occurrs.
  63. X*/
  64. X
  65. Xchar *
  66. Xstrdup(s)
  67. Xregister char *s;
  68. X{
  69. X    register char *p = (char *) NULL;
  70. X
  71. X    if (s != (char *) NULL)
  72. X        if ((p = malloc((unsigned) (strlen(s)+1))) != (char *) NULL)
  73. X            (void) strcpy(p, s);
  74. X
  75. X    return(p);
  76. X}
  77. X
  78. X
  79. X/* end of strdup.c */
  80. !STUFFY!FUNK!
  81. echo Extracting defaults.h
  82. sed >defaults.h <<'!STUFFY!FUNK!' -e 's/X//'
  83. X/*
  84. X**    $Id: defaults.h,v 2.0 90/09/19 19:45:49 paul Rel $
  85. X**
  86. X**    Defines the structures and functions used to read runtime
  87. X**    defaults.
  88. X*/
  89. X
  90. X/*
  91. X**    Copyright 1989,1990 by Paul Sutcliffe Jr.
  92. X**
  93. X**    Permission is hereby granted to copy, reproduce, redistribute,
  94. X**    or otherwise use this software as long as: there is no monetary
  95. X**    profit gained specifically from the use or reproduction or this
  96. X**    software, it is not sold, rented, traded or otherwise marketed,
  97. X**    and this copyright notice is included prominently in any copy
  98. X**    made.
  99. X**
  100. X**    The author make no claims as to the fitness or correctness of
  101. X**    this software for any use whatsoever, and it is provided as is. 
  102. X**    Any use of this software is at the user's own risk.
  103. X*/
  104. X
  105. X/*
  106. X**    $Log:    defaults.h,v $
  107. X**    Revision 2.0  90/09/19  19:45:49  paul
  108. X**    Initial 2.0 release
  109. X**    
  110. X*/
  111. X
  112. X
  113. X/* lines in defaults file are in the form "NAME=value"
  114. X */
  115. X
  116. Xtypedef struct Default {
  117. X    char    *name;        /* name of the default */
  118. X    char    *value;        /* value of the default */
  119. X} DEF;
  120. X
  121. X
  122. XDEF    **defbuild();        /* user-level routines */
  123. Xchar    *defvalue();
  124. X
  125. XFILE    *defopen();        /* low-level routines */
  126. XDEF    *defread();
  127. Xint    defclose();
  128. X
  129. X
  130. X/* end of defaults.h */
  131. !STUFFY!FUNK!
  132. echo Extracting funcs.h
  133. sed >funcs.h <<'!STUFFY!FUNK!' -e 's/X//'
  134. X/*
  135. X**    $Id: funcs.h,v 2.0 90/09/19 19:56:17 paul Rel $
  136. X**
  137. X**    Defines the miscellaneous functions.
  138. X*/
  139. X
  140. X/*
  141. X**    Copyright 1989,1990 by Paul Sutcliffe Jr.
  142. X**
  143. X**    Permission is hereby granted to copy, reproduce, redistribute,
  144. X**    or otherwise use this software as long as: there is no monetary
  145. X**    profit gained specifically from the use or reproduction or this
  146. X**    software, it is not sold, rented, traded or otherwise marketed,
  147. X**    and this copyright notice is included prominently in any copy
  148. X**    made.
  149. X**
  150. X**    The author make no claims as to the fitness or correctness of
  151. X**    this software for any use whatsoever, and it is provided as is. 
  152. X**    Any use of this software is at the user's own risk.
  153. X*/
  154. X
  155. X/*
  156. X**    $Log:    funcs.h,v $
  157. X**    Revision 2.0  90/09/19  19:56:17  paul
  158. X**    Initial 2.0 release
  159. X**    
  160. X*/
  161. X
  162. X
  163. X/*    States for settermio()
  164. X */
  165. X#define    INITIAL     0
  166. X#define    FINAL     1
  167. X
  168. X/*    Return values for getlogname()
  169. X */
  170. X#define    BADSPEED 1
  171. X#define    BADCASE     2
  172. X#define    NONAME     3
  173. X
  174. Xint    Fputs(), chat(), getlogname();
  175. Xchar    *getuname();
  176. Xvoid    settermio(), logerr();
  177. X
  178. X#ifdef    DEBUG
  179. Xvoid    debug(), dprint();
  180. X#endif    /* DEBUG */
  181. X
  182. X
  183. X/* end of funcs.h */
  184. !STUFFY!FUNK!
  185. echo ""
  186. echo "End of kit 5 (of 5)"
  187. cat /dev/null >kit5isdone
  188. run=''
  189. config=''
  190. for iskit in 1 2 3 4 5; do
  191.     if test -f kit${iskit}isdone; then
  192.     run="$run $iskit"
  193.     else
  194.     todo="$todo $iskit"
  195.     fi
  196. done
  197. case $todo in
  198.     '')
  199.     echo "You have run all your kits.  Please read README and then type Configure."
  200.     chmod 755 Configure
  201.     ;;
  202.     *)  echo "You have run$run."
  203.     echo "You still need to run$todo."
  204.     ;;
  205. esac
  206. : Someone might mail this, so...
  207. exit
  208.  
  209. INTERNET:  paul@devon.lns.pa.us        |      If life's a bitch, then
  210. UUCP:      ...!rutgers!devon!paul      |      we must be her puppies.
  211.  
  212.