home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / c / c-niftp.zip / unix-niftp-5.6 / opts.SH < prev    next >
Text File  |  1991-06-07  |  4KB  |  115 lines

  1. case $CONFIG in
  2.     '') . config.sh ;;
  3. esac
  4. case "$softpp" in '')    softpp=undef;; esac
  5. case "$sigret" in '')    sigret=int;;   esac
  6. outputfile=h/opts.h
  7. rm -f $outputfile.$$
  8. echo "Creating $outputfile (with variable substitutions)"
  9. if cat >$outputfile.$$ <<!GROK!THIS!
  10. /*
  11.  * various options for the ftp
  12.  */
  13.  
  14. #$novoid    void    int    /* use void if that's what is wanted */
  15. #define    SIGRET    $sigret    /* what a signal routine returns */
  16. #$strchr    index    strchr    /* Cultural */
  17. #$strchr    rindex    strrchr    /* Differences */
  18. #$novfork    vfork    fork    /* use vfork if that is what is wanted */
  19. #$ascii    ASCII        /* This machine is ascii */
  20. #$getwd    GETWD        /* has getwd built in */
  21. #$bzero    BZERO        /* has bzero call */
  22. #$bcopy    BCOPY        /* has bcopy call */
  23. #$rename    RENAME        /* has rename built in */
  24. #$fopena    FOPEN_A_APPENDS    /* fopen "a" really DOES append */
  25. #$flock    FLOCK        /* Using BSD4.2 flock file locking */
  26. #$fcntl    FCNTL        /* Using SYSV fcntl file locking */
  27. #$uchar    UCHAR        /* <sys/types.h> defines u_char */
  28. #$guest    GUEST_ACCOUNTS    /* allow guest operations */
  29. #$restartsys    RESTARTSYS    /* restarts system calls */
  30. #$dircompacts    DIR_COMPACTS    /* directory compacts when file is deleted */
  31. #$getgroups    GETGROUPS    /* system has muliple groups */
  32. #$creatrunc    CREATRUNC    /* can create & truncate while opening */
  33. #$setlinebuf    SETLINEBUF    /* can use 4.2 setlinebuf() call */
  34. #$setvbuf    SETVBUF        /* can use System V setvbuf() call */
  35. #$seteuid    SETEUID        /* can use 4.2 seteuid() call */
  36. #$usendir    USENDIR        /* include ndir.c? */
  37. #$libndir    LIBNDIR        /* include /usr/include/ndir.h? */
  38. #$cryptcruddy    CRUDDY_CRYPT_ONLY /* Cruddy crypt only */
  39. #$cryptcompat    CRUDDY_CRYPT_COMPAT /* Cruddy and new */
  40. #$kerberos    KERBEROS    /* Use Kerberos */
  41.  
  42. #$mail    MAIL        /* Include code for mail */
  43. #$news    NEWS        /* Include code for news */
  44. #$pp    PP        /* Include code for pp */
  45. #$mailownsmail    MAILOWNSMAIL    /* mail spool dir isn't free access*/
  46. #$rmtdbm    RMTDBM        /* Allow remote access to NRS dbm */
  47. #define    DEF_PKTSIZE    $def_pktsize    /* Default packet size (or 0) */
  48. #define    DEF_WNDSIZE    $def_wndsize    /* Default window size (or 0) */
  49. #$debug    DEBUG        /* Include debugging cose */
  50. #$softmail    ALL_MAIL_SOFT    /* All Q end mail failures are soft */
  51. #$softpp    ALL_PP_SOFT    /* All Q end pp failures are soft */
  52. #$softnews    ALL_NEWS_SOFT    /* All Q end news failures are soft */
  53. #$freediskdef    FREEDISK    $freedisk    /* Ensure some free disk */
  54. #$ucl    UCL        /* Include UCL specials */
  55. #$ucl    UCL_V77        /* Include UCL specials */
  56. #$ucl    UCL_STATS    /* Include UCL specials */
  57. #$ucl    UCL_ISID    /* Include UCL specials */
  58. #$ucl    EXTERNUSER    $externuser/* UCL special */
  59. #$ukc    UKC        /* Include UKC specials */
  60. #$ukc    KENT_MAILER    /* Include UKC specials */
  61. #$macros    MACROS        /* macros for netgetc() & netputc(c)*/
  62. #$maxfile    MAXFILESIZE    $maxfilesize/* call ulimit(2, n/512) */
  63. #define    MAILER    "$mailer"    /* Which mailer to use */
  64. #$catchall    CATCHALL    /* catch all errors in mail (??) */
  65. #$mixedlines    MIXED_LINES    /* allow PSS or JANET on either line */
  66. #$noleadingzeros    NOLEADINGZEROS    /* -- JUNK THIS -- */
  67. #$camtechack    CAMTEC_HACK    /* Insert missing YBTS separator */
  68. #$standalone    STANDALONE    /* ubc specific (??) */
  69. #$testprotid    TEST_PID    /* ubc - Test Protocol ID */
  70. #$small_proc    SMALL_PROC    /* keep the size down */
  71.  
  72. /*
  73. These procedures are in the lib/gen library: 
  74.     rename, lockfile, bzero, getwd, fullpath
  75.  
  76. These #defines should be REPLACED by the more specifec #define
  77. _42    bin{cpf,dbencode,fpc,ftpspool,ftq,qft}
  78.     rename/fullpath, rename, sys/file.h/flock RESTARTSYS SETLINEBUF
  79.     rename/getwdir sys/file.h/TRUNCATE NGROUPS
  80. STDV7    bin/{dbget,dbextract,get}    -- omit as void handled --
  81. vax    bin{dbencode,dbpatch,dbget,get,setup}  gen/dbenter
  82.                     -- omit as void and bzero handled --
  83. pdp11    bin/{dbencode,ftp} lib/gen/tailor -- omit as void handled --
  84.                       -- use SIGIOT --
  85.                       -- setbuf bug in PDP's -- ?? --
  86. */
  87. /* HACK HACK HACK */
  88. /* HACK HACK HACK */
  89. /* until everything is switched to use the proper #defines .. */
  90. #$hack42    _42    /* HACK */
  91. /* HACK HACK HACK */
  92. /* HACK HACK HACK */
  93.  
  94.  
  95. #include <sys/types.h>
  96. #ifndef    UCHAR
  97. typedef    unsigned char u_char;
  98. #endif    UCHAR
  99. $ndircomm#include "$ndirh"            /* need ndir.h */
  100. #include "log.h"            /* how to write logging info */
  101. !GROK!THIS!
  102. then if cmp $outputfile $outputfile.$$ > /dev/null 2>& 1
  103.     then
  104.         rm -f $outputfile.$$
  105.         $echoq "    " $outputfile not affected
  106.     elif mv $outputfile.$$ $outputfile
  107.     then
  108.         echo "    " $outputfile updated
  109.     else
  110.         echo "+++    " $outputfile left in $outputfile.$$
  111.     fi
  112. else
  113.     echo "    " Failed to create $outputfile.$$
  114. fi
  115.