@\FSP.SAVFSP.SAV4BACKUP [FSP...]*.* [HALL]FSP.SAV/SAVE/LOG/BLOCK=2048 HALL FGL"V6.1 _SYBIL:: 6 _DKA100: V6.1  *[FSP]00README.TXT;2+, . /F 4] - 0123KPWO 56>Cl7O҃89GFHJ FSP FOR VMS 24 OCT 1994 Andy HarperKings College LondonK--------------------------------------------------------------------------- Introduction ------------KThis port of the FSP utility is based on the official FSP 2.7.1 release. It)supports both FSP clients and FSP server.LNote: I have not attempted to test every single function of this utility soJthis release should be considered a BETA only! Don't use it in productionIunless you are aware of the possible consequences of so doing - I take no<responsibility whatsoever should anything go horribly wrong!MIf you find a problem, please let me know. I'll do my best to fix them but noLguarantees are offered. Even better, if you make any code changes to improveJthe quality or functionality of the software, please send them in and I'llMattempt to coordinate all that I receive and put them into the final release.Changes------- 26-OCT-1994;Written a help file for FSP and FSPD ( see [.fsp.vms.help])OInyL?FSP.SAV  [FSP]00README.TXT;2] cluded a brief summary of what FSP is all about, taken from the FAQ posted toNthe ALT.FSP newsgroup on a regular basis. See the file [.FSP]FSP-OVERVIEW.TXT. 24-OCT-1994MThe official port supports UCX and MULTINET TCP/IP transports. However, thereMwere a number of problems with this. I believe I have corrected most of them.NThe main change is to support the generic SOCKETSHR sockets library written byGEckhart Meyer. This library interfaces to the vendor-independent NETLIBKinterface from MadGoat software. Both are freely available (details below).OBy using SOCKETSHR as the socket library, the FSP utilities should run over any?TCP/IP transports supported by NETLIB. Currently this includes: * UCX * Multinet * TCPware * CMU * Pathway Access.I have tested this only over Multinet and UCX. Installation ------------;Ensure that the NETLIB and SOCKETSHR software is installed.BUnpack the software into a scratch directory, let's call it [.FSP]MOnce the software is unpacked, go into the [.FSP.VMS] directory and issue the commands:3 $ @MAKECLIENT ! To build the FSP client programs+ $ @MAKESERVER ! To build the FSP server.M[If the logical FSP_DEBUG is defined as TRUE, then a DEBUGGING version of the-code is built that includes the VMS debugger]8The executables are placed in the root directory [.FSP].MEdit the [.FSP.VMS]SETUP.COM to suit the local installation. You will need to=at least define the FSP logicals to set the default HFSP.SAV  [FSP]00README.TXT;2] v]FSP host:; $ define FSP_HOST "src.doc.ic.ac.uk" ! Default FSP host4 $ define FSP_PORT "21" ! Default FSP port (UDP)These may need changing too:2 $ define FSP_DIR "/" ! Default FSP directory) $ define FSP_TRACE "0" ! Don't trace5 $ define FSP_DELAY "20" ! Wait before next retry. $ define FSP_TIMEOUT "5" ! Timeout periodNPlace the modified SETUP.COM and the .EXE files somewhere accessible to users.LPlace the FSP help file [.FSP.VMS.HELP]FSP.HLP into a suitable help library:- $ library/help xxxx [.fsp.vms.help]fsp.hlpIf you want to run the server:H Create an account for the FSP server to run in. usually, the directoryG tree of this account will contain the files served by the FSp server.K Copy the example example.conf file into the account's sys$login directory and call it FSPD.CONF.@ Edit the FSPD.CONF to suit local taste. The help file for FSPDK ([.FSP.VMS.HELP]FSPD.HLP) contains a description of the permitted entries in this file.I Start the FSP server as a detached process, ensuring that it can accessJ SYS$LOGIN for the account (needs /AUTHORIZE on the RUN /DETACHED commandI and that it can has the necessary access/privileges to the log file and the directories being served. Obtaining Pre-Requisite Software --------------------------------SOCKETSHR is obtainable from:] ftp://ftp.ifn.ing.tu-bs.de/vms/socketshr/socketshr_bin_xxx.zip ! `xxx' is a version numberA ftp://ftp.ifn.ing.tu-bs.de/vms/souHFSP.SAV  [FSP]00README.TXT;2] Q cketshr/socketshr_src_xxx.zipKNote that the minimum version of SOCKETSHR required is 0.9C (at the time of)writing this is still in beta but works).NETLIB is obtainable from:H ftp://ftp.wku.edu/madgoat/netlibxxx.zip ! `xxx' is a version number9 ftp://ftp.ifn.ing.tu-bs.de/vms/socketshr/netlibxxx.zipKNote that the minimum version of NETLIB required for FSP is 1.7 (xxx=017 orhigher).*[FSP]ACLOCAL.M4;1+, ./F 4K- 0123KPWO56|?Cl7$O҃89GFHJdnl These are local macros that I've needed to define to keep the dnl configure.in file readable or to correct for errors on certain systems dnl such as linux's egrep returning the wrong exit status. dnl define(FSP_PROGRAM_GREP, [AC_REQUIRE([AC_PROG_CPP])AC_PROVIDE([$0])cat > conftest.c < conftest.out 2>&1" if grep "$1" conftest.out >/dev/null 2>&1; then ifelse([$3], , :, [$3]) ifelse([$4], , , [else $4 ])dnl fi rm -f conftest* ])dnl dnl define(FSP_HEADER_GREsFSP.SAV  [FSP]ACLOCAL.M4;1K&uP, [AC_REQUIRE([AC_PROG_CPP])AC_PROVIDE([$0])echo '#include <$2>' > conftest.c eval "$CPP $DEFS conftest.c > conftest.out 2>&1" if grep "$1" conftest.out >/dev/null 2>&1; then ifelse([$3], , :, [$3]) ifelse([$4], , , [else $4 ])dnl fi rm -f conftest* ])dnl dnl dnl dnl checks for typedefs dnl define(FSP_UID_T, [echo checking for uid_t in sys/types.h FSP_HEADER_GREP(uid_t, sys/types.h, , AC_DEFINE(uid_t, int) AC_DEFINE(gid_t, int))])dnl dnl define(FSP_NLINK_T, [echo checking for nlink_t in sys/types.h FSP_HEADER_GREP(nlink_t, sys/types.h, , AC_DEFINE(nlink_t, int))])dnl dnl define(FSP_SIZE_T, [echo checking for size_t in sys/types.h FSP_HEADER_GREP(size_t, sys/types.h, , AC_DEFINE(size_t, unsigned))])dnl dnl define(FSP_PID_T, [echo checking for pid_t in sys/types.h FSP_HEADER_GREP(pid_t, sys/types.h, , AC_DEFINE(pid_t, int))])dnl dnl define(FSP_MODE_T, [echo checking for mode_t in sys/types.h FSP_HEADER_GREP(mode_t, sys/types.h, , AC_DEFINE(mode_t, int))])dnl dnl *[FSP]BSD_SRC.DIR;1+, ./F 4- 0123 KPWO56 t7 89GFHJI{bFSP.SAV  [FSP]BSD_SRC.DIR;1JCMP.C CMP.OBJ FIND.C%FIND.OBJ3 FNMATCH.C FNMATCH.OBJ FUNCTION.C FUNCTION.OBJGLOB.CGLOB.OBJLS.CLS.OBJ MAKEFILE. OPERATOR.C OPERATOR.OBJOPTION.C OPTION.OBJPRINT.C PRINT.OBJUTIL.CUTIL.OBJ*[FSP.BSD_SRC]CMP.C;4+, ./F 4MS- 0123KPWO56<3|El7fQ҃89GFHJ/* * Copyright (c) 1989 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Michael Fischbein. * * Redistribution and use in source and binary forms are permitted * provided that: (1) source distributions retain this entire copyright * notice and comment, and (2) distributions including binaries display * the following acknowledgement: ``This product includes software * developed by the University of California, FSP.SAV  [FSP.BSD_SRC]CMP.C;4MVBerkeley and its contributors'' * in the documentation or other materials provided with the distribution * and in all advertising materials mentioning features or use of this * software. Neither the name of the University nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef lint static char sccsid[] = "@(#)cmp.c 5.2 (Berkeley) 4/8/90"; #endif /* not lint */ #include "tweak.h" #include #ifdef VMS /* some Multinet implementations don't have sys/stat.h */ #include "stat.h" #else #include #endif #include "ls.h" int namecmp PROTO2(LS *, a, LS *, b) { return(strcmp(a->name, b->name)); } int revnamecmp PROTO2(LS *, a, LS *, b) { return(strcmp(b->name, a->name)); } int modcmp PROTO2(LS *, a, LS *, b) { return(-(int)(a->lstat.st_mtime - b->lstat.st_mtime)); } int revmodcmp PROTO2(LS *, a, LS *, b) { return(-(int)(b->lstat.st_mtime - a->lstat.st_mtime)); } int acccmp PROTO2(LS *, a, LS *, b) { return(-(int)(a->lstat.st_atime - b->lstat.st_atime)); } int revacccmp PROTO2(LS *, a, LS *, b) { return(-(int)(b->lstat.st_atime - a->lstat.st_atime)); } int statcmp PROTO2(LS *, a, LS *, b) { return(-(int)(a->lstat.st_ctime - b->lstat.st_ctime)); } int revstatcmp PRO(FSP.SAV  [FSP.BSD_SRC]CMP.C;4MgTO2(LS *, a, LS *, b) { return(-(int)(b->lstat.st_ctime - a->lstat.st_ctime)); } *[FSP.BSD_SRC]CMP.OBJ;2+, ./F 4 - 0123KPWO56VEl7Q҃89GFHJ0CMPV1.031-OCT-1994 12:41VAX C V3.2-0445R CMPnamecmp revnamecmp (modcmp@ revmodcmp Xacccmpp revacccmpstatcmp revstatcmp k9STRCMPSTRCMP NAMECMP  REVNAMECMP (MODCMP @ REVMODCMP XACCCMP p WJFSP.SAV  [FSP.BSD_SRC]CMP.OBJ;2 REVACCCMP STATCMP REVSTATCMP$CODE $DATA F_ACCESSTIMEF_GROUPF_INODE F_KBLOCKS F_LONGFORM F_SINGLECOLF_SIZE F_STATUSTIMEF_TOTALF_TYPEP@(#)cmp.c 5.2 (Berkeley) 4/8/90P^ݼSTRCMP^ݼSTRCMP^ЬQЬPà**PPP^ЬQЬPà**PPP^ЬQЬPà&&PPP^ЬQЬPà&&PPP^ЬQЬPà..PPP^ЬQЬPà..PPP*[FSP.BSD_SRC]FIND.C;4+,%./F 4M- 0123KPWO56<$El7`R҃89GFHJ/*- * Copyright (c) 1991 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Cimarron D. Taylor of the University of California, Berkeley. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disc 0XFSP.SAV% [FSP.BSD_SRC]FIND.C;4Mlaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tweak.h" #ifdef VMS #include "types.h" #include "stat.h" #else #include QlCt6 fYVKcV8?!U&AMS~Z#^ ,84<,OgLf_T.v-3uI|A = $3[=ou*m^\U?< ^ %$-T^Qba)zw6| q+n1SfcD\mbR*|8np)eb@hUd%K"_bTQNQq"utey.]Avf^bT>y Zezu_O {Du0'I f.v/ "9bA:.[L2?gEE"SJ8&Px1[H-/:_T )c]J9H+tplV`7JF!}$ym "%bڨ-ZEIxNH/07UEv@8Uq{Z ?Z?\QV$?cDXy ^x0Jl> o߬ܺV[|AI # 7S 8M0s6e|" <[S!84/yEH;*̷c> QѰe-M@e: j~>0BrQ1>`nlLvU%,7mj;H~=. 7*|1c 0l b2b[mn9!\q m, '"*02eYf*LkqBOP"36=M$1|D!u4k1/;S?{|8g.jhUcP5[e="qJq0z X2dT1qn ECUOnmnRiL!8\\;?;# R3(uLv ,e}qplH^&AP-B}zmvK?[:R ;h8o-lw XCPWg+Ef1fK , APmHqX|&5lc_*._!JH!7*T|} asBf| d1T %HV.&Rc qU.RE2D:}&A&r5]7X:e{>F>xKK:yP:x|??"$Fj 5uxVrŜfn8>Uǧ\U-lj%?Edv2_vuyz_S91(jzp q@|#w<s}/~&765*|ZR D99; &DRzT}G0/O"4--;~l^GB\S?["hs8ys5x<u>dB^_:G"Uj&)m6f$, 9PT7^UMk~PTQ*n'Gt@mKW@] }Y1<4/U?jV< #include #endif #include #include #include "my-string.h" #include #include "find.h" extern int isoutput; PLAN *plan; int process; /* * find_formplan -- * process the command line and create a "plan" corresponding to the * command arguments. */ void find_formplan PROTO1(char **, argv) { PLAN *tail, *new; for (plan = NULL; *argv;) { if (!(new = find_create(&argv))) continue; if (plan == NULL) tail = plan = new; else { tail->next = new; tail = new; } } if (!isoutput) { new = c_print(); if (plan == NULL) tail = plan = new; else { tail->next = new; tail = new; } } plan = or_squish(not_squish(paren_squish(plan))); } *[FSP.BSD_SRC]FIND.OBJ;2+,3./F 4` - 0123KPWO56G$El7W R҃89GFHJ 1-FSP.SAV3 [FSP.BSD_SRC]FIND.OBJ;2O1FINDV1.031-OCT-1994 12:41VAX C V3.2-044aR FIND find_formplany S FIND_CREATE OR_SQUISH NOT_SQUISH PAREN_SQUISHC_PRINT FIND_FORMPLANy$CODE$DATAERRNO VAXC$ERRNOSTDINSTDOUTSTDERRISOUTPUTPLANPROCESSP ^Scռ(߬ FIND_CREATEPc PcPRPPbPRռC_PRINTcPcPbPRc PAREN_SQUISHP NOT_SQUISHP OR_SQUISHPc*[FSP.BSD_SRC]FNMATCH.C;4+,. /F 4M - 0123KPWO 56u(El7R҃89GFHJg4CFSP.SAV [FSP.BSD_SRC]FNMATCH.C;4M {/* * Copyright (c) 1989 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Guido van Rossum. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDIN@'FSP.SAV [FSP.BSD_SRC]FNMATCH.C;4M G, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * Function fnmatch() as proposed in Posix 1003.2 B.6 (rev. 9). * Compares a filename or pathname to a pattern. */ #include "tweak.h" #ifdef HAVE_UNISTD_H #ifndef __hpux #include #endif #endif #include "my-string.h" #define EOS '\0' static char *rangematch PROTO2(register char *, pattern, register char, test) { register char c, c2; int negate, ok; if (negate = (*pattern == '!')) ++pattern; /* * TO DO: quoting */ for (ok = 0; (c = *pattern++) != ']';) { if (c == EOS) return(NULL); /* illegal pattern */ if (*pattern == '-' && (c2 = pattern[1]) != EOS && c2 != ']') { if (c <= test && test <= c2) ok = 1; pattern += 2; } else if (c == test) ok = 1; } return(ok == negate ? NULL : pattern); } int fnmatch PROTO2(register char *, pattern, register char *, string) { register char c; char test; for (;;) switch (c = *pattern++) { case EOS: return(*string == EOS); case '?': if ((test = *string++) == EOS) return(0); break; case '*': c = *pattern; /* collapse multiple stars */ while (c == '*') c = *++pattern; \YLFSP.SAV [FSP.BSD_SRC]FNMATCH.C;4M ; /* optimize for pattern with * at end or before / */ if (c == EOS) return(1); /* general case, use recursion */ while ((test = *string) != EOS) { if (fnmatch(pattern, string)) return(1); ++string; } return(0); case '[': if ((test = *string++) == EOS) return(0); if ((pattern = rangematch(pattern, test)) == NULL) return(0); break; case '\\': if ((c = *pattern++) == EOS) { c = '\\'; --pattern; } if (c != *string++) return(0); break; default: if (c != *string++) return(0); break; } } *[FSP.BSD_SRC]FNMATCH.OBJ;2+,./F 4 - 0123KPWO56")El7-R҃89GFHJnFSP.SAV [FSP.BSD_SRC]FNMATCH.OBJ;27H4FNMATCHV1.031-OCT-1994 12:41VAX C V3.2-044RFNMATCH rangematchwxfnmatchN A=<FNMATCH xFNMATCH$CODE$DATAP<^ЬRQSb!SSURTPP]=PPb- SS]PQQSTR PPQTPP]TUSPRSSP^ЬSRYYT1(;T*1DT?13T[1TPP[P12?PTbTTPPcPP* ScPP*PPbPRSFNMATCHPPRbPPPSTPnnXPd!PPWTVPP]=PUFd-QQ]PnnQVT PnVPP]VWPPTPPUUS1PP\PSP1PY1PP`*[FSP.BSD_SRC]FUNCTION.C;4+,./F 4O - 0123KPWO56 'El7%R҃89GFHJP>FSP.SAV [FSP.BSD_SRC]FUNCTION.C;4O#/*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Cimarron D. Taylor of the University of California, Berkeley. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEdFSP.SAV [FSP.BSD_SRC]FUNCTION.C;4OMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tweak.h" #ifdef HAVE_UNISTD_H #ifndef __hpux #include #endif #endif #include #ifdef STDC_HEADERS #include #endif #include "my-string.h" #ifndef VMS #include #include #include #else #include "types.h" #include "stat.h" #include "param.h" #endif #ifdef HAVE_TZFILE_H #include #endif #ifndef VMS #include #else #include "wait.h" #endif #include "find.h" #define FIND_EQUAL 0 #define FIND_LESSTHAN 1 #define FIND_GREATER 2 #define COMPARE(a, b) { \ switch(plan->flags) { \ case FIND_EQUAL: \ return(a == b); \ case FIND_LESSTHAN: \ return(a < b); \ case FIND_GREATER: \ return(a > b); \ } \ return(0); \ } #ifdef HAVE_ANSI_PROTO static PLAN *palloc (enum ntype t, int (*f)()) #else static PLAN *palloc (t, f) enum ntype t; int (*f)(); #endif { PLAN *new; if (new = (PLAN *) malloc(sizeof(PLAN))) { new->type = t; new->eval = f; new->flags = 0; new->next = NULL; return(new); } perror("palloc"); exit(1); } extern int isoutput; exVFSP.SAV [FSP.BSD_SRC]FUNCTION.C;4Oֶtern int process; /* * find_parsenum -- * Parse a string of the form [+-]# and return the value. */ static long find_parsenum PROTO4(PLAN *, plan, char *, option, char *, str, char *, endch) { long value; char *endchar; /* pointer to character ending conversion */ /* determine comparison from leading + or - */ switch(*str) { case '+': ++str; plan->flags = FIND_GREATER; break; case '-': ++str; plan->flags = FIND_LESSTHAN; break; default: plan->flags = FIND_EQUAL; break; } /* * convert the string with strtol(). Note, if strtol() returns zero * and endchar points to the beginning of the string we know we have * a syntax error. */ value = strtol(str, &endchar, 10); if (!value && endchar == str || endchar[0] && (!endch || endchar[0] != *endch)) { fprintf(stderr,"%s: %s", option, "illegal numeric value"); exit(1); } if (endch) *endch = endchar[0]; return(value); } /* * -time n functions -- * * True if the difference between the file time and the * current time is n 24 hour periods. * */ static int find_time PROTO3(PLAN *, plan, struct stat *, sbuf, char *, path) { extern time_t now; /* with FSP sbuf.st_atime=sbuf.st_ctime=sbuf.st_mtime */ COMPARE((now - sbuf->st_atime + SECSPERDAY - 1) / SECSPERDAY, plan->t_data); } PLAN * c_time PROTO1(char *, arg) { PLAN *new; new = palloc(N_TIME, find_time); new->t_data = find_parsenum(new, "-time", arg, NULL); return(neFSP.SAV [FSP.BSD_SRC]FUNCTION.C;4OK/ w); } /* * brace_subst -- * Replace occurrences of {} in s1 with s2 and return the result string. */ void brace_subst PROTO4(char *, orig, char **, store, char *, path, int,len) { register int plen; register char ch, *p; plen = strlen(path); for (p = *store; ch = *orig; ++orig) if (ch == '{' && orig[1] == '}') { while ((p - *store) + plen > len) if (!(*store = (char *)realloc(*store, len *= 2))) { perror("realloc"); client_done(); exit(1); } bcopy(path, p, plen); p += plen; ++orig; } else *p++ = ch; *p = '\0'; } /* * queryuser -- * print a message to standard error and then read input from standard * input. If the input is 'y' then 1 is returned. */ int queryuser PROTO1(char **, argv) { int ch, first, nl; fprintf(stderr, "\"%s", *argv); while (*++argv) fprintf(stderr, " %s", *argv); fprintf(stderr, "\"? "); fflush(stderr); first = ch = getchar(); for (nl = 0;;) { if (ch == '\n') { nl = 1; break; } if (ch == EOF) break; ch = getchar(); } if (!nl) { fprintf(stderr, "\n"); fflush(stderr); } return(first == 'y'); } /* * [-exec | -ok] utility [arg ... ] ; functions -- * * True if the executed utility returns a zero value as exit status. * The end of the primary expression is delimited by a semicolon. If * "{}" occurs anywhere, it gets replaced by the current pathname. * The current directory for the execution of utility is the same[ y~7K~;2\uQCu+lMQa8>"sS&t_5:vI$_mGPZ8@y { D#kozZ^Y>6)s1cXw*MF-oyxGB wy:=`-.4e6Ni;7 )J[/4{Do "#n i8`g/sBY~0>0'.j>QT|ܥV;י_U)1;yKH_x[IX扠Ymcx9H * vn <&W^@C&ME'y'A5n=Ez0-qT OI%`Dc5t[)c\I6J0 pNe*Vr\0o8'(oAQ ݣXCr.\N!eF&P):$~] p=yhc0r)rbV^rZm_8V.Z$ix-H r9#̯Y˻,;b ]pz$ {pBij˒BeQulX9RN{n6x4"j WiNh4s5yвX@RngcY̼it3M3ŘaqJU` H (UAIΘ;,\-reY v%"t¿y)gA +WqPQmMdDUTcBgxUTsTr!C o  AtJyoC3Ar ^ xUK%ASAc\;qfY@>jn>$/3$7 Nr_1im`p Rsr87787=<{H0ğ0,"ZIb ]yk1ԹC M wy2xw:E[KJ\8S? SUDCJ zt&3&?#eL"JA^EhTH?V=^[^/"L)h"U'cJ$Gi AjKDRWQH A_,@mPY9fZrEq#C&7TDH@FH,{TByvhvrupW,+ ?tvs>-;Rw&GtO4UVT1i3n'Wix6ox/Vve[A(%&026$%WR;*:Z7=V{]_|.Ŕ!nNuټ3yV "j{XVJ}s+csHNzu'l4tbc4!:k2X0SlޅdLi%eh%L`O F9Vgm wrK|>".CkToHaL˚?nAR{\1~0el]"Jj 1VGFaZuR_XZs3;sN_qXO<$X~wx@)jRgM~!9Z9e;@5qEV1b=: >7zo}hc|a,|hmJKE=OJpLMI4mbos3EEQb!P(@DIyWip,'H&}uGtCx#xMz)=w/{[pEI)4ZG itj|\MI/~N2CEWx7H1 $]fib]UVI;9$g3YpX"ZWpU8R\GT7icM-+1i`o.%X-8}YbWS l/FSP.SAV [FSP.BSD_SRC]FUNCTION.C;4Or\ as * the current directory when the find utility was started. * * The primary -ok is different in that it requests affirmation of the * user before executing the utility. */ static int find_exec PROTO3(PLAN *, plan, struct stat *, sbuf, char *, path) { register int cnt; pid_t pid; #ifndef HAVE_UNION_WAIT int status; #else union wait status; #endif for (cnt = 0; plan->e_argv[cnt]; ++cnt) if (plan->e_len[cnt]) brace_subst(plan->e_orig[cnt], &plan->e_argv[cnt], path, plan->e_len[cnt]); if (plan->flags && !queryuser(plan->e_argv)) return(0); #ifndef VMS switch(pid = fork()) #else switch(pid = vfork()) #endif { case -1: perror ("fork"); exit(1); case 0: execvp(plan->e_argv[0], plan->e_argv); perror ("execvp"); exit(1); } pid = wait(&status); return(pid != -1 && WIFEXITED(status) && !WEXITSTATUS(status)); } char *emalloc_ffind PROTO1(unsigned int, len) { char *p; if (p = (char *)malloc(len)) return((char *)p); perror("malloc"); exit(1); } /* * c_exec -- * build three parallel arrays, one with pointers to the strings passed * on the command line, one with (possibly duplicated) pointers to the * argv array, and one with integer values that are lengths of the * strings, but also flags meaning that the string has to be massaged. */ PLAN *c_exec PROTO2(char ***, argvp, int, isok) { PLAN *new; /* node returned */ register int cnt; register char **argv, **ap, *p; isoutput = 1; new = palloc(N_EXEC, find_e FSP.SAV [FSP.BSD_SRC]FUNCTION.C;4OCxec); new->flags = isok; for (ap = argv = *argvp;; ++ap) { if (!*ap) { fprintf(stderr,"%s: no terminating", isok ? "-ok" : "-exec"); exit(1); } if (**ap == ';') break; } cnt = ap - *argvp + 1; new->e_argv = (char **)emalloc_ffind((unsigned int)cnt * sizeof(char *)); new->e_orig = (char **)emalloc_ffind((unsigned int)cnt * sizeof(char *)); new->e_len = (int *)emalloc_ffind((unsigned int)cnt * sizeof(int)); for (argv = *argvp, cnt = 0; argv < ap; ++argv, ++cnt) { new->e_orig[cnt] = *argv; for (p = *argv; *p; ++p) if (p[0] == '{' && p[1] == '}') { new->e_argv[cnt] = (char *)emalloc_ffind((unsigned int)MAXPATHLEN); new->e_len[cnt] = MAXPATHLEN; break; } if (!*p) { new->e_argv[cnt] = *argv; new->e_len[cnt] = 0; } } new->e_argv[cnt] = new->e_orig[cnt] = NULL; *argvp = argv + 1; return(new); } int printtime_ffind PROTO1(time_t, ftime) { int i; char *longstring; longstring = (char *)ctime((long *)&ftime); for (i = 4; i < 11; ++i) putchar(longstring[i]); #define SIXMONTHS ((DAYSPERNYEAR / 2) * SECSPERDAY) if (ftime + SIXMONTHS > time((time_t *)NULL)) for (i = 11; i < 16; ++i) putchar(longstring[i]); else { (void)putchar(' '); for (i = 20; i < 24; ++i) putchar(longstring[i]); } putchar(' '); } #define BLK(A) (((A)+1023)/1024) void printlong_ffind PROTO2(char *, name, struct stat *, sb) { char *modep; printf("%4ld ", BLK(sb->st_size)); modep = ((S_IFDIR & sb->st_m;rFSP.SAV [FSP.BSD_SRC]FUNCTION.C;4OEode)) ? "drwxrwxrwx" : "-rw-rw-rw-" ; printf("%s %3u %-*s %-*s ", modep, sb->st_nlink, 8, "nobody", 8, "nobody"); printf("%8ld ", sb->st_size); printtime_ffind(sb->st_mtime); printf("%s", name); putchar('\n'); } /* * -ls functions -- * * Always true - prints the current sbuf to stdout in "ls" format. */ static int find_ls PROTO3(PLAN *, plan, struct stat *, sbuf, char *, path) { printlong_ffind(path, sbuf); return(1); } PLAN *c_ls PROTO0((void)) { isoutput = 1; return(palloc(N_LS, find_ls)); } /* * -name functions -- * * True if the basename of the filename being examined * matches pattern using Pattern Matching Notation S3.14 */ static int find_name PROTO3(PLAN *, plan, struct stat *, sbuf, char *, path) { register char *name; /* extract filename */ for (name = path + strlen(path); name > path && *name != '/'; name--); if (*name == '/') name++; return(fnmatch(plan->c_data, name)); } PLAN *c_name PROTO1(char *, pattern) { PLAN *new; new = palloc(N_NAME, find_name); new->c_data = pattern; return(new); } /* * -newer file functions -- * * True if the current file has been modified more recently * then the modification time of the file named by the pathname * file. */ static int find_newer PROTO3(PLAN *, plan, struct stat *, sbuf, char *, path) { return(sbuf->st_mtime > plan->t_data); } PLAN *c_newer PROTO1(char *, filename) { PLAN *new; struct stat sb; if (stat(filename, &sb)) { perror("stat"); exit(1); } new = palloc(N_NEWERd%FSP.SAV [FSP.BSD_SRC]FUNCTION.C;4Oz, find_newer); new->t_data = sb.st_mtime; return(new); } /* * -print functions -- * * Always true, causes the current pathame to be written to * standard output. */ static int find_print PROTO3(PLAN *, plan, struct stat *, sbuf, char *, path) { (void)printf("%s\n", path); return(1); } PLAN *c_print PROTO0((void)) { isoutput = 1; return(palloc(N_PRINT, find_print)); } /* * -prune functions -- * * Prune a portion of the hierarchy. */ static int find_prune PROTO3(PLAN *, plan, struct stat *, sbuf, char *, path) { process = -1; return(1); } PLAN *c_prune PROTO0((void)) { return(palloc(N_PRUNE, find_prune)); } /* * -size n[c] functions -- * * True if the file size in bytes, divided by an implementation defined * value and rounded up to the next integer, is n. If n is followed by * a c, the size is in bytes. */ #define FIND_SIZE 512 static int divsize = 1; static int find_size PROTO3(PLAN *, plan, struct stat *, sbuf, char *, path) { off_t size; size = divsize ? ((sbuf->st_size + FIND_SIZE - 1)/FIND_SIZE) : sbuf->st_size; COMPARE(size, plan->o_data); } PLAN *c_size PROTO1(char *, arg) { PLAN *new; char endch='c'; new = palloc(N_SIZE, find_size); new->o_data = find_parsenum(new, "-size", arg, &endch); if (endch == 'c') divsize = 0; return(new); } /* * -type c functions -- * * True if the type of the file is c, where c is d or f for * directory or regular file, respectively. */ static int find_type PROTO3(PLAN *, plan, struct stat *, sbuf, ctDFSP.SAV [FSP.BSD_SRC]FUNCTION.C;4O6har *, path) { return((sbuf->st_mode & S_IFMT) == plan->m_data); } PLAN *c_type PROTO1(char *, typestring) { PLAN *new; mode_t mask; switch (typestring[0]) { case 'd': mask = S_IFDIR; break; case 'f': mask = S_IFREG; break; default: fprintf(stderr,"-type: unknown type"); exit(1); } new = palloc(N_TYPE, find_type); new->m_data = mask; return(new); } /* * ( expression ) functions -- * * True if expression is true. */ int find_expr PROTO3(PLAN *, plan, struct stat *, sbuf, char *, path) { register PLAN *p; register int state; for(p=plan->p_data[0]; p && (state=(p->eval)(p, sbuf, path)); p=p->next); return(state); } /* * N_OPENPAREN and N_CLOSEPAREN nodes are temporary place markers. They are * eliminated during phase 2 of find_formplan() --- the '(' node is converted * to a N_EXPR node containing the expression and the ')' node is discarded. */ PLAN *c_openparen PROTO0((void)) { return(palloc(N_OPENPAREN, (int (*)())-1)); } PLAN *c_closeparen PROTO0((void)) { return(palloc(N_CLOSEPAREN, (int (*)())-1)); } /* * ! expression functions -- * * Negation of a primary; the unary NOT operator. */ static int find_not PROTO3(PLAN *, plan, struct stat *, sbuf, char *, path) { register PLAN *p; register int state; for(p=plan->p_data[0]; p && (state=(p->eval)(p, sbuf, path)); p=p->next); return(!state); } PLAN *c_not PROTO0((void)) { return(palloc(N_NOT, find_not)); } /* * expression -o expression fulOFSP.SAV [FSP.BSD_SRC]FUNCTION.C;4O1:nctions -- * * Alternation of primaries; the OR operator. The second expression is * not evaluated if the first expression is true. */ static int find_or PROTO3(PLAN *, plan, struct stat *, sbuf, char *, path) { register PLAN *p; register int state; for(p=plan->p_data[0]; p && (state=(p->eval)(p, sbuf, path)); p=p->next); if (state) return(1); for(p=plan->p_data[1]; p && (state=(p->eval)(p, sbuf, path)); p=p->next); return(state); } PLAN *c_or PROTO0((void)) { return(palloc(N_OR, find_or)); } *[FSP.BSD_SRC]FUNCTION.OBJ;2+,./F 4X - 0123KPWO56\U'El7.R҃89GFHJFSP.SAV SP.BSD_SRC]FUNCTION.OBJ;25FUNCTIONV1.031-OCT-1994 12:41VAX C V3.2-044PpallocP%s: %sPillegal numeric value$P-time*Prealloc2P"%s6P %s:P"? >P @PforkEPexecvpLPmallocSP%s: no terminatingfP-execlP-okpP%4ld vP-rw-rw-rw-PdrwxrwxrwxP%s %3u %-*s %-*s PnobodyPnobodyP%8ld P%sPstatP%s PP-sizeP-type: unknown typeP^MALLOCPЬ ЬԠ`PERROREXITP ^S PP+VP(?P֬ ЬPP֬ ЬP PЬPԠ ߭ݬ STRTOLPRЭQRQ a*ЬPa`ߣݬߣFPRINTFEXITЬP`RP ^SЬQСPPP1P?PЬPàcRQRQRPeFPRINTFeFFLUSHRWyRRPP<^URެTdS޳SBc?"CFSP.SAV SP.BSD_SRC]FUNCTION.OBJ;2+-SBdPBݬ BB BRACE_SUBSTRBЬRբݢ QUERYUSERPPVFORKPR2RRR R{0&K9lU6p { KFNdRY8lQH>4޹z'X_P6+je v*靛{)5 ηvx2#is񋏿:<2LPKէíЊ%%:PߟbFRV`nCLK&3 gNPf`c)v-Umf=?*L9|Yզ1+ݔeΔ0|̙fL@RrBQiջSTw &-4r#PJv%iy} sH|dXQ2-Ԉ&[I̔Ycf] ņHAڣ2rfѫ1aM5eCqC"Zjn)zY`6ƒ>ZT "ƋK@o]gDK%=B!g|0[HXw;gxQq"XY&0ښl:e1'Yo |4E]f<8ہy6c̞4żpM45ݾ4{zēBdqgh( 1Di'i mC* tىl#JzdX_a>Zf"9ȑz  QB}|i˩fC/%^Z͜"aJQ0`8ؐ'k Ĵ;9Bd~"uFSP.SAV SP.BSD_SRC]FUNCTION.OBJ;2ի J   i ( C_NAME |C_NEWER ( C_PRINT C_PRUNE h |C_SIZE  |C_TYPE FIND_EXPR C_OPENPAREN ( C_CLOSEPAREN C_NOT t C_OR$CODE$DATASTDINSTDOUTSTDERR$CHAR_STRING_CONSTANTSISOUTPUTPROCESSNOWyRMALLOCPS RԠ`P\PERROREXIT\P P ' P /PSPP0 *[FSP.BSD_SRC]GLOB.C;4+,./F 4N- 0123KPWO56El76R҃89GFHJ#GuFSP.SAV [FSP.BSD_SRC]GLOB.C;4NC/* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, * advertising materials, and other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ /* 24-DEC-92 Modified for use with VMS-fsp V2.6.3 * 27-JAN-93 Stripped leading spaces in arguments * 17-MAY-93 Removed all VMS modifications */ #ifndef lint static char sccsid[] = "@(#)glob.c 5.4 (Berkeley) 6/29/88"; #endif /* not lint */ /* * C-shell glob for random programs. */ #include "tweak.h" #include "client_def.h" #include "c_extern.h" #define QUOTE 0200 #define TRIM 0177 #define eq(a,b) (strcmp(a, b)==0) #define GAVSIZ (NCARGS/6) #define isdir(d) ((d.st_mode & S_IFMT) == S_IFDIR) static char **gargv; /* Pointer to the (stack) arglist */ static int gargc; /* Number args in gargv */ static int gnleft;$amvFSP.SAV [FSP.BSD_SRC]GLOB.C;4N static int gflag; char *globerr; extern int errno; static int globcnt; char *globchars = "`{[*?"; static char *gpath, *gpathp, *lastgpathp; static int globbed; static char *entp; static char **sortbas; static int any PROTO2(register int, c, register char *, s) { while (*s) if (*s++ == c) return(1); return(0); } static int tglob PROTO1(char, c) { if (any(c, globchars)) gflag |= c == '{' ? 2 : 1; return (c); } static int addpath PROTO1(char, c) { if (gpathp >= lastgpathp) globerr = "Pathname too long"; else { *gpathp++ = c; *gpathp = 0; } } static int ginit PROTO1(char **, agargv) { agargv[0] = 0; gargv = agargv; sortbas = agargv; gargc = 0; gnleft = NCARGS - 4; } static int sort PROTO0((void)) { register char **p1, **p2, *c; char **Gvp = &gargv[gargc]; p1 = sortbas; while (p1 < Gvp-1) { p2 = p1; while (++p2 < Gvp) if (strcmp(*p1, *p2) > 0) { c = *p1; *p1 = *p2; *p2 = c; } p1++; } sortbas = Gvp; } static char *strspl PROTO2(register char *, cp, register char *, dp) { register char *ep = (char *)malloc((unsigned)(strlen(cp) + strlen(dp) + 1)); if (ep == (char *)0) { perror("Out of memory 1"); exit(1); } (void) strcpy(ep, cp); (void) strcat(ep, dp); return (ep); } static int Gcat PROTO2(char *, s1, char *, s2) { register int len = strlen(s1) + strlen(s2) + 1; if (len >= gnleft || gargc >= GAVSIZ - 1) globerr = "Arguments too long"; else { gargc++; gnleft -= len; gargv[gargc] = 0; g%ITFSP.SAV [FSP.BSD_SRC]GLOB.C;4NFargv[gargc - 1] = strspl(s1, s2); } } static int execbrc PROTO0((char *, char *)); static int expand PROTO1(char *, as) { register char *cs; register char *sgpathp, *oldcs; struct stat stb; sgpathp = gpathp; cs = as; while (!any(*cs, globchars)) { if (*cs == 0) { if (!globbed) Gcat(gpath, ""); else if (util_stat(gpath, &stb) >= 0) { Gcat(gpath, ""); globcnt++; } break; } addpath(*cs++); } if(*cs) { oldcs = cs; while (cs > as && *cs != '/') { cs--; gpathp--; } if (*cs == '/') { cs++; gpathp++; } *gpathp = 0; if (*oldcs == '{') { (void) execbrc(cs, ((char *)0)); return; } matchdir(cs); } gpathp = sgpathp; *gpathp = 0; } static int amatch PROTO2(char *, s, char *, p) { register int scc; int ok, lc; char *sgpathp; struct stat stb; int c, cc; globbed = 1; for (;;) { scc = *s++ & TRIM; switch (c = *p++) { case '{': return (execbrc(p - 1, s - 1)); case '[': ok = 0; lc = 077777; while (cc = *p++) { if (cc == ']') { if (ok) break; return (0); } if (cc == '-') { if (lc <= scc && scc <= *p++) ok++; } else if (scc == (lc = cc)) ok++; } if (cc == 0) { if (ok) p--; else return 0; } continue; case '*': if (!*p) return (1); if (*p == '/') { p++; goto slash;&W3өFSP.SAV [FSP.BSD_SRC]GLOB.C;4N } s--; do { if (amatch(s, p)) return (1); } while (*s++); return (0); case 0: return (scc == 0); default: if (c != scc) return (0); continue; case '?': if (scc == 0) return (0); continue; case '/': if (scc) return (0); slash: s = entp; sgpathp = gpathp; while (*s) addpath(*s++); addpath('/'); if (util_stat(gpath, &stb) == 0 && isdir(stb)) if (*p == 0) { Gcat(gpath, ""); globcnt++; } else expand(p); gpathp = sgpathp; *gpathp = 0; return (0); } } } static int match PROTO2(char *, s, char *, p) { register int c; register char *sentp; char sglobbed = globbed; if (*s == '.' && *p != '.') return (0); sentp = entp; entp = s; c = amatch(s, p); entp = sentp; globbed = sglobbed; return (c); } int matchdir PROTO1(char *, pattern) { struct stat stb; register struct rdirent *dp; RDIR *dirp; dirp = util_opendir(gpath); if (dirp == NULL) { if (globbed) return; globerr = "Bad directory components"; return; } if (util_stat(gpath, &stb) < 0) { util_closedir(dirp); globerr = "Bad directory components"; } if (!isdir(stb)) { errno = ENOTDIR; util_closedir(dirp); globerr = "Bad directory components"; } while ((dp = util_readdir(dirp)) != NULL) { if (dp->d_fileno == 0) continue; if (match(dp->d_name, pattern)) { '9FSP.SAV [FSP.BSD_SRC]GLOB.C;4N15 Gcat(gpath, dp->d_name); globcnt++; } } util_closedir(dirp); } static int execbrc PROTO2(char *, p, char *, s) { char restbuf[BUFSIZ + 2]; register char *pe, *pm, *pl; int brclev = 0; char *lm, savec, *sgpathp; for (lm = restbuf; *p != '{'; *lm++ = *p++); for (pe = ++p; *pe; pe++) switch (*pe) { case '{': brclev++; continue; case '}': if (brclev == 0) goto pend; brclev--; continue; case '[': for (pe++; *pe && *pe != ']'; pe++); } pend: brclev = 0; for (pl = pm = p; pm <= pe; pm++) switch (*pm & (QUOTE|TRIM)) { case '{': brclev++; continue; case '}': if (brclev) { brclev--; continue; } goto doit; case ','|QUOTE: case ',': if (brclev) continue; doit: savec = *pm; *pm = 0; (void) strcpy(lm, pl); (void) strcat(restbuf, pe + 1); *pm = savec; if (s == 0) { sgpathp = gpathp; expand(restbuf); gpathp = sgpathp; *gpathp = 0; } else if (amatch(s, restbuf)) return (1); sort(); pl = pm + 1; if (brclev) return (0); continue; case '[': for (pm++; *pm && *pm != ']'; pm++); if (!*pm) pm--; continue; } if (brclev) goto doit; return (0); } int acollect PROTO1(register char *, as) { register int ogargc = gargc; gpathp = gpath; *gpathp = 0; globbed = 0; expand(as); if (gargc != (R侮FSP.SAV [FSP.BSD_SRC]GLOB.C;4Nogargc) sort(); } static int collect PROTO1(register char *, as) { if (eq(as, "{") || eq(as, "{}")) { Gcat(as, ""); sort(); } else acollect(as); } static int blkfree PROTO1(char **, av0) { register char **av = av0; while (*av) free(*av++); } static int blklen PROTO1(register char **, av) { register int i = 0; while (*av++) i++; return (i); } static char **blkcpy PROTO2(char **, oav, register char **, bv) { register char **av = oav; while (*av++ = *bv++) continue; return (oav); } static char **copyblk PROTO1(register char **, v) { register char **nv; nv = (char **)malloc((unsigned)((blklen(v) + 1) * sizeof(char **))); if (nv == (char **)0) { perror("Out of memory 2"); exit(2); } return (blkcpy(nv, v)); } #ifdef HAVE_ANSI_PROTO typedef int (*charfunc) (char) ; static int rscan (register char **t, charfunc f) #else static int rscan(t, f) register char **t; int (*f)(); #endif { register char *p, c; while (p = *t++) { #ifdef HAVE_ANSI_PROTO if (f == (charfunc) tglob) #else if (f == tglob) #endif if (*p == '~') gflag |= 2; else if (eq(p, "{") || eq(p, "{}")) continue; while (c = *p++) (*f)(c); } } char **glob PROTO1(register char *, v) { char agpath[BUFSIZ]; char *agargv[GAVSIZ]; char *vv[2]; vv[0] = v; vv[1] = 0; gflag = 0; #ifdef HAVE_ANSI_PROTO rscan(vv, (charfunc) tglob); #else rscan(vv, tglob); #endif if (gflag == 0) return (copyblk(vv)); globerr = 0; gpath = agpath; gpathp = gpath; *gpathp = 0)QFSP.SAV [FSP.BSD_SRC]GLOB.C;4N,; lastgpathp = &gpath[sizeof agpath - 2]; ginit(agargv); globcnt = 0; collect(v); if (globcnt == 0 && (gflag&1)) { blkfree(gargv), gargv = 0; return (0); } else return (gargv = copyblk(gargv)); } *[FSP.BSD_SRC]GLOB.OBJ;2+,. /F 4  - 0123KPWO 56\`El7`?R҃89GFHJ1GLOBV1.031-OCT-1994 12:40VAX C V3.2-044P@(#)glob.c 5.4 (Berkeley) 6/29/88P`{[*?PPPathname too longPOut of memory 1(PArguments too long>PBad directory componentsWPBad directory componentspPBad directory componentsP{P{}POut of memory 2P{P{}P^ЬP`PQQP`P ^SRQaPPRP PaPP{RPRRPP0P ^SQСkݣ8+pmFSP.SAV [FSP.BSD_SRC]GLOB.OBJ;2 e UTIL_STATP Z UTIL_CLOSEDIRީWk$qV* tλS 3t(v)l_ V΁hBr y>~no/'.䖃tEdP4jpI[8rcԯprտ5󥕮&P3dӍ@zUS_jP;qWU:ySa %5}6a{!rmf> T%%a;ݥASc_|,+vRa36=~b}&_="&f<>?.a/;GFVlou lTwt:shHLN ]fάA\&,j-cCNլ+TF znWn %#7M+7Z}`[ Jcg(/pkIEgYP{?5zm1u!''FU5 x1>Tw>j~:% a<$OIޤjDE.C=ﶼ-^J?g5ɫDpwbBԖMvAtU9>UTEp ڋ%8ux;p;МGR(LFD_73{@"a?-7A‰}}D:|_+HMd^)׽P\9B&B= 4qpw 7;kb,<&kjDd暊LDd '5t˸tok"DryA_ |DmCe,hT>f9.'N{97=bg<;tTkxɮkhb;,"@ ?Mv*ACW,yrC39mr~UUPO#ݏPj-ZZ^(JEl5W&DQ/=ER xwOORkjMZ }{KsA@a 3%s게o@'\f9^zS1Ϩ"4e=0f!)V0ʤfΊ !tq8ӱ3/f]v0SIٽz9ME >U܃{N(>,AcY40g^t9&s.dڍK#nqQ"t q;aJo31ogs'Ɉ'՛hJsOL݋Z;݈Mcy,]^8a40>\!F0G)M ODEIķ S"ARW?+H@8&zy` k-b"FSP.SAV [FSP.BSD_SRC]GLOB.OBJ;2 .RjbS[rYSTRCMPXPUY)c~ 0PƟShPơShR GLOB any$ $tglobTxaddpath8 ginit$ sortd 8strspli Gcat `expand0 amatch< match<matchdirexecbrc acollect} collect0 blkfree P blklen l blkcpy' copyblka  rscanq l glob(  ACOLLECTMATCHDIR UTIL_STAT UTIL_READDIR UTIL_CLOSEDIR UTIL_OPENDIRPERRORSTRCMPSTRCATSTRCPYEXITVAXC$MALLOC_OPTSTRLENSTRLENMATCHDIRSTRCATSTRCPYSTRCMP VAXC$FREE_OPTEXITVAXC$MALLOC_OPTSTRCMP MATCHDIR  ACOLLECT l GLOB $CODEP$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACECLIENT_INT.P˳FSP.SAV [FSP.BSD_SRC]GLOB.OBJ;2 n R_STATE KEY_PERSISTS TARGET_DELAY UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUTGLOBERR GLOBCHARS$CHAR_STRING_CONSTANTSPR R~eRЮRjbSէ0 ͠}͠ȧ8Ч8<<Ч8R@ͨʮԾЮ$ЮLԧ( #endif #include "my-string.h" #include "ls.h" static char path[2*1024 + 1]; static char *endofpath = path; int (*sortfcn)PROTO0((LS *, LS*)); void (*printfcn)PROTO0((LS *, int)); int termwidth = 80; /* default terminal width */ /* flags */ int f_accesstime; /* use time of last access */ int f_column; /* columnated format */ int f_group; /* show group ownership of a file */ int f_ignorelink; /* indirect through symbolic link operands */ int f_inode; /* print inode */ int f_kblocks; /* print size in kilobytes */ int f_listalldot; /* list . and .. as well */0GFSP.SAV [FSP.BSD_SRC]LS.C;4M int f_listdir; /* list actual directory, not contents */ int f_listdot; /* list files beginning with . */ int f_longform; /* long listing format */ int f_needstat; /* if need to stat files */ int f_newline; /* if precede with newline */ int f_nonprint; /* show unprintables as ? */ int f_nosort; /* don't sort output */ int f_recursive; /* ls subdirectories also */ int f_reversesort; /* reverse whatever sort is used */ int f_singlecol; /* use single column output */ int f_size; /* list size in short listing */ int f_statustime; /* use time of last mode change */ int f_dirname; /* if precede with directory name */ int f_timesort; /* sort by time vice name */ int f_total; /* if precede with "total" line */ int f_type; /* add type character for non-regular files */ int tabdir PROTO2(LS *, lp, LS **, s_stats) { register RDIR *dirp; register int cnt, maxentry, maxlen; register char *p; struct rdirent *dp; unsigned long blocks; LS *stats; if (!(dirp = util_opendir("."))) { perror(lp->name); return(0); } blocks = maxentry = maxlen = 0; stats = NULL; for (cnt = 0; dp = util_readdir(dirp);) { /* this does -A and -a */ p = dp->d_name; if (p[0] == '.') { if (!f_listdot) continue; if (!f_listalldot && (!p[1] || p[1] == '.' && !p[2])) continue; } if (cnt == maxentry) { #define DEFNUM 256 maxentry += DEFNUM; if(stats) { *s_stats = stats = (LS *)realloc((char *)stats, (unsigned int)maxentry * sizeof(LS)); if (!*s_s1`$FSP.SAV [FSP.BSD_SRC]LS.C;4MDtats) nomem(); } else { *s_stats = stats = (LS *)malloc((unsigned int)maxentry * sizeof(LS)); if (!*s_stats) nomem(); } } if (f_needstat && util_stat(dp->d_name, &stats[cnt].lstat)) { /* * don't exit -- this could be an NFS mount that has * gone away. Flush stdout so the messages line up. */ (void)fflush(stdout); perror(dp->d_name); continue; } stats[cnt].name = dp->d_name; /* * get the inode from the directory, so the -f flag * works right. */ #ifndef VMS stats[cnt].lstat.st_ino = dp->d_fileno; #endif /* save name length for -C format */ stats[cnt].len = dp->d_namlen; /* calculate number of blocks if -l/-s formats */ if (f_longform || f_size) blocks += (stats[cnt].lstat.st_size+1023)/1024; /* save max length if -C format */ if (f_column && maxlen < (int)dp->d_namlen) maxlen = dp->d_namlen; ++cnt; } (void)util_closedir(dirp); if (cnt) { stats[0].lstat.st_btotal = blocks; stats[0].lstat.st_maxlen = maxlen; } else if (stats) { (void)free((char *)stats); } return(cnt); } static int displaydir PROTO0((LS *, register int)); static int subdir PROTO1(LS *, lp) { LS *stats; int num; if (f_newline) (void)putchar('\n'); if (f_dirname) (void)printf("%s:\n", path); if (util_cd2(lp->name)) { perror(lp->name); return; } if (num = tabdir(lp, &stats)) { displaydir(stats, num); (void)free((char *)stats); } if (util_cd2(2*FSP.SAV [FSP.BSD_SRC]LS.C;4M "..")) { perror(".."); ls_bad(1); } } static int displaydir PROTO2(LS *, stats, register int, num) { register char *p, *savedpath; LS *lp; if (num > 1 && !f_nosort) { unsigned long save1, save2; save1 = stats[0].lstat.st_btotal; save2 = stats[0].lstat.st_maxlen; qsort((char *)stats, num, sizeof(LS), sortfcn); stats[0].lstat.st_btotal = save1; stats[0].lstat.st_maxlen = save2; } printfcn(stats, num); if (f_recursive) { savedpath = endofpath; for (lp = stats; num--; ++lp) { if (!(S_ISDIR(lp->lstat.st_mode))) continue; p = lp->name; if (p[0] == '.' && (!p[1] || p[1] == '.' && !p[2])) continue; if (endofpath != path && endofpath[-1] != '/') *endofpath++ = '/'; for (; *endofpath = *p++; ++endofpath); f_newline = f_dirname = f_total = 1; subdir(lp); *(endofpath = savedpath) = '\0'; } } } static int doargs PROTO2(int, argc, char **, argv) { register LS *dstatp, *rstatp; register int cnt, dircnt, dirmax, maxlen, regcnt, regmax; LS *dstats, *rstats; struct stat sb; char top[2*1024 + 1], **av, *av2[2]; unsigned long blocks; /* * walk through the operands, building separate arrays of LS * structures for directory and non-directory files. */ dstats = rstats = NULL; dirmax = regmax = 0; for (dircnt = regcnt = 0; *argv; ++argv) { if(!(av = glob(*argv))) { av = av2; av2[0] = *argv; av2[1] = 0; } for( ; *av; av++) { if (util_stat(*av, &sb)) { 3s<FSP.SAV [FSP.BSD_SRC]LS.C;4M,7 perror(*av); if (errno == ENOENT) continue; ls_bad(1); } if ((S_ISDIR(sb.st_mode)) && !f_listdir) { if(dirmax == dircnt) { dirmax += 10; if (!dstats) { dstatp = dstats = (LS *)emalloc(dirmax * (sizeof(LS))); } else { dstats = (LS *)realloc(dstats, dirmax * (sizeof(LS))); dstatp = dstats + dircnt; } } dstatp->name = *av; dstatp->lstat = sb; ++dstatp; ++dircnt; } else { if(regmax == regcnt) { regmax += 10; if (!rstats) { blocks = 0; maxlen = -1; rstatp = rstats = (LS *)emalloc(regmax * (sizeof(LS))); } else { rstats = (LS *)realloc(rstats, regmax * (sizeof(LS))); rstatp = rstats + regcnt; } } rstatp->name = *av; rstatp->lstat = sb; /* save name length for -C format */ rstatp->len = strlen(*av); if (f_nonprint) prcopy(*av, *av, rstatp->len); /* calculate number of blocks if -l/-s formats */ if (f_longform || f_size) blocks += (sb.st_size + 1023)/1024; /* save max length if -C format */ if (f_column && maxlen < rstatp->len) maxlen = rstatp->len; ++rstatp; ++regcnt; } } } /* display regular files */ if (regcnt) { rstats[0].lstat.st_btotal = blocks; rstats[0].lstat.st_maxlen = maxlen; displaydir(rstats, regcnt); f_newline = f_dirname = 1; } /* display directories */ if (dircnt) { register char *p; f_total = 1; if (dircnt > 1) { (void)util_getwd(top); qsort((char *)dstats, dircnt, sizeof(LS), sortfcn); f_dir4*U2FSP.SAV [FSP.BSD_SRC]LS.C;4M;name = 1; } for (cnt = 0; cnt < dircnt; ++dstats) { for (endofpath = path, p = dstats->name; *endofpath = *p++; ++endofpath); subdir(dstats); f_newline = 1; if (++cnt < dircnt && util_cd2(top)) { perror(top); ls_bad(1); } } } } void fls_main PROTO2(int, argc, char **, argv) { extern int optind; int ch; char *p; /* terminal defaults to -Cq, non-terminal defaults to -1 */ if (isatty(1)) { f_nonprint = 1; termwidth = 80; #ifdef TIOCGWINSZ { struct winsize win; if (ioctl(1, TIOCGWINSZ, &win) == -1 || !win.ws_col) { if (p = (char *)getenv("COLUMNS")) termwidth = atoi(p); } else termwidth = win.ws_col; } #endif f_column = 1; } else f_singlecol = 1; /* root is -A automatically */ if (!getuid()) f_listdot = 1; while ((ch = getopt(argc, argv, "1ACFLRacdfgiklqrstu")) != EOF) { switch (ch) { /* * -1, -C and -l all override each other * so shell aliasing works right */ case '1': f_singlecol = 1; f_column = f_longform = 0; break; case 'C': f_column = 1; f_longform = f_singlecol = 0; break; case 'l': f_longform = 1; f_column = f_singlecol = 0; break; /* -c and -u override each other */ case 'c': f_statustime = 1; f_accesstime = 0; break; case 'u': f_accesstime = 1; f_statustime = 0; break; case 'F': f_type = 1; 5LFSP.SAV [FSP.BSD_SRC]LS.C;4Mg break; case 'L': f_ignorelink = 1; break; case 'R': f_recursive = 1; break; case 'a': f_listalldot = 1; /* FALLTHROUGH */ case 'A': f_listdot = 1; break; case 'd': f_listdir = 1; break; case 'f': f_nosort = 1; break; case 'g': f_group = 1; break; case 'i': f_inode = 1; break; case 'k': f_kblocks = 1; break; case 'q': f_nonprint = 1; break; case 'r': f_reversesort = 1; break; case 's': f_size = 1; break; case 't': f_timesort = 1; break; case '?': default: usage(); } } argc -= optind; argv += optind; /* -d turns off -R */ if (f_listdir) f_recursive = 0; /* if need to stat files */ f_needstat = f_longform || f_recursive || f_timesort || f_size || f_type; /* select a sort function */ if (f_reversesort) { if (!f_timesort) sortfcn = revnamecmp; else if (f_accesstime) sortfcn = revacccmp; else if (f_statustime) sortfcn = revstatcmp; else sortfcn = revmodcmp; /* use modification time */ } else { if (!f_timesort) sortfcn = namecmp; else if (f_accesstime) sortfcn = acccmp; else if (f_statustime) sortfcn = statcmp; else sortfcn = modcmp; /* use modification time */ } /* select a print function */ if (f_singlecol) printfcn = printscol; else if6`;`9FSP.SAV [FSP.BSD_SRC]LS.C;4MH (f_longform) printfcn = printlong; else printfcn = printcol; if (!argc) { argc = 1; argv[0] = "."; argv[1] = NULL; } doargs(argc, argv); } *[FSP.BSD_SRC]LS.OBJ;2+,. /F 4  - 0123KPWO 56~ El7@PR҃89GFHJ/LSV1.031-OCT-1994 12:41VAX C V3.2-044TABDIRUSAGENOMEMEMALLOCPRCOPYPRINTCOL PRINTLONG PRINTSCOL REVSTATCMPSTATCMP REVACCCMPACCCMP REVMODCMPMODCMP REVNAMECMPNAMECMPSTRLENUTIL_CD2 UTIL_STAT UTIL_READDIR UTIL_CLOSEDIR UTIL_OPENDIR UTIL_GETWDGETUIDISATTYPERRORFFLUSHFPUTCPRINTFGLOB VAXC$FREE_OPTVAXC$MALLOC_OPTVAXC$REALLOC_OPT7j sy_ =jLL.CJBI]k Nfo vj~ -Ud0D<%Y LW<.N6B&|diZ^yCuQ$]Î{,(=x"_&5:m)4PV$_4c&Ob[0Q8F #include #else #includ>)N3FSP.SAV [FSP.BSD_SRC]OPERATOR.C;4Me "types.h" #include "stat.h" #endif #include #include "find.h" /* * yanknode -- * destructively removes the top from the plan */ static PLAN *yanknode PROTO1(PLAN **, planp) { PLAN *node; /* top node removed from the plan */ if ((node = (*planp)) == NULL) return(NULL); (*planp) = (*planp)->next; node->next = NULL; return(node); } /* * yankexpr -- * Removes one expression from the plan. This is used mainly by * paren_squish. In comments below, an expression is either a * simple node or a N_EXPR node containing a list of simple nodes. */ static PLAN *yankexpr PROTO1(PLAN **, planp) { register PLAN *next; /* temp node holding subexpression results */ PLAN *node; /* pointer to returned node or expression */ PLAN *tail; /* pointer to tail of subplan */ PLAN *subplan; /* pointer to head of ( ) expression */ /* first pull the top node from the plan */ if ((node = yanknode(planp)) == NULL) return(NULL); /* * If the node is an '(' then we recursively slurp up expressions * until we find its associated ')'. If it's a closing paren we * just return it and unwind our recursion; all other nodes are * complete expressions, so just return them. */ if (node->type == N_OPENPAREN) for (tail = subplan = NULL;;) { if ((next = yankexpr(planp)) == NULL) fprintf(stderr,"(: missing closing ')'"); /* * If we find a closing ')' we store the collected * subplan in our '(' node and convert the node to * a N_E?QZFSP.SAV [FSP.BSD_SRC]OPERATOR.C;4M|XPR. The ')' we found is ignored. Otherwise, * we just continue to add whatever we get to our * subplan. */ if (next->type == N_CLOSEPAREN) { if (subplan == NULL) { fprintf(stderr,"(): empty inner expression"); exit(1); } node->p_data[0] = subplan; node->type = N_EXPR; node->eval = find_expr; break; } else { if (subplan == NULL) tail = subplan = next; else { tail->next = next; tail = next; } tail->next = NULL; } } return(node); } /* * paren_squish -- * replaces "parentheisized" plans in our search plan with "expr" nodes. */ PLAN *paren_squish PROTO1(PLAN *, plan) { register PLAN *expr; /* pointer to next expression */ register PLAN *tail; /* pointer to tail of result plan */ PLAN *result; /* pointer to head of result plan */ result = tail = NULL; /* * the basic idea is to have yankexpr do all our work and just * collect it's results together. */ while ((expr = yankexpr(&plan)) != NULL) { /* * if we find an unclaimed ')' it means there is a missing * '(' someplace. */ if (expr->type == N_CLOSEPAREN) { fprintf(stderr,"): no beginning '('"); exit(1); } /* add the expression to our result plan */ if (result == NULL) tail = result = expr; else { tail->next = expr; tail = expr; } tail->next = NULL; } return(result); } /* * not_squish -- * compresses "!" expressions in our search plan. */ PLAN *not_squish PROTO1(PLAN *, plan) { regist@p~!wFSP.SAV [FSP.BSD_SRC]OPERATOR.C;4M1 er PLAN *next; /* next node being processed */ register PLAN *node; /* temporary node used in N_NOT processing */ register PLAN *tail; /* pointer to tail of result plan */ PLAN *result; /* pointer to head of result plan */ tail = result = next = NULL; while ((next = yanknode(&plan)) != NULL) { /* * if we encounter a ( expression ) then look for nots in * the expr subplan. */ if (next->type == N_EXPR) next->p_data[0] = not_squish(next->p_data[0]); /* * if we encounter a not, then snag the next node and place * it in the not's subplan. As an optimization we compress * several not's to zero or one not. */ if (next->type == N_NOT) { int notlevel = 1; node = yanknode(&plan); while (node->type == N_NOT) { ++notlevel; node = yanknode(&plan); } if (node == NULL) { fprintf(stderr,"!: no following expression"); exit(1); } if (node->type == N_OR) { fprintf(stderr,"!: nothing between ! and -o"); exit(1); } if (notlevel % 2 != 1) next = node; else next->p_data[0] = node; } /* add the node to our result plan */ if (result == NULL) tail = result = next; else { tail->next = next; tail = next; } tail->next = NULL; } return(result); } /* * or_squish -- * compresses -o expressions in our search plan. */ PLAN *or_squish PROTO1(PLAN *, plan) { register PLAN *next; /* next node being processed */ register PLAN *tail; /* pointer to tail A3tFSP.SAV [FSP.BSD_SRC]OPERATOR.C;4M@of result plan */ PLAN *result; /* pointer to head of result plan */ tail = result = next = NULL; while ((next = yanknode(&plan)) != NULL) { /* * if we encounter a ( expression ) then look for or's in * the expr subplan. */ if (next->type == N_EXPR) next->p_data[0] = or_squish(next->p_data[0]); /* if we encounter a not then look for not's in the subplan */ if (next->type == N_NOT) next->p_data[0] = or_squish(next->p_data[0]); /* * if we encounter an or, then place our collected plan in the * or's first subplan and then recursively collect the * remaining stuff into the second subplan and return the or. */ if (next->type == N_OR) { if (result == NULL) { fprintf(stderr,"-o: no expression before -o"); exit(1); } next->p_data[0] = result; next->p_data[1] = or_squish(plan); if (next->p_data[1] == NULL) { fprintf(stderr,"-o: no expression after -o"); exit(1); } return(next); } /* add the node to our result plan */ if (result == NULL) tail = result = next; else { tail->next = next; tail = next; } tail->next = NULL; } return(result); } B5^/= kt`.C;4Mj/pw$Ejv')E6k˦]ذIOtf$ ( opJ;7Jk'p!gtEW;2a6/K (7,Ϳ|Z=rNNaoG@QPCwWlWc~k_}J̿Q Bn~}S)eF 0b/3.eu\!@hS "m"/]FjTx Fp39RL2NZyO6_ln񸬶7v[{7xWs5VxV)xH>* |##<|P5.@ՕKLY`\UM D .<ӹOMz!\ }S_EaN͏7U%1Y~%Ys[ukbiB8euSD1wPX.xLT4D1m^jb2yH(5=Y 'b\_fgwyhzH[w3 ^2 mZx~SK=k$a][VO>]Bz%Qw:4WrA n~G.$aCiO,#=ZrhG`,4A"$lNG|:o @sk,:.&ΰ2@F᱃ei뽐bJzT1bPfeL14(9ۉ/WSby~@/a$m)!8iN>fF2G|HYXQHZ HW{:C@C a [5Vr!<_'=5-S%ܱF8(^ sHl]8@lqC+Z0NkaoM'm"xsh<%[M>?^pӬ+O/oz DMSd/4w TJa{;(sse}?le\RTE sy 2>80B-$SVN[{y]M/D T*WSc/β p dieĄ+p\Үz N_Sr QGQ'k~fN r aQk[7-A ==n Esk0Hb(`TE"M58Ԑ9@_~;QYruk28^,kU.@D3iɿ/GjYĵ-SD#6C"W]*9,Nb!{yCA~Uol86TTT,:= <?НI,4ݙ+l`G9Cw bvZ ꬞Y yV0tf2w!n\Ȝǂ6 8Y58bȅ q3~r?r?qH+ ¶S^)ϰ: !$KpZImV3i,bJoz"4|ktlh~R O˻x"GxCaKEFSP.SAV SP.BSD_SRC]OPERATOR.OBJ;2;*[FSP.BSD_SRC]OPERATOR.OBJ;2+,./F 4@ - 0123KPWO56\:I&El7xjR҃89GFHJ5OPERATORV1.031-OCT-1994 12:41VAX C V3.2-044P(: missing closing ')'P(): empty inner expression2P): no beginning '('FP!: no following expressionaP!: nothing between ! and -o}P-o: no expression before -oP-o: no expression after -oP^мQPЬPа`aQP^VWЬRbST вbcSTTSPѣ e|TPݬPR fgFPRINTFѢ +TߦgFPRINTFEXITT FIND_EXPRڣTRTTUReRUePSP|^TVSU߬APR=Ѣ ߤ2fFPRINTFEXITU RUUSRcRSc߬PRUPP^WYXTެnоRUPnSгbRUUS1FPRINTF[EXITZѣ ݣ NOT_SQUISHPѣ 1VެоRUЮPаbRUURѢ ,Vެ о PUPЮ Qб `PUURѢ R ߧFikjѢ  ߧaikjzVP{PQPPUURSPRXSXXTSdSTdެоRUЮVжbRUUS1XPP ^TVUSެnоRPPnWзbRPPR1 ORDBrFSP.SAV SP.BSD_SRC]OPERATOR.OBJ;27_SQUISHWѢ  ݢgPѢ  ݢgPѢ GUߤ}fFPRINTFUROPERATORyanknodeyankexpr paren_squishe$ not_squish>d or_squish  OR_SQUISH NOT_SQUISH FIND_EXPRFPRINTFEXITEXITEXITEXIT | PAREN_SQUISH $ NOT_SQUISH d OR_SQUISHV$CODE$DATASTDINSTDOUTSTDERR$CHAR_STRING_CONSTANTSEXITUݬ OR_SQUISHPęfFPRINTFEXITRPU RUUS PRcRScެоPQЮXи`PQQR1VUP*[FSP.BSD_SRC]OPTION.C;4+,. /F 4M - 0123KPWO 56\$El7sR҃89GFHJE2FSP.SAV [FSP.BSD_SRC]OPTION.C;4M d/*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Cimarron D. Taylor of the University of California, Berkeley. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEFY FSP.SAV [FSP.BSD_SRC]OPTION.C;4M MPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tweak.h" #ifndef VMS #include #include #else #include "types.h" #include "stat.h" #endif #include #ifdef HAVE_UNISTD_H #include #endif #include "my-string.h" #include "find.h" OPTION options[] = { "!", N_NOT, c_not, O_ZERO, "(", N_OPENPAREN, c_openparen, O_ZERO, ")", N_CLOSEPAREN, c_closeparen, O_ZERO, "-a", N_AND, NULL, O_NONE, "-and", N_AND, NULL, O_NONE, "-exec", N_EXEC, c_exec, O_ARGVP, "-ls", N_LS, c_ls, O_ZERO, "-name", N_NAME, c_name, O_ARGV, "-newer", N_NEWER, c_newer, O_ARGV, "-o", N_OR, c_or, O_ZERO, "-ok", N_OK, c_exec, O_ARGVP, "-or", N_OR, c_or, O_ZERO, "-print", N_PRINT, c_print, O_ZERO, "-prune", N_PRUNE, c_prune, O_ZERO, "-size", N_SIZE, c_size, O_ARGV, "-time", N_TIME, c_time, O_ARGV, "-type", N_TYPE, c_type, O_ARGV, }; /* * find_create -- * create a node corresponding to a command line argument. * * TODO: * add create/process function pointers to node, so we can skip * this switch stuff. */ PLAN *find_create PROTO1(char ***, argvp) { register OPTIONGp!=FSP.SAV [FSP.BSD_SRC]OPTION.C;4M * *p; PLAN *new; char **argv; OPTION *option(); argv = *argvp; if ((p = option(*argv)) == NULL) { (void)fprintf(stderr, "find: unknown option %s.\n", *argv); exit(1); } ++argv; if (p->flags & (O_ARGV|O_ARGVP) && !*argv) { (void)fprintf(stderr, "find: %s requires additional arguments.\n", *--argv); exit(1); } switch(p->flags) { case O_NONE: new = NULL; break; case O_ZERO: new = (p->create)(); break; case O_ARGV: new = (p->create)(*argv++); break; case O_ARGVP: new = (p->create)(&argv, p->token == N_OK); break; } *argvp = argv; return(new); } static int typecompare PROTO2(char *, a, char *, b) { return(strcmp(((OPTION *)a)->name, ((OPTION *)b)->name)); } OPTION *option PROTO1(char *, name) { OPTION tmp; tmp.name = name; return((OPTION *)bsearch(&tmp, options, sizeof(options)/sizeof(OPTION), sizeof(OPTION), typecompare)); } *[FSP.BSD_SRC]OPTION.OBJ;2+,./F 4$ - 0123KPWO56E%El7A{R҃89GFHJH?FSP.SAV [FSP.BSD_SRC]OPTION.OBJ;23OPTIONV1.031-OCT-1994 12:41VAX C V3.2-044P!P  PP(P PP) P,PP-a0PP-sizeP>PDP-timePDPJP-typePJ PPPfind: unknown option %s. jPfind: %s requires additional arguments. P^SмнBSEARCHPRݽߣPFPRINTFEXITˏ P)ЭP`!PݽߣjFPRINTFEXITТ PPPEPV?PT6PT-PЭP`PTPѢ PP߭PTЭTP^ݼSTRCMP^Ь߯BSEARCHP!W-WWWAPC_NOTP C_OPENPAREN(PR OPTION find_create typecompare option" p8{OPTIONC_ORC_NOT C_CLOSEPAREN C_OPENPARENC_TYPEC_SIZEC_PRUNEC_PRINTC_NEWERC_NAMEC_LSC_EXECC_TIMESTRCMPFPRINTFEXITOPTIONBSEARCH  FIND_CREATE OPTION&$CODEI4axFSP.SAV [FSP.BSD_SRC]OPTION.OBJ;24$DATASTDINSTDOUTSTDERROPTIONS$CHAR_STRING_CONSTANTS C_CLOSEPARENXPC_EXEChPC_LSxPC_NAMEPC_NEWERPC_ORPC_EXECPC_ORPC_PRINTPC_PRUNEPC_SIZEPC_TIMEPC_TYPE*[FSP.BSD_SRC]PRINT.C;4+,. /F 4N - 0123KPWO 56\!El7iR҃89GFHJ/* * Copyright (c) 1989 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Michael Fischbein. * * Redistribution and use in source and binary forms are permitted * provided that: (1) source distributions retain this entire copyright * notice and comment, and (2) distributions including binaries display * the following acknowledgement: ``This product includes software * developed by the University of California, J]nFSP.SAV [FSP.BSD_SRC]PRINT.C;4N 5Berkeley and its contributors'' * in the documentation or other materials provided with the distribution * and in all advertising materials mentioning features or use of this * software. Neither the name of the University nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef lint static char sccsid[] = "@(#)print.c 5.22 (Berkeley) 5/10/90"; #endif /* not lint */ #include "tweak.h" #include #ifndef VMS #include #include #endif #ifdef VMS #include "types.h" #include "param.h" #include "grp.h" #include "pwd.h" #include "utmp.h" #include "stat.h" #else #include #include #include #include #endif #include "ls.h" #define BLK(A) (((A)+1023)/1024) static int printtype PROTO1(mode_t, mode) { switch(mode & S_IFMT) { case S_IFDIR: (void)putchar('/'); return(1); } return(0); } /* * print [inode] [size] name * return # of characters printed, no trailing characters */ static int printaname PROTO1(LS *, lp) { int chcnt; chcnt = 0; if (f_inode) { printf("%5lu ", lp->lstat.st_ino); chcnt += 6; } if (f_size) { printf("%4ld ", BLK(lp->lstat.st_sizK@FSP.SAV [FSP.BSD_SRC]PRINT.C;4N ae)); chcnt += 5; } printf("%s", lp->name); chcnt += strlen(lp->name); if (f_type) chcnt += printtype(lp->lstat.st_mode); return(chcnt); } void printscol PROTO2(LS *, stats, int, num) { for (; num--; ++stats) { printaname(stats); putchar('\n'); } } static int printtime PROTO1(time_t, ftime) { int i; char *longstring; longstring = (char *)ctime((long *)&ftime); for (i = 4; i < 11; ++i) (void)putchar(longstring[i]); #define SIXMONTHS ((365 / 2) * 24 * 60 * 60) if (ftime + SIXMONTHS > time((time_t *)NULL)) for (i = 11; i < 16; ++i) (void)putchar(longstring[i]); else { (void)putchar(' '); for (i = 20; i < 24; ++i) (void)putchar(longstring[i]); } (void)putchar(' '); } void printlong PROTO2(LS *, stats, int, num) { char *modep; if (f_total) (void)printf("total %lu\n", stats[0].lstat.st_btotal); for (; num--; ++stats) { if (f_inode) printf("%6lu ", stats->lstat.st_ino); if (f_size ) printf("%4ld ", BLK(stats->lstat.st_size)); modep = ((S_IFDIR & stats->lstat.st_mode)) ? "drwxrwxrwx" : "-rw-rw-rw-" ; (void)printf("%s %3u %-*s ", modep, stats->lstat.st_nlink, 8, "nobody"); if (f_group) printf("%-*s ", 8, "nobody"); else printf("%8ld ", stats->lstat.st_size); if (f_accesstime) printtime(stats->lstat.st_atime); else if (f_statustime) printtime(stats->lstat.st_ctime); else printtime(stats->lstat.st_mtime); printf("%s", stats->name); if (f_type) printtype(stats->lstat.st_mode); putchar('\n'); L7FSP.SAV [FSP.BSD_SRC]PRINT.C;4N ~m } } #define TAB 8 void printcol PROTO2(LS *, stats, int, num) { extern int termwidth; register int base, chcnt, cnt, col, colwidth; int endcol, numcols, numrows, row; colwidth = stats[0].lstat.st_maxlen; if (f_inode) colwidth += 6; if (f_size) colwidth += 5; if (f_type) colwidth += 1; colwidth = (colwidth + TAB) & ~(TAB - 1); if (termwidth < 2 * colwidth) { printscol(stats, num); return; } numcols = termwidth / colwidth; numrows = num / numcols; if (num % numcols) ++numrows; if (f_size && f_total) printf("total %lu\n", stats[0].lstat.st_btotal); for (row = 0; row < numrows; ++row) { endcol = colwidth; for (base = row, chcnt = col = 0; col < numcols; ++col) { chcnt += printaname(stats + base); if ((base += numrows) >= num) break; while ((cnt = (chcnt + TAB & ~(TAB - 1))) <= endcol) { (void)putchar('\t'); chcnt = cnt; } endcol += colwidth; } putchar('\n'); } } *[FSP.BSD_SRC]PRINT.OBJ;2+,./F 4r - 0123KPWO56D"El7@R҃89GFHJMr`mx4ڽ (3 {bӪ]PWm.D2QChQ/FMpj<@e2?5@jgmJ=SIyq goTVKmZ? qW 1H-A#9Jp dgo J&Fofh\+}0r" P~ | KM/2a6"JH`>E. ($ #`+wN3c x=!(2!VWqĚ{QEwLO/C\i5[OY ;O}NH.f?'X;>Fbu~kyϘm%/pJ1ei>X =^}t."Ennm,b3+K9h<|I JV 6}=T*r)1k&HZD}.b:̷nϥg&aoM`]d4H##SfK1;O ZVgٯ]I6ێ0"7IV0CYR2iD%lK!s9d9 De˗;|cx H1<1ï "F؞>w4bt4xb|B|ߣsYW((q>7R%2_ Br+Fޡ3ISKmPwv`C^)ˤӲ6a5P-J@7Dm9HWIo\wIBjѯ:,)Y e6=;1)\b֣Ij|SwIroz/6CxW;y|k?.4`.&wcJng4$Aqfu*P;j._LH|ޜ5zjo䷂r%WBrJ(}ʽaH~ngC)$p!S4LP`Zq C $ &l7SjM lKy0n./,pyua5tC6k)Go/rtsOo,Y*f'L m*}"h1+;2an$)2 w2q8WE8D2z_x7pkm"sihSD>P5#:@R@R! `mun4:$09m I=k1);)1j`;Vb;hTo*#9'1AII1K%?U8> b$Os$%i%9}1|qWS6nazvo.)zj=(s0/f r#,(^V#**X>1;ve<|Z?+'QI?3d/"9-NT$cpc/~;6>12K+\ZjFPNý̋FSP.SAV [FSP.BSD_SRC]PRINT.OBJ;2~2PRINTV1.031-OCT-1994 12:41VAX C V3.2-044P@(#)print.c 5.22 (Berkeley) 5/10/90P%5lu P%4ld  P%sPtotal %lu P%6lu  P%4ld &P-rw-rw-rw-1Pdrwxrwxrwx #include #include void prcopy PROTO3(char *, src, char *, dest, int, len) { register int ch; while(len--) { ch = *src++; *dest++ = isprint(ch) ? ch : '?'; } } char *emalloc PROTO1(int, size) { char *retval, *malloc(); if (!(retval = malloc(size))) nomem(); return(retval); } int nomem PROTO0((void)) { (void)fprintf(stderr, "ls: out of memory.\n"); ls_bad(1); } void usage PROTO0((void)) { (void)fprintf(stderr, "usage: ls [-1ACFLRacdfgiklqrstu] [file ...]\n"); ls_bad(1); } *[FSP.BSD_SRC]UTIL.OBJ;2+,./F 4rx - 0123KPWO56\8#El7 ZR҃89GFHJRЬP֬`RЬS֬ˏRP@dPhPRQP?QQcЬ P׬ PP^ݬMALLOCPRFPRINTFLS_BADRP^FPRINTFLS_BADP^\߬FPRINTFLS_BAD*[FSP]CHANGELOG.;1+,.3/F 433q- 0123KPWO456|BCl7 :O҃89GFHJS /FSP.SAV [FSP]CHANGELOG.;13Version 1.0 -- Dec 91. Original source created. Version 2.0 -- Dec 91. Added man pages. Server bug fix. In 1.0, files in a directory that is protected from deletion can still be written over. In 2.0, it is prohibited as well. Version 2.1 -- Jan 1, 92. 1) The maximum length of a name in pre-2.1 server is both limited by the 1k-byte udp packet size and, in some cases more severely, by the OS it is running in. On some systems, the OS imposes a limite of 14 chars. For those systems, the server can now be made to hash long names into short ones. The effect is transparent to the clients except when two long names gets hashed into the same value. In that case, they will refer to the same file during downloading, and they will displace each others during uploading. 2) Since directories, unlike files, have undisputable ownership, removal of a directory owned by a client should depends only on the ownership of the directory itself, and not on that of its parent directory. In pre-2.1 server, the client must have delete permission to the parent directory before it is allowed to delete the subdirectory. In 2.1, the permission is not needed. Version 2.2 -- Feb 15, 92. 1) The fput and fgetcmd utilities will now accept a list of files from its standward input. See their man pages for this expanded usage. This is useful if you don't want file names to show on 'ps' output. 2) The retransmit timer foTBFSP.SAV [FSP]CHANGELOG.;13r client code has been changed to use an adaptive algorithm. In pre-2.2 versions of FSP, clients will retransmit if it has not received a response from the server after a delay of 3 seconds. In version-2.2, two separate delays are used. The "busy" delay is used when waiting for a reply for the first try and the second try. Any time a second try is necessary, the delay is increased by 50%. Every first try brings the delay 12.5% closer to the initial delay setting (3 seconds by default, settable by the FSP_DELAY variable). For the third try and beyond, the "idle" delay is used. For each try, the delay is doubled. 3) Makes available FSP request code space 0x80 - 0xff for future user extensions. Each such extension will begin with a code byte in that range, and followed by a control block, which is likely to be different from the existing one. The basic operations of FSP will not require the use of such extensions. Note: 2.2 does not involve changes to the server itself. The server is been checked out and added to by a few people on the net. I will wait until the modifications stabilize before I consolidate them. Version 2.3 -- Mar 9, 92 1) The bsd_src/glob.c file has a bug in blkfree function in that it tries to free something that is actually on the stack of the glob function. The last call to free has been commented out to fix the bug. 2) The fspd has a bug whoes U)KCFSP.SAV [FSP]CHANGELOG.;13`only visible manifestation is the that protection can't be changed. The fix has required a moderate amount of code change in fspd. 3) .FSP_NO_DEL and .FSP_NO_ADD mechanism has been replaced by .FSP_OK_DEL and .FSP_OK_ADD mechanism. Thus by default, a directory is no delete and no add. 4) fprocmd is modified to relax option checking, allowing arbitrary option characters be passed to the fsp server. 5) A fls bug is fixed so that a "fls /" in a directory other than the root directory will not cause an error. 6) A -DDIRENT switch is added in Makefile to help support those machines that does not have /usr/include/dirent.h. Version 2.3a -- March 20, 1992 1) In a few places, non-critical errors of the form: if(errno = EINTR) .... was made. It obviously should have been == instead. The problem is fixed. 2) In the previous versions there is a potential problem such that if the first reply packet is dropped or is messed up, making a retransmit necessary, fspd will make the client utility wait for a 1 minute timeout. A potential loop hole for this happening has been closed by modifying server_lib.c where the packet key is checked. Version 2.4 -- March 27, 1992 1) fgrab/fgrabcmd client utility is added. It is like fget except it also deletes the named files in such a way that if there are multiple fgrabs for the same file, only one will succeed. One bug/mis-feature of fgrab is that when fgrab V򃆙FSP.SAV [FSP]CHANGELOG.;13& is terminated abnormally, the file is not restored. This command is useful for things like sharing bone files for modified versions of nethack. 2) FSP now allows multiple client programs to run at the same time if one of the three multiplexing mechanisms are chosen during compile time. It is likely that at least one of them will work for your system. The multiplexing is done at the client side, and does not allow the client machine to issue request messages at a higher rate compared to the previous versions. The FSP_LOCALPORT variable is no longer needed. However, if used, it will force serialization of client programs, which might be desireable if none of the multiplexing mechanisms are suitable for your machine. In order to accommodate this change, the server code has been changed to store temporary upload files with a different name from the previous version. The names now have to identify sender's port as well as sender's internet id. Change is necessary to keep it under 14-character limit of some OS. 3) Progress report mechanism enabled by FSP_TRACE variable now try to update the kbyte display more promptly. 4) fcat/fcatcmd will now turn off FSP_TRACE during its file transfer if its stdout is a tty. Version 2.5 -- April 8, 1992 1) A bug introduced during the last release --- fspd will not timeout and exit when running under inetd mode. This bug is now fixed. It was introduced bW FSP.SAV [FSP]CHANGELOG.;13 ecause it is more convienent at one time for it not to exit when it is still being debugged. The patch to stop it from exiting was not removed before release time. 2) A very rarely seen bug in some OS is circumvented. UDP packet's headers contain a checksum field. If the checksum option is disabled, the OS will set the checksum field to 0 before sending, and will not check the checksum field when message is received. If the option is enabled, the OS will stuff the checksum into the checksum field. When a packet is received, the checksum field is checked. If the checksum field is 0, then the OS assume that the sender does not have option enabled, and therefore the checking is skipped. Problem arises when a packet's computed checksum is zero. Some OS will stuff 0xffff into the checksum field before sending such a message to distinguish it from the case for which checksum is disabled. Other OS couldn't recognize 0xffff as an indication that the actual checksum could be either 0 or 0xffff, and subsequently reject the message. The client can thus get stuck forever in retransmitting a request that happens to have 0 for the computed checksum, but 0xffff for the checksum field. To get around the problem, the sequence number field of the request message (which has meaning only to the client software), is partitioned such that 2 of the bits reflect the retry sequence, and the remaiX szr}.OBJ;20Ua?F0r1*ӛ2pG;*mbe+'M9[yfYh|o,w}ұ9Y|?Yd93m?x9 mbq4&:o%);H-F"c>c![e?JO _ isTJC3q GE7\,oIk|57v$uCwFK V:w36zD1fY~w| rfrLgՖF `:z 7ql0Kxd:Z&j?"2L,2 .kmEa!ZQdL%+uiRKnhb&sYۼ+c%=9G`ƪΟG+ĵ=ON$d,ɏ\ 3`eShmwnw]#jS̅ي 8M pD'݅ پn:9#-tTc*>L^p6S~?#*3Z.+rB@h!q:VH5G[(jyQS/Ro7#ܒA>D2فFUtQSYyan:t@?,pvӊ('e <3֪"B~USU+)z*Qdz7ԭlZIS)}k!k0nu 6Z!Q_M;4F@n?JU R{dߢx+_bf6Yˡ4WAya) VLS:EOl=u.70/ ܤ ڶYxht#$rna͙@S@A"SQ@n ^>u8OVKDf;u>D࣋@EAC pC̍J8 56WRXZr߳,",v1 GlٖRo()'N@S0EAb[GqUo)Σ a)d! !Iu\Tu.˹$~ q>KM.x_|as)ucþ%hj1C,*\0=n?x}Ҽ)v".w!~s1אOzhqy5JQSFj#=a" =5v ^3cXI|FWJ$C.I1Xt#[ ui,^#46Nb#BwxQmkeFeyuI36l3N0&jg}]!' rp9 !18J |Xlbk4:cy8Zl"y#@LeRf& Version 2.6.6.2 -- Apr 8, 1993 1) Added patches to make the client_timeout value be settable via an environment value. Default timeout value is 4. The change has no effect unless you compile the clients to time out if there is no response. (patches by Michael Meskes) 2) Added fducmd and fsethostcmd written by Michael Meskes. fducmd is a standalone (or merge) version of the du cmd that phil put into his fspclient. Fsethostcmd supports a fairly simple resource file for setting up hosts and local directories and all environment variables based on information in a file. 3) Fixed a bug in fgrab that caused you to not be able to grab a file even though you could get it and then rm it. 4) Fixed the IPHOST code. It was returning automatic vars up the stack, and assuming that assigning a structure to a structure performed copy. This is not always the case, and when compiled under ultrix cc this assumption broke. The fix was to malloc the structures down and pass pointers up the stack initially, anb E"FSP.SAV [FSP]CHANGELOG.;13+d then store those pointers. The code has been tested now as well, and verified to work on at least my system. 5) The server will now log an 'Unknown command.' error if it gets a command request that it doesn't know how to handle, and will return this string to the requesting client. (requested by Robert Martin-Legene) 6) Fixed a bug in build_dir() reported by Phil Richards. A file could get a garbaged 'long_name'. 7) Added better logging code supplied by Phil Richards. 8) Added reverse hostname lookup and read only mods supplied by Phil Richards. 9) Removed a bug that caused logging to be turned on even when the -l option wasn't specified. 10) Changed the name of the fsethostcmd to fhostcmd so that POSIX machine nameing conventions were followed. 11) Renamed the .fsprc file used by fhostcmd to .fsp_prof Version 2.6.6.3 -- Apr 12, 1993 1) Added bitfields containing the version and protection information into the getpro and fver commands. Newer clients should rely on that information and thus be able to present it in any display format desired. 2) Logging code will now stat the logfile and if it's no longer there, it will recreate it after closing the old fd. This saves the system expense of opening and closing a logfile each time we log something, and still allows the deletion of logfiles during a run. 3) Modified clients to present information from the bitfields for ver and pro, and modifiec M2YC=rwe/!|=&7:b6Gg;@*Qf5> EN/R{bNk7b%@5 .<HVPDdm1oepO.-9\y)[JOru.,!vWvOr^T{>j&#cYN<?si_DSREdLsP')7 2`MQUQEYM*heIZx>z([Wta,XWl4 /qyF Y7(qU_3,;a_UVX^ GTmI@m`X!hf=i+SdB, DFQwo ?kq;DS% -S%E0*46$7"Fn,aIE KV |T' QZCU$'}0Fn!u/e9u&g@EE>CY]BVTp\uA& "=4 PHG'MWgPzRu9.w%V a* Fb/MFD\ `wCA#1ee_yg`nSI_dQXu*\bwz~q)JOPDHW-9kYd Va?6[CQJNZL\a(4b@A'O uSV2bPb\w/axp.Pc6So}}BMQCgj.jgRu{kcN)43BXSs )KOQQ _8o'LYr' TWvqmiy,0sf&2 NcKo?uCJYA(s!B? Hv\!f  YI]]72R[I">P_PKSMK V`/qE iD0/ PT&_:Qr(TyF|{<-R iC w#FBI-f<)@vPN|d'+B&?Do1PJED. ,8wBt'N{5p,H0@1S+$THqtRFi9+E]L9fec1,c/ 7WbG]5}#tY&Lh*p#6CF(~`TXG4XZPuTRL#ms{$CXMrWL(`%4,IU|s W@_8SL#w`Iy AZ]o/X\OMCmF TL; Q R&D#x')Rz R"QgQ-(#0Cc+ n`yv8%!Ux u0pCN RiYr5V VfjiNQsKb?25'ISvPB ZGNBP;'Cl$8.>-;rJO O6gu]8BI{RMXORC -Avb(gF\H7`y%p# bEB@XnO?k6fH[TAZY" gNE\+&md$yf)B-(,QXO~i4g= TJ'm_O ]:{{;IKVD3QKVK\7?TEQij6V_pW7cBqJmC6e TTWvD7^2_3.8HA g?e@Hl\ Xi2)C^ON(4G4o %p@k\/;5OSn?+WIwS}8a,dik05d> 8) & 0xff; sbuf.bb_seq[1] = seq1 = (myseq & 0xfc) | (retry_send & 0x0003); sbuf.sum = 0; for(t = (unsigned char *) &sbuf, sum = n = mlen; n--; sum += *t++); sbuf.sum = sum + (sum >> 8); switch(retry_send) { /* adaptive retry delay adjustments */ case 0: busy_delay = (target_delay+(busy_delay<<3)-busy_delay)>>3; w_delay = busy_delay; break; case 1: busy_delay = busy_delay + (busy_delay >> 1); w_delay = busy_delay; if(client_trace) write(2,"R",1); break; default: #ifdef CLIENT_TIMEOUT if (!pos && retry_send >= env_timeout ) { fprintf(stderr, "\rRemote server not responding.\n"); exit(1); } #endif if(idle_delay < 5*60*1000) idle_delay = idle_delay << 1; w_delay = idle_delay; if(client_trace) write(2,"I",1); break; } if(sendto(myfd,&sbuf,mlen,0,(struct sockaddr *)&server_addr, sizeof(server_addr)) == -1) { perror("sendto"); exit(1); } udp_sent_time = time((time_t *) 0); mask = 1 << myfd; for(retry_recv = 0; ; retry_recv++) { if(retry_recv && client_trace) write(2,"E",1); retval = _x_select(&mask, w_delay); if((retval == -1) && (errno == EINTR)) continue; if(retval == 1) { /* an incoming message is waiting */ bytes = sizeof(from); if((bytes = recvfrom(myfd,(char*)&rbuf,sizeof(rbuf),0, (struct sockaddr *)&from, &bytes)) < UBUF_HSIZE) continue; s = (unsigned char *) &rbuf; d = s + bifFSP.SAV[FSP.CLIENT]LIB.C;9K ytes; u = rbuf.sum; rbuf.sum = 0; for(t = s, sum = 0; t < d; sum += *t++); sum = (sum + (sum >> 8)) & 0xff; if(sum != u) continue; /* wrong check sum */ rlen = BB_READ2(rbuf.bb_len); if( (rbuf.bb_seq[0] ^ seq0) || ((rbuf.bb_seq[1] ^ seq1)&0xfc)) continue; /* wrong seq # */ if((int) (rlen+UBUF_HSIZE) > bytes) continue; /* truncated. */ myseq = (myseq + 0x0004) & 0xfffc; /* seq for next request */ key = BB_READ2(rbuf.bb_key); /* key for next request */ client_put_key(key); if(client_intr_state == 2) { if(!key_persists) client_done(); exit(1); } return(&rbuf); } else break; /* go back to re-transmit buffer again */ } } } void init_client PROTO3(char *, host, int, port, int, myport) { busy_delay = idle_delay = target_delay; if((myfd = _x_udp(&myport)) == -1) { perror("socket open"); exit(1); } if(_x_adr(host,port,&server_addr) == -1) { perror("server addr"); exit(1); } client_init_key(server_addr.sin_addr.s_addr,port,getpid()); } int client_done PROTO0((void)) { (void) client_interact(CC_BYE, 0L, 0, (unsigned char *)NULLP, 0, (unsigned char *)NULLP); } j,FSP.SAV[FSP.CLIENT]LIB.OBJ;2l*[FSP.CLIENT]LIB.OBJ;2+,./F 4 -0123KPWO56S)El7XR҃89GFHJ0LIBV1.031-OCT-1994 12:41VAX C V3.2-044 PPPPRP Remote server not responding. "PI$Psendto+PE-Psocket open9Pserver addrP^W[TSݬ HTONSPcSݬHTONLPc Ь YVYRYRЬR֬bYRYRЬYYRYRЬR֬bYRYRRRVnCLIENT_GET_KEYPS<~HTONSPc<RxRRʏRR R<SʏSˏRRS QnXXUXRXRPPUXPXPURURRծ Ѯ1[PxR RRR 1PRR kkgWRITE\լ#ѮߧFPRINTFEXIT x kߧ"WRITEݮ dSENDTOPߧ$PERROREXITTIMEP xdVVkߧ+WRITEݮ ߭ _X_SELECTP 1P1߭< ~dRECVFROMPѭ 1SSRYSQUQR PPUQRUPUPˏPUUY1<~kp eFSP.SAV[FSP.CLIENT]LIB.OBJ;2"NTOHSPZ Ps PPPʏPa ZPPW<PPP<~R LIBclient_interactz| init_client client_done  CLIENT_INTERACT _X_SELECT_X_ADR_X_UDPCLIENT_INIT_KEYCLIENT_PUT_KEYCLIENT_GET_KEY CLIENT_DONEGETPIDWRITERECVFROMSENDTOPERRORFPRINTFNTOHSTIMEEXITHTONLHTONSEXIT CLIENT_INTERACT | INIT_CLIENT  CLIENT_DONE+$CODE$$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACECLIENT_INTR_STATE KEY_PERSISTS TARGET_DELAY UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUT BUSY_DELAY IDLE_DELAYE$CHAR_STRING_CONSTANTS^NTOHSP>= 6; *p++ = code_str[v1 & 0x3f]; v1 >>= 6; *p++ = code_str[v1 & 0x3f]; v1 >>= 6; v1 = v1 | (v2 << (32-3*6)); *p++ = code_str[v1 & 0x3f]; v1 >>= 6; *p++ = code_str[v1 & 0x3f]; v1 >>= 6; *p++ = code_str[v1 & 0x3f]; v1 >>= 6; *p++ = code_str[v1 & 0x3f]; v1 >>= 6; *p++ = code_str[v1 & 0x3f]; v1 >>= 6; *p = 0; } #endif /********************************************************************/ /******* For those systems that has flock function call *************/ /********************************************************************/ #ifdef USE_FLOCK #include int key_persists = 1; static unsigned int lock_fd; static unsigned short okey; unsigned short client_get_key PROTO0((void)) { if(flock(lock_fd,LOCK_EX) == -1) { perror("flock"); exit(1); } if(read(lock_fd,&okey,sizeof(okey)) == -1) { perror("read"); exit(1); } if(lseek(lock_fd,0L,0) == -1) { perror("seek"); exit(1); } return(okey); } void client_put_key PROTO1(unsigned short, key) { if(write(lock_fd,&key,sizeof(key)) == -1) { perror("write"); exit(1); } if(lseek(lock_fd,0L,0) == -1) { perror("seek"); exit(1); } if(flock(lock_fd,LOCK_UN) == -1) { perror("unflock"); exit(1); } } void client_init_key PROTO3(unsigned long, server_addr, unsigned long, server_port, unsigned short, key) { unsigned long omask; okey = key; make_key_string(nzx}<ssr;9 KII9#_F=,4xTCjQui#n&9}aә45]\PnUj}z!bz6q'> yUtk2ScuPFg~crKR`"VL5qMhSQp`q0}y^WUb]NWedkD9w.0_FG+!N*!ʻ@-oO,fhJ &$U$rjƧpJCE9T]h `ݟPx-7>i|@Fw_b>q(47!h!J $JB0//uۇ0-416?{}C:C6I㣑ClWyb9>shN2J >x _tu8g㠹+0n 1(e-$gDTxJu.' {'[w%;Ȑږ$p584Txl|c 3olyjiEP)Mt >3qyk̄=@&+xYTa]HpT=TuN= 3(z g<|hó%>wD|`E|K8o3h^5N[eI{ 6`rkE8R/M'Y\ XbyUbl3wC}*ŗ*F s IxD ]5Y e&I0رЅjVen9,n`RA$zfxm/*፲h48HC3͑|z+i` [w9 #endif int key_persists = 1; static unsigned int lock_fd; static unsigned short okey; unsigned short client_get_key PROTO0((void)) { if(lockf(lock_fd,F_LOCK,sizeof(okey)) == -1) { perror("lockf"); exit(1); } if(read(lock_fd,&okey,sizeof(okey)) == -1) { perror("read"); exit(1); } if(lseek(lock_fd,0L,0) == -1) { perror("seek"); exit(1); } return(okey); } void client_put_key PROTO1(unsigned short, key) { if(write(lock_fd,&key,sizeof(key)) == -1) { perror("write"); exit(1); } if(lseek(lock_fd,0L,0) == -1) { perror("seek"); exit(1); } if(lockf(lock_fd,F_ULOCK,sizeof(key)) == -1) { perror("unlockf"); exit(1); } } void client_init_key PROTO3(unsigned long, server_addr, unsigned long, server_port, unsigned short, key) { unsigned long omask; okey = key; make_key_string(server_addr,server_port); omask = umask(0); lock_fd = open(key_string,O_RDWR|O_CREAT,0666); umask(omask); } #endif /********************************************************************/ /******* For those systems that has SysV shared memory + lockf ******/ pFSP.SAV[FSP.CLIENT]LOCK.C;4K \ /********************************************************************/ #ifdef USE_SHAREMEM_AND_LOCKF #ifdef HAVE_UNISTD_H #include #endif #include extern char *shmat(); int key_persists = 0; static unsigned short *share_key; static unsigned int lock_fd; unsigned short client_get_key PROTO0((void)) { if(lockf(lock_fd,F_LOCK,2) == -1) { perror("lockf"); exit(1); } return(*share_key); } void client_put_key PROTO1(unsigned short, key) { *share_key = key; if(lockf(lock_fd,F_ULOCK,2) == -1) { perror("unlockf"); exit(1); } } void client_init_key PROTO3(unsigned long, server_addr, unsigned long, server_port, unsigned short, key) { unsigned long omask; key_t lock_key; int lock_shm; make_key_string(server_addr,server_port); omask = umask(0); lock_fd = open(key_string,O_RDWR|O_CREAT,0666); umask(omask); if((lock_key = ftok(key_string,3432)) == -1) { perror("ftok"); exit(1); } if((lock_shm = shmget(lock_key,sizeof(short),IPC_CREAT|0666)) == -1) { perror("shmget"); exit(1); } if(!(share_key = (unsigned short *) shmat(lock_shm,(char*)0,0))) { perror("shmat"); exit(1); } } #endif /********************************************************************/ /******* For those who does not want to use locking *****************/ /********************************************************************/ #ifdef NOLOCKING int key_persists = 0; static unsigned short okey; unsigned short client_get_key PROTO0((voqNFSP.SAV[FSP.CLIENT]LOCK.C;4K  id)) { return(okey); } void client_put_key PROTO1(unsigned short, key) { okey = key; } void client_init_key PROTO3(unsigned long, server_addr, unsigned long, server_port, unsigned short, key) { okey = key; } #endif *[FSP.CLIENT]LOCK.OBJ;2+,./F 4 -0123KPWO56i-El7 R҃89GFHJ1LOCKV1.031-OCT-1994 12:41VAX C V3.2-044R LOCKclient_get_key client_put_key client_init_key <  CLIENT_GET_KEY CLIENT_PUT_KEY CLIENT_INIT_KEY.$CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACECLIENT_INTR_STATE KEY_PERSISTS TArIyFSP.SAV[FSP.CLIENT]LOCK.OBJ;25RGET_DELAY UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUT7P^<PP^^ *[FSP.CLIENT]MAKEFILE.;1+,M./F 4>-0123KPWO56\DkCl7HR҃89GFHJCLIOBJS = lib.o lock.o util.o all: libclient.a libclient.a:${PARALLEL_MAKE} ${CLIOBJS} ${RM} -f libclient.a ${AR} ${ARFLAGS} libclient.a ${CLIOBJS} ${RANLIB} libclient.a clean: ${RM} -f *.o *.a lib.o: lib.c ../include/client_def.h ../include/common_def.h lib.o: ../include/tweak.h ../include/proto.h lock.o: lock.c ../include/client_def.h ../include/common_def.h lock.o:../include/tweak.h ../include/proto.h util.o: util.c ../include/client_def.h ../include/common_def.h util.o: ../include/tweak.h ../incsw~FSP.SAVM[FSP.CLIENT]MAKEFILE.;1>lude/proto.h *[FSP.CLIENT]UTIL.C;4+,./F 4N-0123KPWO56;+El7R҃89GFHJ /*********************************************************************\ * Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. * t FSP.SAV[FSP.CLIENT]UTIL.C;4N\*********************************************************************/ #include "tweak.h" #include "client_def.h" #include "c_extern.h" #ifndef VMS extern char *realloc(), *malloc(), *getenv(); #endif extern long atol(); extern int errno; static int env_dir_malloced = 0; char *env_dir = "/"; char *env_passwd = "\0"; char *env_myport; char *env_host; char *env_port; char *env_local_dir; int env_timeout; unsigned short client_buf_len; unsigned short client_net_len; char *util_abs_path PROTO1(char *, s2) { char *path, *s, *d, *t; if(!env_dir) env_dir = ""; if(!s2) s2 = ""; if(*s2 == '/') { path = malloc(strlen(s2)+2+strlen(env_passwd)+1); sprintf(path,"/%s",s2); } else { path = malloc(strlen(env_dir)+strlen(s2)+3+strlen(env_passwd)+1); sprintf(path,"/%s/%s",env_dir,s2); } for(t = path; *t; ) { if(t[0] == '/') { while(t[1] == '/') for(d = t, s = t+1; *d++ = *s++; ); if(t != path && t[1] == 0) { t[0] = 0; return(path); } } if(t[0] == '.' && t[1] == '.') { if(t-1 == path && t[2] == 0 ) { *t = 0; return(path); } if(t-1 == path && t[2] == '/') { for(d = t, s = t + 3; *d++ = *s++; ); continue; } if(t[-1] == '/' && (t[2] == '/' || t[2] == 0)) { s = t + 2; /* point to either slash or nul */ t -= 2; /* guaranteed that t >= path here */ while(t > path && t[0] != '/') t--; if(t != path || *s == '/') for(d = t; *d++ = *s++; ); else { t[1] = 0; return(path); } continue; } } if(t[0] == '.') { uHrFSP.SAV[FSP.CLIENT]UTIL.C;4N!2if(t-1 == path && t[1] == 0 ) { *t = 0; return(path); } if(t-1 == path && t[1] == '/') { for(d = t, s = t + 2; *d++ = *s++; ); continue; } if(t[-1] == '/' && (t[1] == '/' || t[1] == 0)) { s = t + 1; /* point to either slash or nul */ for(d = t-1; *d++ = *s++; ); t--; continue; } } t++; } return(path); } char *util_getwd PROTO1(char *, p) { if(p) strcpy(p,env_dir); return(p); } static RDIRENT **get_dir_blk PROTO1(char *, path) { RDIRENT **dp; char *p1, *p2, *fpath, buf[2*UBUF_SPACE]; unsigned long pos; int cnt, k, len, rem, acc, at_eof, rlen; UBUF *ub; fpath = util_abs_path(path); for(pos = 0, at_eof = acc = cnt = 0; ; ) { while((acc < UBUF_SPACE) && !at_eof) { ub = client_interact(CC_GET_DIR,pos, strlen(fpath), (unsigned char *)fpath+1, 2, (unsigned char *)&client_net_len); if(ub->cmd == CC_ERR) { fprintf(stderr,"%s: %s\n",path, ub->buf); free(fpath); errno = EACCES; return((RDIRENT **) 0); } rlen = BB_READ2(ub->bb_len); if(rlen < client_buf_len) at_eof = 1; for(p1 = ub->buf, p2 = buf + acc, k = rlen; k--; ) *p2++ = *p1++; acc += rlen; pos += rlen; } if(acc >= UBUF_SPACE) len = UBUF_SPACE; else len = acc; for(p2 = buf, rem = len, k = 0; ; k++) { if(rem < RDHSIZE) break; if(((RDIRENT *) p2)->type == RDTYPE_SKIP) break; if(((RDIRENT *) p2)->type == RDTYPE_END ) { k++; break; } p2 += RDHSIZE; rem -= (RDHSIZE+1);vopşFSP.SAV[FSP.CLIENT]UTIL.C;4N while(*p2++) rem--; while((p2 - buf) & 3) { p2++; rem--; } } p1 = malloc(p2-buf); if(cnt) dp = (RDIRENT **) realloc(dp,(cnt+k+1)*sizeof(RDIRENT *)); else dp = (RDIRENT **) malloc((cnt+k+1)*sizeof(RDIRENT *)); if(!p1 || !dp) { free(fpath); fputs("directory reading out of memory\n",stderr); return((RDIRENT **) 0); } for(p2 = buf, rem = len; ; cnt++) { if(rem < RDHSIZE) break; if(((RDIRENT *) p2)->type == RDTYPE_SKIP) break; if(((RDIRENT *) p2)->type == RDTYPE_END) { dp[cnt] = 0; return(dp); } dp[cnt] = (RDIRENT *) p1; for(k = RDHSIZE, rem -= (RDHSIZE+1); k--; *p1++ = *p2++); while(*p1++ = *p2++) rem--; while((p2 - buf) & 3) { p2++; p1++; rem--; } } if(acc < UBUF_SPACE) { dp[cnt] = 0; return(dp); } for(p1 = buf + UBUF_SPACE, p2 = buf, k = (acc -= UBUF_SPACE); k--;) *p2++ = *p1++; } } static int util_download_main PROTO5 (char *, path, char *, fpath, FILE *, fp, unsigned long, start_from, int, cmd) { unsigned long pos, started_from = start_from, downloaded; unsigned tmax, wrote, sent_time, rlen; UBUF *ub; time_t t = time(NULL); for(tmax = 1, pos = start_from, sent_time = 0; ;) { ub = client_interact(cmd,pos,strlen(fpath),(unsigned char *)fpath+1, 2, (unsigned char *)&client_net_len); if(client_trace && (udp_sent_time != sent_time)) { sent_time = udp_sent_time; if(clw ,FSP.SAV[FSP.CLIENT]UTIL.C;4NA ient_buf_len == UBUF_SPACE) fprintf(stderr,"\r%luk ",1+(pos>>10)); else fprintf(stderr,"\r%lu ", pos); fflush(stderr); } if(ub->cmd == CC_ERR) { fprintf(stderr,"downloading %s: %s\n",path,ub->buf); return(-1); } rlen = BB_READ2(ub->bb_len); wrote = fwrite(ub->buf,1,rlen,fp); pos += wrote; if(rlen < client_buf_len || rlen != wrote) break; } t = time(NULL) - t; if (t == 0) t = 1; downloaded = pos - started_from; if(client_trace) { fprintf(stderr,"\r%luk : %s [%db/s] \n", 1+(pos>>10), path, downloaded/t); fflush(stderr); } return(0); } int util_download PROTO3(char *, path, FILE *, fp, unsigned long, start_from) { int code, len; char *fpath; fpath = util_abs_path(path); if(*env_passwd) { strcat(fpath, "\n"); strcat(fpath, env_passwd); len = strlen(fpath); } code = util_download_main(path, fpath, fp, start_from, CC_GET_FILE); free(fpath); return(code); } int util_grab_file PROTO3(char *, path, FILE *, fp, unsigned long, start_from) { int code, len; char *fpath; UBUF *ub; fpath = util_abs_path(path); if(*env_passwd) { strcat(fpath, "\n"); strcat(fpath, env_passwd); len = strlen(fpath); } code = util_download_main(path, fpath, fp, start_from, CC_GRAB_FILE); if(code) { free(fpath); return(code); } ub = client_interact(CC_GRAB_DONE, 0L, len, (unsigned char *)fpath+1, 0, (unsigned char *)NULLP); if(ub->cmd == CxFSP.SAV[FSP.CLIENT]UTIL.C;4N)C_ERR) { fprintf(stderr,"Warning, unexpected grab error: %s\n",ub->buf); } free(fpath); return(code); } int util_upload PROTO2(char *, path, FILE *, fp) { unsigned long pos; unsigned bytes, first, tmax, sent_time; char *fpath, buf[UBUF_SPACE]; UBUF *ub; time_t t = time(NULL); fpath = util_abs_path(path); for(tmax = 1, sent_time = 0, pos = 0, first = 1; ; first = 0) { if((bytes = fread(buf,1,client_buf_len,fp)) || first) { ub = client_interact(CC_UP_LOAD,pos, bytes, (unsigned char *)buf, 0, (unsigned char *)NULLP); if(client_trace && (udp_sent_time != sent_time)) { sent_time = udp_sent_time; if(client_buf_len == UBUF_SPACE) fprintf(stderr,"\r%luk ",1+(pos>>10)); else fprintf(stderr,"\r%lu ", pos ); fflush(stderr); } } else ub = client_interact(CC_INSTALL,pos,strlen(fpath), (unsigned char *)fpath+1, 0, (unsigned char *)NULLP); if(ub->cmd == CC_ERR) { fprintf(stderr,"uploading %s: %s\n",path,ub->buf); free(fpath); return(1); } if(!bytes && !first) break; pos += bytes; } t = time(NULL) - t; if(t == 0) t = 1; if(client_trace) { fprintf(stderr,"\r%luk : %s [%db/s] \n", 1+(pos>>10), path, pos/t); fflush(stderr); } free(fpath); return(0); } static void util_get_env PROTO0((void)) { char *p; if(!(env_host = getenv("FSP_HOST"))) { fputs("No FSP_HOST specified.\n",stderr); exit(1); } if(!(env_port = getenv("FSP_PORT"))) { yc h 1 OYg75q%`x;>K6H2Bbs s#^ +iVEnIKO!_nNm*%- 5WQ_ZO>XeiKn<_p$(P RMoGOJm=$Mcbj wowh,B}?/br+-y/ qCq]&*oz24T{A|%t#) &U6A<=!~D}rj}o?lzL|,P*pzvBT4Xy,>MDr?{g0!h33:BNA|_ =7] >n6_ 6)/ -OTslK|NBd?L$"gB%/WTW>n_8 _1sNQ*%>D![^=}hw8 {e"e:L7 WEo,g8~>jN6ujhtou7iEe3 %~N$oYpbr%!sW7lwnCHx*2o\q$-<@X\M;IS27c;2}WLJ Zt\0[%UPh9j];/5Jf & V2/JB}JM)5vfqz qoxZSi,&5Lf[0)tg;јR}88Hw=yoK4 J<USUs{!)du4w/$9t?^Q@VbVZ~Hqlf$9 p#z=;#fj4 DM`qM A:B ZBttGn{uUHF+RY7 33x*~sw Wa^0ogbb3~;T4Vy!]f3Blg p4GO5fh*9Y GCdb-(=,)yd*}By;B(#L$ rsq|~5!?rUBm0ipbtgF00HM_A+WKLOAuuUO?^j5J|@y3#%\P%j|:hve]$jtpt=)4F5M d_Dog+%q+jlnL@<%NKdT`#oa6-}4f8B "KpKa8* y!a>EmhwX`C%4Sp *z(~(M? vg AG *! LubaK/ 2lL"~]<}9'd4uZaB1V L[MXQX;FU.Wbw&!!Piime; if(clzzFSP.SAV[FSP.CLIENT]UTIL.C;4N fputs("No FSP_PORT specified.\n",stderr); exit(1); } if(!(env_dir = getenv("FSP_DIR"))) { fputs("No FSP_DIR specified.\n",stderr); exit(1); } if(!(env_myport = getenv("FSP_LOCALPORT"))) env_myport = "0"; if(!(env_passwd = getenv("FSP_PASSWORD"))) env_passwd = "\0"; client_trace = !!getenv("FSP_TRACE"); if(p = getenv("FSP_BUF_SIZE")) client_buf_len = atoi(p); else client_buf_len = UBUF_SPACE; if(client_buf_len > UBUF_SPACE) client_buf_len = UBUF_SPACE; client_net_len = htons(client_buf_len); if(p = getenv("FSP_DELAY")) target_delay = atol(p); if(target_delay < MIN_DELAY) target_delay = MIN_DELAY; if(!(env_local_dir = getenv("FSP_LOCAL_DIR"))) env_local_dir="."; if(!(p = getenv("FSP_TIMEOUT"))) env_timeout = 4; else env_timeout = atol(p); } static void client_intr PROTO1(int, signum) { switch(client_intr_state) { case 0: exit(2); case 1: client_intr_state = 2; break; case 2: exit(3); } } void env_client PROTO0((void)) { util_get_env(); init_client(env_host,atoi(env_port),atoi(env_myport)); signal(SIGINT,client_intr); } static DDLIST *ddroot = 0; RDIR *util_opendir PROTO1(char *, path) { char *fpath; RDIRENT **dep; DDLIST *ddp; RDIR *rdirp; fpath = util_abs_path(path); for(ddp = ddroot; ddp; ddp = ddp->next) if(!strcmp(ddp->path,fpath)) break; if(!ddp) { if(!(dep = get_dir_blk(fpath))) return((RDIR *) 0); ddp = (DDLIST *) malloc(sizeof(DDLIST)); ddp->dep_root = dep; ddp->path = fpath; {g FSP.SAV[FSP.CLIENT]UTIL.C;4N+ ddp->ref_cnt = 0; ddp->next = ddroot; ddroot = ddp; } else free(fpath); ddp->ref_cnt++; rdirp = (RDIR *) malloc(sizeof(RDIR)); rdirp->ddp = ddp; rdirp->dep = ddp->dep_root; return(rdirp); } void util_closedir PROTO1(RDIR *, rdirp) { rdirp->ddp->ref_cnt--; free(rdirp); } rdirent *util_readdir PROTO1(RDIR *, rdirp) { static rdirent rde; RDIRENT **dep; dep = rdirp->dep; if(!*dep) return((rdirent *) 0); rde.d_fileno = 10; rde.d_reclen = 10; rde.d_namlen = strlen((*dep)->name); rde.d_name = (*dep)->name; rdirp->dep = dep+1; return(&rde); } static int util_split_path PROTO4(char *, path, char **, p1, char **, p2, char **, p3) { char *s; static char junk; *p1 = "/"; if(*path == '/') { *p2 = path; *p3 = path+1; } else { *p2 = &junk; *p3 = path; } for(s = *p3; *s; s++) { if(*s == '/') { *p1 = path; *p2 = s; *p3 = s+1; } } if (**p3 == '\0') *p3 = "."; return(1); } int util_stat PROTO2(char *, path, struct stat *, sbuf) { RDIR *drp; RDIRENT **dep; char *fpath, *ppath, *p1, *pfile; fpath = util_abs_path(path); if(!strcmp(fpath,env_dir)) { ppath = fpath; pfile = "."; } else { util_split_path(fpath,&ppath,&p1,&pfile); *p1 = 0; } if(drp = util_opendir(ppath)) { for(dep = drp->dep; *dep; dep++) { if(!strcmp((*dep)->name,pfile)) { if((*dep)->type & RDTYPE_DIR) sbuf->st_mode = 0777 | S_IFDIR; else sbuf->st_mode = 0666 | S_IFREG; |3FSP.SAV[FSP.CLIENT]UTIL.C;4N[' if((*dep)->type & RDTYPE_DIR) sbuf->st_nlink = 2; else sbuf->st_nlink = 1; sbuf->st_uid = 0; sbuf->st_gid = 0; sbuf->st_size = BB_READ4((*dep)->bb_size); sbuf->st_atime = sbuf->st_mtime = sbuf->st_ctime = BB_READ4((*dep)->bb_time); util_closedir(drp); free(fpath); return(0); } } util_closedir(drp); } free(fpath); errno = ENOENT; return(-1); } int util_cd PROTO1(char *, p) { char *fpath; UBUF *ub; DDLIST *ddp; fpath = util_abs_path(p); for(ddp = ddroot; ddp; ddp = ddp->next) if(!strcmp(ddp->path,fpath)) break; if(!ddp && strcmp(p,".") && strcmp(p,"..")) { ub = client_interact(CC_GET_DIR,0L, strlen(fpath), (unsigned char *) fpath+1, 2, (unsigned char *)&client_net_len); if(ub->cmd == CC_ERR) { free(fpath); fprintf(stderr,"%s: %s\n",p, ub->buf); errno = EACCES; return(-1); } } if(env_dir_malloced) free(env_dir); env_dir_malloced = 1; env_dir = fpath; return(0); } /* Perform a cd, but don't verify path. Assume the path has been * pre-verified */ int util_cd2 PROTO1(char *, p) { char *fpath; fpath = util_abs_path(p); if(env_dir_malloced) free(env_dir); env_dir_malloced = 1; env_dir = fpath; return(0); } #ifdef HAVE_ANSI_PROTO void util_process_file(char *path, int mode, void (*process_file)(), int (*process_start_dir)(), void (*process_end_dir)(), int level) #else void util_process_file(path, mode, process_file, process_start_dir, process_end_d}=FSP.SAV[FSP.CLIENT]UTIL.C;4Nƾir, level) char *path; int mode, level; void (*process_file)(), (*process_end_dir)(); int (*process_start_dir)(); #endif { struct stat sbuf; RDIR *rdir; struct rdirent *rde; int pathlen; char *newname; u_long sum; if (util_stat(path, &sbuf) < 0) { perror(path); return; } if (S_ISREG(sbuf.st_mode)) { if(process_file) (*process_file)(path, &sbuf, mode, level); } else if (S_ISDIR(sbuf.st_mode)) { sum = mode; if (process_start_dir && (*process_start_dir)(path, &sbuf, &sum) < 0) fprintf(stderr, "skipping remote directory `%s'\n", path); else { if ((rdir = util_opendir(path))) { pathlen = strlen(path); while ((rde = util_readdir(rdir))) { /* skip over "." and ".." */ if (rde->d_name[0] == '.' && (rde->d_name[1] == '\0' || (rde->d_name[1] == '.' && rde->d_name[2] == '\0'))) continue; newname = malloc(pathlen + rde->d_namlen + 2); strcpy(newname, path); if(newname[pathlen-1] != '/') newname[pathlen] = '/'; else pathlen--; strcpy(newname + pathlen + 1, rde->d_name); util_process_file(newname, mode, process_file, process_start_dir, process_end_dir, level + 1); free(newname); } util_closedir(rdir); } if(process_end_dir) (*process_end_dir)(path, mode, sum, level); } } else fprintf(stderr, "remote file `%s' is not a file or directory!\n",path); /* free(path); */ } ~)FSP.SAV [FSP.CLIENT]UTIL.OBJ;2*[FSP.CLIENT]UTIL.OBJ;2+, ./F 4 -0123KPWO56+El7R҃89GFHJ1UTILV1.031-OCT-1994 12:41VAX C V3.2-044P/PPP/%s P/%s/%sP%s: %s Pdirectory reading out of memory :P %luk BP %lu JPdownloading %s: %s ^P %luk : %s [%db/s] sP uP wPWarning, unexpected grab error: %s P %luk P %lu Puploading %s: %s P %luk : %s [%db/s] PFSP_HOSTPNo FSP_HOST specified. PFSP_PORTPNo FSP_PORT specified. PFSP_DIRPNo FSP_DIR specified. 3PFSP_LOCALPORTAP0CPFSP_PASSWORDRPFSP_TRACE\PFSP_BUF_SIZEiPFSP_DELAYUTIL_PROCESS_FILE UTIL_STAT UTIL_READDIR UTIL_CLOSEDIR UTIL_OPENDIR UTIL_ABS_PATHATOL INIT_CLIENTCLIENT_INTERACTGETENVSIGNALPERRORFFLUSHSPRINTFFPRINTFFWRITEFREADFPUTSVAXC$MALLOC_OPTSTRLENSTRCPYVAXC$REALLOC_OPTVAXC$MALLOC_OPTNTOHS VAXC$FREE_OPTSTRLENNTOHSSTRLENTIME VAXC$FREE_OPTSTRLENSTRqFSP.SAV [FSP.CLIENT]UTIL.OBJ;2 CAT VAXC$FREE_OPTSTRLENsPFSP_LOCAL_DIRP.PFSP_TIMEOUTP/P.P.P.P..P%s: %s Pskipping remote directory `%s' Premote file `%s' is not a file or directory! P^ լЬTd/>TSTRLENPRSTRLENPRRRVAXC$MALLOC_OPTP[T[SPRINTFOSTRLENScPRTcPRRcPRRRVAXC$MALLOC_OPTP[T [SPRINTF[Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬSTRCPYP^YXZݬ UTIL_ABS_PATHPԮ W[Ԯ[1ծ1?hݮݮSTRLENPݮA~CLIENT_INTERACTPUe@& ݬߩFPRINTFݮ VAXC$FREE_OPT jP<~NTOHSPV< PVP TP[PSVPVRPPRPRPV[V [ծ1T[<n[nSQVQ OPP*FPV< S QPQTTSRʏRSQTSPʏPVPRRS~VAXC$MALLOC_OPTPUWWVRRxR~ݮVAXC$REALLOC_OPTPPWVRRxR~VAXC$MALLOC_OPTPUծݮ VAXC$FREE_OPTߩFPUTSPSЮVV kPPFSP.SAV [FSP.CLIENT]UTIL.OBJ;23*bP GЮPUG VRRPRP PVTTSRʏRPSUVTSPʏPW[ GЮPRRVRU[[RRSRTS1PTRTR1^SU Z TXЬTIMEPRV[?e~ݬSTRLENPVݬCLIENT_INTERACTPRCd[>d[QnPЮR RP QP{RPQPQݬ VRRRߣ^hFPRINTFhFFLUSHP^Tݬ UTIL_ABS_PATHPSP`$ߤsSSTRCATSSTRCATSSTRLEN嚏B~ݬ ݬSݬ  env_clientBH  util_opendir  util_closedir  util_readdirL< util_split_pathp  util_statTutil_cd VAXC$FREE_OPTP|^TVݬ UTIL_ABS_PATHPSЦRPSݢSTRCMPPbRR}ĕЬUUSTRCMPPhėUSTRCMPPW?S~SSTRLENPA~CLIENT_INTERACTPRb@*S VAXC$FREE_OPT UĚFPRINTF Pf  VAXC$FREE_OPTfSP^ݬ UTIL_ABS_PATHPR  VAXC$FREE_OPTRP<^ZVݬ UTIL_STATP ݬPERROR$X0`sjtyZu:.pw dJ(5|S؎ЅJXAIF Rj Y STdW2Vq Z.Qq[Z2{ZC2}.bMvj؋h S2 7kMlזmV`\ãưcI.ooIz*$ qU^,Sfr%Af\ rl;)>,ur'ĕŔ Ok=N8Noj=9^{0m/εւr<$͇/mf`فZS'ãn덙!H-D!d#ϓ-MNDZKv"jeRd6#ě^p.1PS b]%,iULo -KҾUjJjƂ7dfx ` Fݑ 板i;uMB^>\Cp~w)acn6~z F.z >am-.0 J=j,8(Ypg,[?wwD^򙅎H$pdOub|).~$+/'xR#{$ⵄh*P9kPܷ,r|T1h HAm5` LpB_R3Kß!5A-T+/ \UfбїVK:Z?O s;7AYhXpUJ-u͌CI1ߋ4 1N^G ^/Wv۞L#;cygFl(+3&&+Y<‡VlmcGo|F{`Ά,VBCJöBt6 'bb_len); len1 = BB_READ4(ub->bb_pos); pro1 = ub->buf; pro2 = ub->buf+len; if(ub->cmd == CC_ERR) { fprintf(stderr, "ERR: %s\n",ub->buf); return(0); } else { fprintf(stderr, "directory mode: "); if(len1) { flags = *pro2; fprintf(stderr, "(owner: %s)(del: %s)(create: %s)(mkdir: %s)(private: %s)\n", Machine(DIR_OWNER), Y_or_N(DIR_DEL), Y_or_N(DIR_ADD), Y_or_N(DIR_MKDIR), Y_or_N(DIR_PRIV)); } fprintf(stderr, "%s", pro1); fprintf(stderr, "\n"); return(1); } } int main PROTO3(int, argc, char **, argv, char **, envp) { char *np; char **av, *av2[2]; env_client(); if(argc == 1) { print_pro("/"); puts("/"); } else { if(!(av = glob(argv[1]))) { av = av2; av2[0] = *argv; av2[1] = 0; } np = util_abs_path(*av); if(print_pro(np))puts(np); else { #ifdef VMS puts(env_dir); client_done(); exit(3); #else puts(env_dir); #endif /* VM8%FSP.SAV[FSP.CLIENTS]FCDCMD.C;3K4S */ } } client_done(); exit(0); } *[FSP.CLIENTS]FCDCMD.OBJ;1+, ./F 4 -0123KPWO56wDl7`DS҃89GFHJ3FCDCMDV1.031-OCT-1994 12:39VAX C V3.2-044PERR: %s  Pdirectory mode: P(owner: %s)(del: %s)(create: %s)(mkdir: %s)(private: %s) TPotherZPyou^PN`PYbPNdPYfPNhPYjPNlPYnP%sqP sP/uP/P^SY|~~ݬSTRLENPG~CLIENT_INTERACTPR<~NTOHSPUݢNTOHLPV XUXTb@ ciFPRINTFPߣ iFPRINTFVbdRR ޣlWPޣjWWRޣhVޣfVVRޣdUޣbUURޣ`Tޣ^TTRޣZRD=FSP.SAV [FSP.CLIENTS]FCDCMD.OBJ;1rޣTRRߣiFPRINTFXߣniFPRINTFߣqiFPRINTFP ^R FCDCMD print_provms_main Z 9GLOB ENV_CLIENT UTIL_ABS_PATH CLIENT_DONECLIENT_INTERACTFPRINTFPUTSNTOHLNTOHSSTRLENEXIT VMS_MAIN$CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACECLIENT_INTR_STATE KEY_PERSISTS TARGET_DELAY UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUTENV_DIR w$CHAR_STRING_CONSTANTST ENV_CLIENTѬߤsߤuPUTS`PЬRݢGLOBPS ޭSbԭc UTIL_ABS_PATHPRRϟP RPUTSPUTS CLIENT_DONEEXIT CLIENT_DONEEXIT*[FSP.CLIENTS]FDUCMD.C;3+, ./F 4Oj-0123KPWO56wqCl7 lS҃89GFHJ!FSP.SAV [FSP.CLIENTS]FDUCMD.C;3O{/****************************************************************************** * This file is Copyright 1992 by Philip G. Richards. All Rights Reserved. * See the file README that came with this distribution for permissions on * code usage, copying, and distribution. It comes with absolutely no warranty. * email: ******************************************************************************/ /***************************************************************************** * reprogrammed as a stand alone client by Michael Meskes * ******************************************************************************/ #include "tweak.h" #include "client_def.h" #include "c_extern.h" #include "bsd_extern.h" #include "my-string.h" extern int optind; u_long total_file_size; static void add_file_size PROTO4(char *, name, struct stat *, sbufp, int, mode, int, level) { register u_long file_size; file_size = (sbufp->st_size + 1023) / 1024; total_file_size += file_size; if(((mode & EACH) && (mode & RECURSIVE)) || ((mode & EACH) && level < 2)) printf("%-7d %s\n", file_size, name); } static int start_dir PROTO3(char *, name, struct stat *, sbufp, u_long *, sum) { *sum = total_file_size; return(0); } static void end_dir PROTO4(char *, path, int, mode, u_long, sum, int, level) { /* directories are printed as default */ /* but, check recursion level */ if(((mode & RECURSIVE) && !(mode & SUM)) || ((level == 1) && (!(mode & SUM) || n*FSP.SAV [FSP.CLIENTS]FDUCMD.C;3O(mode & EACH))) || !level) { sum = total_file_size - sum; /* this is the real value */ printf("%-7d %s\n", sum, path); } } /* ARGSUSED */ int main PROTO3(int, argc, char **, argv, char **, envp) { int mode=0; int filcnt = 0; static char *wild[2] = { ".", 0 }; char **files, *singlefile[2]; int optletter; env_client(); while ((optletter=getopt(argc, argv,"ras")) != EOF) switch (optletter) { case 'r': mode |= RECURSIVE; /* recursively read all subdirectories */ break; case 's': mode |= SUM; /* print sums only */ break; case 'a': mode |= EACH; /* print an entry for each file */ break; default: fprintf(stderr,"Usage: du [-r|a|s] directory name.\n"); exit(0); } /* special case `du' without file arguments -- becomes `du .' */ if (argc == optind) { argv=wild; optind=0; } for ( ; argv[optind]; optind++) { if (!(files = glob(argv[optind]))) { files = singlefile; singlefile[0] = argv[optind]; singlefile[1] = 0; } for ( ; *files; files++) { util_process_file(*files, mode, add_file_size, start_dir, end_dir, 0); filcnt++; } } if (filcnt > 1) { fprintf(stdout, "--------:------\n"); fprintf(stdout, "%-7d TOTAL\n", total_file_size); } client_done(); #ifdef VMS return 1; #else return 0; #endif }  a <s{pK Z3q1 Ufadfzrq67⸀Ǻgr6c6s,=~H3R}ΎXHAdXeXBX O/inKV9VckKqϋ*uY҉Dу ypX=;Cu+tjul3lsN7w _T K,]UlE?B0q4vr4(^OJ>MfPK2\4&Q"96'l!(MjoEPoFpw%OuY) @\^+?:ir*Ogb>ut)e!GWNo~d*Ll+-FRa0R*UK#]K|I& F"zhQA^V4S@jxВ\f[sJ(m" MY)ًHX.G0 a"w _NQҰGj.*Z=~Qsi5Q$"D. )mX:L-<\e1p@dzf C.K[l~"'iUJ47^E#$;F(0ABfl_c} H?Q Q4RVlx+SU|O|u=h B+e P d TZ6L_mxTTxY$&,~o nlc#m~P:Z#/]Ɉ{vI 7u h/vCp \?LN]wf&6Zzuŧk(k W[G]-s>{'Var:4kML4v`4u'AiP#t,έE*]fLhp>ڪ&@eoH [8cm3B YfC$P#G{!8;FWH)s}< /*l3{{z=g>#vr PReTO628V?[_scdt;:% j'2he+.D$_#**)Tnsdv[ ,"'in:,81vDIHE VeDEs05@]OU1*ELSM"LEVELMHTBEHPLHZDTnFEHD:3m \*m]OFSP.SAV [FSP.CLIENTS]FDUCMD.OBJ;1H*[FSP.CLIENTS]FDUCMD.OBJ;1+, ./F 4 -0123KPWO56 #ifndef VMS #include #include #include #else #include "types.h" #include "time.h" #endif #ifdef HAVE_UNISTD_H #include #endif #include "find.h" extern PLAN *plan; time_t now; /* time find was run */ int isoutput; /* user specified output operator */ int process; /* process current directory */ static void usage_ffind(); static void eval_file PROTO4(char *, name, struct stat *, sbufp, xFSP.SAV [FSP.CLIENTS]FFINDCMD.C;3M  int, mode, int, level) { register PLAN *p; for (p = plan; p && (p->eval)(p, sbufp, name); p = p->next); } static int eval_dir PROTO3(char *, name, struct stat *, sbufp, u_long, sum) { register PLAN *p; process = 0; for (p = plan; p && (p->eval)(p, sbufp, name); p = p->next); return (process); } int main PROTO3(int, argc, char **, argv, char **, envp) { register char **p; char *singlefile[2], **files; env_client(); (void)time(&now); /* initialize the time-of-day */ p = ++argv; /* First option delimits the file list. */ while (*p && !option(*p)) p++; if (p == argv) usage_ffind(); find_formplan(p); /* Execute plan for all file lists */ while (*argv) { if (argv >= p) break; if (!(files = glob(*argv))) { files = singlefile; singlefile[0] = *argv; singlefile[1] = 0; } for ( ; *files; files++) util_process_file(*files, 0, eval_file, eval_dir, 0L, 0); argv++; } client_done(); } static void usage_ffind PROTO0((void)) { fprintf(stderr,"usage: ffind file [file ...] expression\n"); exit(1); } FSP.SAV SP.CLIENTS]FFINDCMD.OBJ;1)*[FSP.CLIENTS]FFINDCMD.OBJ;1+, ./F 4\ -0123KPWO56 int get_clobbertype=CLOBBERONFIND; char *fname; int optletter; int suffix; char *tname; unsigned long start_from; extern int optind; static int len; static void fsp_cleanup PROTO1(int, signum) { char filename[20]; #ifndef VMS sprintf(filename,".fsp.%d",getpid()); #else /* no more than one dot allowed in filenames */ sprintf(filename,"fsp_%d",getpid()); #endif unlink(filename); exit(1); } static int get_file PROTO4(char *, path, struct stat *, sbufp, int, mode, int, level) { char *name = path + len; #ifdef VMS char filename[255]; #endif FILE *fp; struct stat statbuf; #ifdef VMS /* convert more than one dot to underscores. */ strcpy(filename, name); name=filename; convdots(name, filename); #endif if (get_clobbertype==NOCLOBBER) { if (fp=fopen(name,"r")) { fclose(fp); fprintf(stderr,"Will not overwrite existing file %s\n",name); return; } } if (get_clobbertype==UNIQUE) { fname=name; name=(char *)malloc(strlen(fname)+5); strcpy(name,fname); for (suffix=0 ; (fp=fopen(name,"r")) ; suffix++) { fclose(fp); sprintf(name,"%s-%d",fname,suffix); } } if (get_clobbertype==CLOBBERONFIND) { fname=name; name=(char*)malloc(20); #ifdef VMS /* no more than one dot allowed in filenames */ sprintf(name,"fsp_%d",gm|FSP.SAV[FSP.CLIENTS]FGETCMD.C;3U )etpid()); #else sprintf(name,".fsp.%d",getpid()); #endif } if(get_clobbertype == APPEND) { if(stat(name, &statbuf) == 0) { start_from = statbuf.st_size; if((fp = fopen(name,"a")) == NULL) perror(name); } else start_from = -1; } else start_from = -1; if(start_from == -1) { fp = fopen(name, "w"); start_from = 0; } if(fp) { if(util_download(path,fp, start_from) == -1) { fclose(fp); unlink(name); } else fclose(fp); } else fprintf(stderr,"Cannot write %s\n",name); if (get_clobbertype==CLOBBERONFIND) { rename(name,fname); free(name); } if (get_clobbertype==UNIQUE) { free(name); } } static int make_dir PROTO3(char *, name, struct stat *, sbufp, u_long *, mode) { struct stat sbuf; if (*mode != RECURSIVE) return (-1); if (stat(name + len, &sbuf) == 0) { /* check if the directory already exists... */ if (S_ISDIR(sbuf.st_mode)) return (0); /* the directory doesn't exist, but *something* does... urgh! */ fprintf(stderr,"fgetcmd: local file `%s' is not a directory\n", name + len); return (-1); } /* nothing exists by this name -- try to create it */ if (mkdir(name + len, 0755) < 0) { perror (name + len); return(-1); } return (0); } int main PROTO3(int, argc, char **, argv, char **, envp) { char **av, *av2[2], n[1024]; int prompt, mode = 0; signal(SIGHUP,fsp_cleanup); signal(SIGINT,fspӊFSP.SAV[FSP.CLIENTS]FGETCMD.C;3U 7_cleanup); signal(SIGQUIT,fsp_cleanup); signal(SIGILL,fsp_cleanup); signal(SIGTRAP,fsp_cleanup); signal(SIGFPE,fsp_cleanup); signal(SIGSEGV,fsp_cleanup); #ifndef __linux__ signal(SIGEMT,fsp_cleanup); signal(SIGBUS,fsp_cleanup); signal(SIGSYS,fsp_cleanup); #endif signal(SIGPIPE,fsp_cleanup); signal(SIGTERM,fsp_cleanup); env_client(); if (strcmp(env_local_dir,".") && chdir(env_local_dir)) { perror("chdir"); exit(1); } /* Parse options * -f forces overwrite * -u forces unique names * -t uses temporary file to download * -n forces noclobber * -a append to files if they exist * -r recursively get directories */ while ((optletter=getopt(argc, argv,"futnar")) != EOF) switch (optletter) { case 'f': get_clobbertype=CLOBBER; break; case 'u': get_clobbertype=UNIQUE; break; case 't': get_clobbertype=CLOBBERONFIND; break; case 'n': get_clobbertype=NOCLOBBER; break; case 'a': get_clobbertype = APPEND; break; case 'r': mode=RECURSIVE; break; } if(argc > optind) { for( ; argc>optind ; optind++) { if(!(av = glob(argv[optind]))) { av = av2; av2[0] = argv[optind]; av2[1] = 0; } while(*av) { for(len = strlen(*av); len >= 0 && (*av)[len] != '/'; len--); len++; util_process_file(*av, mode, get_file, make_dir, 0L, 0); av++; } } } else { prompt = isatty(0); while(1) { if(prompt) { fputs("fget: ",stdout);   jmx3/ c2Oy yRrmyvCI)}5PU=zJy`Z3#!Xsfe)tW [9_zg*RslG,_l~)o( 6H }[FG<>(a30fiP_#.Gdjs9CY_03yyvDIm^l&=#s(c`}r6JRZ17oˎ0fSM:P-obG0IkXviZy0z8D96_ 7V_ g% .M}+/5G`xS5Uv!L|p5'rmoJ A2!4BNem *N^BlGj|} O BV0Ra n@J?wd| ;@2y Sn ,ͽy9Tw?Ӵxa3bi<:c$s`p|bop}n/wAz 3U%5"3-Vm]M3ɹSqlzPL'=ąD@J%y@ ' 7I f)"K  ck'eCX6_HS O@ o_<&\u\:MC2u4RW.W8gZBMj` ʁ9^#< \ m;W 2PUQQ.(>Hw2 s*|B%)FD?M=IF>:0hQ9KR_$VG#Kv2"ݔ\IJWDs/!o(!~!SU&RLik:)L~lp?e!l+ȕ?pU#::LXk!H,'jCW{CZlZӔ'8)(3IniwCPZJe,4/ru8<1fm#;P[P:D68~%Gq 9`}%Q12-cy I~2}fuXnu]ZqavxG -S=f,t8eet!S|Y;)'+8kpwInIXy2e:^T:Ð]9( eo<:{5$8i:h_,>';6+3NY%[n;\82sc<obJ6r9%pv%*hz&#+Zqd*[2<GL$H c(]!+H3`EB~X0f2+% PZfj*TW( R:K p BbSHeRFA4 e5nAE]o}F`0-?eOVE$ 3uk;-?ksvrjmnSel/~Ct ~ cF)'mg%FF\J&/$E8F8* kF ML8"JL#J`[PSKK!UAX'~LSQJR~6PXC2AW ^TQPU\o2H0w ~xZAJ?e [\"uogJ2RNEBAqoM&UQNFSP.SAV[FSP.CLIENTS]FGETCMD.C;3U  fflush(stdout); } if(!gets(n)) break; if(!*n) continue; if(!(av = glob(n))) { av = av2; av2[0] = n; av2[1] = 0; } while(*av) { for(len = strlen(*av); len >= 0 && (*av)[len] != '/'; len--); len++; util_process_file(*av, mode, get_file, make_dir, 0L, 0); av++; } } } client_done(); exit(0); } *[FSP.CLIENTS]FGETCMD.OBJ;1+,. /F 4  -0123KPWO56 Dl7%CS҃89GFHJ4FGETCMDV1.031-OCT-1994 12:39VAX C V3.2-044PPfsp_%dPr PWill not overwrite existing file %s .Pr0P%s-%d6Pfsp_%d=Pa?PwAPCannot write %s RPfgetcmd: local file `%s' is not a directory P.PchdirPfutnarPfget: P^GETPIDPSPRINTFDELETEEXIT^RWSVX~STRCPYTTCONVDOTSh-ߢTFOPENPUUFCLOSETߢ 9m4FSP.SAV[FSP.CLIENTS]FGETCMD.OBJ;1 FPRINTFheTffSTRLENP~VAXC$MALLOC_OPTPTfTSTRCPYcߢ.TFOPENPU-UFCLOSEcfߢ0TSPRINTFcߢ.TFOPENPUh$TfVAXC$MALLOC_OPTPTGETPIDPߢ6TSPRINTFh:TSTATP!gߢ=TFOPENPUTPERROR gPggߢ?TFOPENPUgU7gUݬ UTIL_DOWNLOADPUFCLOSETDELETEUFCLOSETߢAFPRINTFhfTRENAMET VAXC$FREE_OPTh T VAXC$FREE_OPTP 8^SRѼ Pb~STATP$ int grab_clobbertype=CLOBBERONFIND; char *fname; int optletter; int suffix; char *tname; unsigned long start_from; extern int optind; static void fsp_cleanup PROTO1(int, signum) { char filename[20]; #ifndef VMS sprintf(filename,".fsp.%d",getpid()); #else /* no more than one dot allowed in filenames }̺FSP.SAV[FSP.CLIENTS]FGRABCMD.C;3K */ sprintf(filename,"fsp_%d",getpid()); #endif unlink(filename); exit(1); } static int grab_file PROTO1(char *, path) { char *name, *t2; #ifdef VMS char filename[255]; #endif FILE *fp; struct stat statbuf; for(name = t2 = path; *t2; t2++) if(*t2 == '/') name = t2 + 1; #ifdef VMS /* convert more than one dot to underscores */ strcpy(filename,name); name=filename; convdots(name, filename); #endif /* VMS */ if (grab_clobbertype==NOCLOBBER) { if (fp=fopen(name,"r")) { fclose(fp); fprintf(stderr,"Will not overwrite existing file %s\n",name); return; } } if (grab_clobbertype==UNIQUE) { fname=name; name=(char *)malloc(strlen(fname)+5); strcpy(name,fname); for (suffix=0 ; (fp=fopen(name,"r")) ; suffix++) { fclose(fp); sprintf(name,"%s-%d",fname,suffix); } } if (grab_clobbertype==CLOBBERONFIND) { fname=name; name=(char*)malloc(20); #ifdef VMS /* no more than one dot allowed in filenames */ sprintf(name,"fsp_%d",getpid()); #else sprintf(name,".fsp.%d",getpid()); #endif } if(grab_clobbertype == APPEND) { if(stat(name, &statbuf) == 0) { start_from = statbuf.st_size; if((fp = fopen(name,"a")) == NULL) perror(name); } else start_from = -1; } else start_from = -1; if(start_from == -1) { fp = fopen(name, "w"); start_from = 0; } if(fp) { if(util_grab_file(path,fp,start_from) == -1) { fclose(fp); unlink(name); } else fclose(fp); } else fFSP.SAV[FSP.CLIENTS]FGRABCMD.C;32K Hprintf(stderr,"Cannot write %s\n",name); if (grab_clobbertype==CLOBBERONFIND) { rename(name,fname); free(name); } if (grab_clobbertype==UNIQUE) { free(name); } } int main PROTO3(int, argc, char **, argv, char **, envp) { char **av, *av2[2], n[1024]; int prompt; signal(SIGHUP,fsp_cleanup); signal(SIGINT,fsp_cleanup); signal(SIGQUIT,fsp_cleanup); signal(SIGILL,fsp_cleanup); signal(SIGTRAP,fsp_cleanup); signal(SIGFPE,fsp_cleanup); #ifndef __linux__ signal(SIGBUS,fsp_cleanup); signal(SIGEMT,fsp_cleanup); signal(SIGSYS,fsp_cleanup); #endif signal(SIGSEGV,fsp_cleanup); signal(SIGPIPE,fsp_cleanup); signal(SIGTERM,fsp_cleanup); env_client(); if (strcmp(env_local_dir,".") && chdir(env_local_dir)) { perror("chdir"); exit(1); } /* Parse options * -f forces overwrite * -u forces unique names * -t uses temporary file to download * -n forces noclobber * -a append to files if they exist */ while ((optletter=getopt(argc, argv,"futna")) != EOF) switch (optletter) { case 'f': grab_clobbertype=CLOBBER; break; case 'u': grab_clobbertype=UNIQUE; break; case 't': grab_clobbertype=CLOBBERONFIND; break; case 'n': grab_clobbertype=NOCLOBBER; break; case 'a': grab_clobbertype = APPEND; } if(argc > optind) { for(; argc > optind; optind++) { if(!(av = glob(argv[optind]))) { av = av2; av2[0] = argv[optind]; av2[1] = 0; } while(*av) grab_file(*av++); } }\SQ FSP.SAV[FSP.CLIENTS]FGRABCMD.C;3K 6  else { prompt = isatty(0); while(1) { if(prompt) { fputs("fgrab: ",stdout); fflush(stdout); } if(!gets(n)) break; if(!*n) continue; if(!(av = glob(n))) { av = av2; av2[0] = n; av2[1] = 0; } while(*av) grab_file(*av++); } } client_done(); exit(0); } *[FSP.CLIENTS]FGRABCMD.OBJ;1+,./F 4 -0123KPWO56Dl7SS҃89GFHJ5FGRABCMDV1.031-OCT-1994 12:39VAX C V3.2-044PPfsp_%dPr PWill not overwrite existing file %s .Pr0P%s-%d6Pfsp_%d=Pa?PwAPCannot write %s RP.TPchdirZPfutna`Pfgrab: P^GETPIDPSPRINTFDELETEEXIT^RXSWYЬPPT`P`/PTP`TSTRCPYUUCONVDOTSi-ߢUFOPENPVVFCLOSEUߢ FPRINTFigUggKFSP.SAVSP.CLIENTS]FGRABCMD.OBJ;1gPSTRLENP~VAXC$MALLOC_OPTPUgUSTRCPYcߢ.UFOPENPV/PVFCLOSEcgߢ0USPRINTFcߢ.UFOPENPVi$UgVAXC$MALLOC_OPTPUGETPIDPߢ6USPRINTFi:USTATP!hߢ=UFOPENPVUPERROR hPhhߢ?UFOPENPVhV7hVݬUTIL_GRAB_FILEPVFCLOSEUDELETEVFCLOSEUߢAFPRINTFigURENAMEU VAXC$FREE_OPTi U VAXC$FREE_OPTP^TXYUZϞSSSIGNALRbSbSbSbSbSbS bSbS bS bS bSb ENV_CLIENTߤRSTRCMPP$CHDIRPߤTPERROREXITߤZެScެRbGETOPTPii~iPPaUP,?PePePePePeߤZcbGETOPTPiiެWghFSVhRBfGLOBPRޭRhP@ԭb P݂UbhghlISATTYPSSjߤ`FPUTSjFFLUSHGETSP8GLOBPR ޭRԭb݂bP)RFGRABCMD fsp_cleanup44 grab_file4vms_main5 GLOB ENV_CLIENTUTIL_GRAB_FILE CLIENT_DONEGETPIDSTATRENAMEISATTYDELETESIGNALPERRORFFLUSHSPR;FFSP.SAVSP.CLIENTS]FGRABCMD.OBJ;1INTFFPRINTFFPUTSGETSFCLOSEFOPENEXIT VAXC$FREE_OPTVAXC$MALLOC_OPTSTRLENCONVDOTSSTRCPYGETOPTEXITCHDIRSTRCMP 4VMS_MAINi$CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACEJCLIENT_INTR_STATE KEY_PERSISTS TARGET_DELAY UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUTGRAB_CLOBBERTYPEFNAME OPTLETTERSUFFIXTNAME START_FROMOPTINDh$CHAR_STRING_CONSTANTSM CLIENT_DONEEXIT+PUXXXX5XXXXXXXMXXXXXE=*[FSP.CLIENTS]FHOSTCMD.C;3+,./F 4N-0123KPWO56̯wCl7[S҃89GFHJBWFSP.SAV[FSP.CLIENTS]FHOSTCMD.C;3N /*********************************************************************\ * Copyright (c) 1993 by Michael Meskes * * (meskes@ulysses.informatik.rwth-aachen.de) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. * \*********************************************************************/ #include "tweak.h" #include "client_def.h" #include "c_extern.h" #include #include "my-string.h" #ifndef VMS #include #else #include "pwd.h" #endif #ifdef HAVE_UNISTD_H #include #endif #include #ifdef HOST_LOOKUP #include #endif #ifdef VMS #define FSP_STAT vms_stat #else #define FSP_STAT stat #endif #define NUMBER 1 #define NAME 2 int delay = -1, local_port = -1, timeout = -1, trace = -1, port = -1; char *local_dir = NULL, *filename = NULL, *password = NULL; char *hostname = NULL, *hostaddr = NULL, *dir = NULL; extern char *optarg; extern int optind; char *buffer=0L,*home="/"; void host_usage PROTO0((void)) /* print usage message */ { fprintf(stderr,"Usage: fhost [-d delay] [-p local port] [-l local dir]\n"); fprintf(stderr," [-o timeout] [-t trace] [-w password]\n"); ~u  jmx32icw>uGؚZ!TjG0>D:}QsGks?M80:Ҹ-~/QF< QgISAWU9sͬ mU 4{*k 7ڪVb_ZX2}!X*UI8X[>{ $D ͟5j>8 ՚`;Z D=le4 Drpz<N .s.'_ux$sY!-5r zLb4 IM2^lZH[=WTHjL,ϵZ za)5*l nd.]_!br?Dl8[`u083V+H₻q^m+bx6[fǘlh` ffJRѷ@~LQO_9$L;;!+ޫE] M G0O} )nNL(W?-kO#y FK%(TI)#[@Ga|^CvVGl l ~9Hh/H O諚f/& b%݀3K0dqK V #\߼e%sKv2t^K(Lh[ joJnAhGip ?T 70U}+ R5=?oDI3QZ[U<B40NŶjAǺ5Mi%Iei4&f}O擑q R!GUc]ηb6XaC4\;"́.F~ɐJ6wq3M8i]s_ ߘxAg6 _dk#+O3X ~_3 >|?5lE؂Vߖ.mg1`\!-"?-4u,)?uSX8ޜV|-nra+=A1_?WQmI;JZ@ݤZ1nN qj5uoaE!<)'ҿL8~Mo+>R,R\﶐$(vnQMyͻ^_.Y۷*椀]=eX̐ xTrLyO+[}.biW􉏧d><.6X>dȎ5R/¨fY?x*x_&=Ȇ"MVC 9!gx=۞ET ˧.k<7aƭa!nS`)] BX>ɀr<[6=.--&JvZFu0.ޯ 1(v$<7s)!{ՙfb9?4|膻v1'ٴ—M ssvh}X+x01ϝ5Mχߦ%@X?-n)qW n8D& #8/3 Dnlin|9"Nd1'E?{p,h1>;Htg*&(h[>3~=g|?-CnqN;h%m~FSP.SAV[FSP.CLIENTS]FHOSTCMD.C;3N fprintf(stderr," [-f filename] [-h [number|name]]\n"); fprintf(stderr," [host port [directory] | abbreviation]\n"); exit(0); } char *load_file PROTO1(char *, filename) /* load resource file */ { FILE *stream; long i,length; struct stat sf; char *f1=".fsp_prof", *f2=0L, *f3=FSPRC; if (!filename) { if (!FSP_STAT(f1,&sf)) filename=f1; else { f2=(char *)malloc (strlen(home) + 7); if (!f2) { perror("malloc"); return(0L); } sprintf (f2,"%s/.fsp_prof",home); if (!FSP_STAT(f2,&sf)) filename=f2; else filename=f3; } } stream=fopen(filename,"r"); if (!stream) { perror(filename); if (f2) free(f2); return(0L); } i=fseek(stream,0L,2); if (i) { perror("fseek"); fclose(stream); if (f2) free(f2); return(0L); } length=ftell(stream); if (!length) { perror("ftell"); fclose(stream); if (f2) free(f2); return(0L); } buffer=(char *)calloc(length,sizeof(char)); if (!buffer) { perror("malloc"); fclose(stream); if (f2) free(f2); return(0L); } i=fseek(stream,0L,0); if (i) { perror("fseek"); free(buffer); fclose(stream); if (f2) free(f2); return(0L); } fread(buffer,(long)sizeof(char),length,stream); if (ferror(stream)) { perror("fread"); free(buffer); fclose(stream); if (f2) free(f2); return(0L); } i=fclose(stream); if (i) { perror("fclose"); free(buffer); if (f2) free(f2); return(0L); } if (pG JFSP.SAV[FSP.CLIENTS]FHOSTCMD.C;3N%Uf2) free(f2); return(buffer); } /* get data out of resource file */ void parse_file PROTO2(char *, filename, char *, abb) { char *ptrh,*ptrp,*ptra,*ptre; int found=0; ptrh=buffer=load_file(filename); if (!buffer) exit(1); while ((ptrh=(char *)strstr(ptrh,"host ")) && !found) { ptrh+=5; for (ptre=ptrh;*ptre!='\n';ptre++); ptra=(char *)strstr(ptrh,abb); if (ptra && ptra=ptre)) { fprintf(stderr,"fhost: syntax error in setup file\n"); free(buffer); exit(1); } fprintf(stFSP.SAV[FSP.CLIENTS]FHOSTCMD.C;3NL derr," port: "); for (ptrp+=9;*ptrp!='\n';ptrp++) fprintf(stderr,"%c",*ptrp); fprintf(stderr,"\n\n"); } return; } int main PROTO3(int, argc, char **, argv, char **, envp) { int optletter,csh,host=0; register char *p; char *log,*homedir="/"; struct passwd *pw=0L; struct hostent *hp; long addr; #ifndef VMS log = (char *)getlogin(); if (log) pw = getpwnam(log); if (!pw) pw = getpwuid(getuid()); if (pw) { /* * Figure out what shell we're using. A hack, we look for a shell * ending in "csh". */ csh = !strcmp(pw->pw_shell + strlen(pw->pw_shell) - 3, "csh"); home = pw->pw_dir; /* for default search for file .fsp_prof*/ } #endif while ((optletter=getopt(argc, argv,"d:p:l:t:o:f:h:w:")) != EOF) switch (optletter) { case 'd': delay=atol(optarg); /* FSP_DELAY */ break; case 'p': local_port=atol(optarg); /* FSP_LOCAL_PORT */ break; case 'w': password=optarg; /* FSP_PASSWORD */ break; case 'l': local_dir=optarg; /* FSP_LOCAL_DIR */ break; case 'o': timeout=atol(optarg); /* FSP_TIMEOUT */ break; case 't': if (!strcmp(optarg,"on")) trace=1; /* FSP_TRACE */ else if (!strcmp(optarg,"off")) trace=0; else host_usage(); break; case 'f': filename=optarg; /* file name */ break; case 'h': if (!strcmp(optarg,"number")) host=NUMBER; /* host mode */ else if (!strcmp(optarg,"name")) host=NAME; else host_usage(); break; default: host_usage(); break; } if(argc > optind+1 && !fiFSP.SAV[FSP.CLIENTS]FHOSTCMD.C;3N-lename) { /* host and port and no filename given */ for (p=argv[optind];!hostname && *p && *p!='\n';p++) if (!isdigit(*p) && *p!='.') hostname=argv[optind]; if (!hostname) hostaddr=argv[optind]; port=atol(argv[optind+1]); if (argc > optind + 1) dir=argv[optind+2]; /* directory given, too */ } else if (argc > optind) { /* abbreviation given */ parse_file(filename, argv[optind]); } else { /* list or set command-line options */ if (filename || argc==1) { /* list only */ list_file(filename); exit(0); } } if (delay>=0) { #ifdef VMS printf("$define/nolog FSP_DELAY %d\n",delay); #else if (csh) printf("setenv FSP_DELAY %d;\n",delay); else printf("FSP_DELAY=%d;\nexport FSP_DELAY;\n",delay); #endif } if (local_port>=0) { #ifdef VMS printf("$define/nolog FSP_LOCALPORT %d\n",local_port); #else if (csh) printf("setenv FSP_LOCALPORT %d;\n",local_port); else printf("FSP_LOCALPORT=%d;\nexport FSP_LOCALPORT;\n",local_port); #endif } if (trace>=0) { if (csh) { #ifdef VMS printf("$define/nolog FSP_TRACE \"1\"\n"); #else if (trace) printf("setenv FSP_TRACE;\n"); else printf("unsetenv FSP_TRACE;\n"); #endif } else { #ifdef VMS printf("$deassign FSP_TRACE\n"); #else if (trace) printf("FSP_TRACE;\nexport FSP_TRACE;\n"); else printf("unset FSP_TRACE;\n"); #endif } } if (timeout>=0) { #ifdef VMS printf("$define/nolog FSP_TIMEOUT %d\n",timeout); #else if (csh) printf("setenv FSP_TIMEOUT %d;\nGFSP.SAV[FSP.CLIENTS]FHOSTCMD.C;3N?",timeout); else printf("FSP_TIMEOUT=%d;\nexport FSP_TIMEOUT;\n",timeout); #endif } if (port>=0) { #ifdef VMS printf("$define/nolog FSP_PORT %d\n",port); #else if (csh) printf("setenv FSP_PORT %d;\n",port); else printf("FSP_PORT=%d;\nexport FSP_PORT;\n",port); #endif } if (local_dir) { #ifdef VMS printf("$define/nolog FSP_LOCAL_DIR \""); #else if (csh) printf("setenv FSP_LOCAL_DIR "); else printf("FSP_LOCAL_DIR="); #endif for (p=local_dir;*p && *p!='\n' && *p!=' ';p++) printf("%c",*p); #ifdef VMS printf("\"\n"); #else if (csh) printf(";\n"); else printf(";\nexport FSP_LOCAL_DIR;\n"); #endif } if (password) { #ifdef VMS printf("$define/nolog FSP_PASSWORD \""); #else if (csh) printf("setenv FSP_PASSWORD "); else printf("FSP_PASSWORD="); #endif for (p=password;*p && *p!='\n' && *p!=' ';p++) printf("%c",*p); #ifdef VMS printf("\"\n"); #else if (csh) printf(";\n"); else printf(";\nexport FSP_PASSWORD;\n"); #endif } if (hostname || hostaddr) { #ifdef VMS printf("$define/nolog FSP_HOST \""); #else if (csh) printf("setenv FSP_HOST "); else printf("FSP_HOST="); #endif if(hostname) { for(p = hostname; *p && *p!='\n' && *p!= ' '; p++); *p = 0; } if(hostaddr) { for(p=hostaddr;*p && *p !='\n' && *p!=' ';p++); *p = 0; } if(host==NAME && !hostname) { #if HOST_LOOKUP addr=inet_addr(hostaddr); if (hp=gethostbyaddr((char *) &addr, sizeof(addr), AF_INET)) hostname= (char *)hpYFSP.SAV[FSP.CLIENTS]FHOSTCMD.C;3;2NG->h_name; #endif if (!hostname) host=NUMBER; } if (host==NUMBER && !hostaddr) { /* look for number */ #if HOST_LOOKUP if (hp=gethostbyname(hostname)) hostaddr=(char *)inet_ntoa(*(struct in_addr *) * hp->h_addr_list); #endif if (!hostaddr) host=NAME; } if (!host) { if (hostaddr) host=NUMBER; else if (hostname) host=NAME; else { fprintf(stderr,"fhost: No host given!"); if (buffer) free(buffer); exit(1); } } printf("%s", (host==NAME)? hostname : hostaddr); #ifdef VMS printf("\"\n"); #else if (csh) printf(";\n"); else printf(";\nexport FSP_HOST;\n"); #endif if (!dir) dir=homedir; /* if host is set we need this */ } if (dir) { #ifdef VMS printf("$define/nolog FSP_DIR \""); #else if (csh) printf("setenv FSP_DIR "); else printf("FSP_DIR="); #endif for (p=dir;*p && *p!='\n' && *p!=' ';p++) printf("%c",*p); #ifdef VMS printf("\"\n"); #else if (csh) printf(";\n"); else printf(";\nexport FSP_DIR;\n"); #endif } #ifdef VMS if (hostname) printf("$define/nolog FSP_NAME \""); else printf("$deassign FSP_NAME\n"); #else if (csh) printf("setenv FSP_NAME \""); else printf("FSP_NAME=\""); #endif if (hostname) for (p=hostname;*p && *p!='\n' && *p!=' ';p++) printf("%c",*p); #ifdef VMS if (hostname) printf("\"\n"); #else if (csh) printf("\";\n"); else printf("\";\nexport FSP_NAME;\n"); #endif if (buffer) free(buffer); exit(0); } s7FSP.SAVSP.CLIENTS]FHOSTCMD.OBJ;17D*[FSP.CLIENTS]FHOSTCMD.OBJ;1+,./F 4 -0123KPWO56\}Dl7`dS҃89GFHJ5FHOSTCMDV1.031-OCT-1994 12:39VAX C V3.2-044PPPPP!P/ P!!PUsage: fhost [-d delay] [-p local port] [-l local dir] !:P [-o timeout] [-t trace] [-w password] !nP [-f filename] [-h [number|name]] !P [host port [directory] | abbreviation] !P.fsp_prof!Pfsp_root:fsp_prof!Pmalloc!P%s/.fsp_prof!Pr!Pfseek! Pftell!Pmalloc!Pfseek!Pfread!#Pfclose!*Phost !0Pfhost: syntax error in setup file !SPfsp port !]Pfhost: syntax error in setup file !Phost !Pdelay !Ptimeout !Ptrace !Pfhost: syntax error in setup file !Plocal port !Plocal directory !Pfsp directory !Ppassword !Phost %s not found ! Phost !Phost: !P%c!Pfsp port !#Phost !)Pfhost: syntax error in setup file !LP port: !TP%c!WP !ZP/!\Pd:p:l:t:o:f:h:w:!mPon!pPoff!tPnumber!{Pname!P$define/nolog FSP_DELAY~.JFSP.SAVSP.CLIENTS]FHOSTCMD.OBJ;1 %d !P$define/nolog FSP_LOCALPORT %d !P$define/nolog FSP_TRACE "1"  C$V_CTYPEDEFS LIST_FILE PARSE_FILE LOAD_FILE HOST_USAGE GETHOSTBYNAME GETHOSTBYADDRSTRSTRSTRLENSTRCMPPERRORFTELLFSEEKSPRINTFPRINTFFPRINTFFREADFCLOSEFOPENEXITCALLOC VAXC$FREE_OPTVAXC$MALLOC_OPTVMS_STATATOL VAXC$FREE_OPTEXIT VAXC$FREE_OPTEXIT VAXC$FREE_OPT INET_NTOA INET_ADDREXITATOLGETOPT HOST_USAGE!P$deassign FSP_TRACE !P$define/nolog FSP_TIMEOUT %d ! P$define/nolog FSP_PORT %d !'P$define/nolog FSP_LOCAL_DIR "!EP%c!HP" !KP$define/nolog FSP_PASSWORD "!hP%c!kP" !nP$define/nolog FSP_HOST "!Pfhost: No host given!!P%s!P" !P$define/nolog FSP_DIR "!P%c!P" !P$define/nolog FSP_NAME "!P$deassign FSP_NAME !P%c!P" P ^!RSߢcFPRINTF\lߢ:clߢnclݣEXIT|8^!SVRUTլpRVMS_STATPRZP STRLENP~VAXC$MALLOC_OPTPUPERRORP USPRINTFUVMS_STATPUTݬFOPENPRݬPERRORU U VAXC$FREE_OPTPRFSEEKP$PERRORRFCLOSEU U VAXC$FREE_OPTPRFTELLPT$ PERRORRFCLOSEU U VAXC$FREE_OPTPTCALLOCPf$PERRORRFCLOSEU U VAXC$FREE_OPTP|~RFSEEKԡFSP.SAVSP.CLIENTS]FHOSTCMD.OBJ;17P-PERRORf VAXC$FREE_OPTRFCLOSEU U VAXC$FREE_OPTPRTfFREADbP -PERRORf VAXC$FREE_OPTRFCLOSEU U VAXC$FREE_OPTPRFCLOSEP$#PERRORf VAXC$FREE_OPTU U VAXC$FREE_OPTPU U VAXC$FREE_OPTP^!TXVWnݬ LOAD_FILEPhPUh EXIT*USTRSTRPU1n1 STRSTRFPRINTF[ VAXC$FREE_OPTYEXITZATOLUUSc Sc ݬUP1PS1nURf0b +b &bPPP@gb.UfRf b b fUӑb b PRb b b  PRb b ]RfPPfIRܑb =b 8PbPPP@gb.0khijRb b Ue Ue SUPR]khij R~PĀUPS؏&ĆUPSPSP~P؏&čUPSPSP~PgĖUPQXSQSOaoa Qaoa aonRRRĝkhij&UPSPS P~PUPSPSPUPSPSPUPSPSP*UPUn1nݬFPRINTFP^!SXVݬ LOAD_FILEPhPTh EXIT TSTRSTRPT1FPRINTFUSTRSTRWPTfed Pd~feTd TgPR#TgR P RP)feh VAXC$FREE_OPTEXITLfe Rb Pb~TfeRb v} yyNK]RrN,<< CXrP+":ZoOx)D?!Gl))#F0:$Ii$)g`*.Q˫Ol} 6;2wxTh^x!o۩uc1WSv-nc%ML (VJB}"\0U&: Wv'[$%qSEQJOuOFQ4<{>AF3* {`eNi\DX :|wLdg J nHW^'Ui?}.vu*@f #|iW I2SY L keyj>A. >_OhwACN D[u+ڊ+UU$Y=~O"%y Co:;-}5'I :=S]Aw jO89Z[a=F8V8%3|$Љ&s7Z {4`ΏIkI~l'!Lj=^8oՊ M&2T_yn> .|P&hF-tJ)PIFm#'*.;!:h>w-%HHe0R0d >VK8" j5yӂP4b/QUe> dV{l6T2NKa( pHm\zlRj^C6jTdP yJ)u#A\?x?[xu q\Vr>LpcD$dqd^w?UL%k69FLV!b{| L04Biӂ1)8l(Qdv Q|<{_r\/BiJ'*O9` :;fI`i[Auvj-)߷t O-ݵdlqokZ}V~xJ(QQ1QEQWC5"T~wyӹd@S6i9ks(kb|l wqE[XLI*ylbi_'e7NuFP < *b/]pwŧ|vÇdԸ.E,1%zY u_q4LQ5[eI%zaYGJeopvHE(ڽ=I< 1i>8QIP8"L挹 K q4@0Zgg{y(,RT`a/*BpR<'j{{[VFKN `">hcO) o`Fj #c͙Add<4P=?E`IkZ u]XgoP\TK8FSP.SAVSP.CLIENTS]FHOSTCMD.OBJ;1ow Wfe TgPT1[P^!VWXԮZn\ެ[kެZjGETOPTPUU1ATOLYSTRCMPSFPRINTFREXITTUPPdP1 Pr?PgiP1giP1g1Pg1PgiP1mgcP 1pgcP 1Pߦhbߦ:hbߦnhbƝhbd1PgyPtgcPc{gcPOߦhbߦ:hbߦnhbƝhbd&ߦhbߦ:hbߦnhbƝhbd\kjGETOPTPUU1|ЬYRUYR1U1T޼SDcRGbCb >PbSSSCb.S޼TCdR bb R޼SBcRЬSBcATOLPRѬRQRBc?YS޼RCbU PARSE_FILEPUYU LIST_FILEEXITƀPRINTFƜPRINTFծƼPRINTF PRINTFPRINTF PRINTFM'PRINTFRbS+S &S !Pb~EPRINTFRbS S S HPRINTFLKPRINTFRbS*S %S  b~hPRINTFRbS S S kPRINTF 1nPRINTF+RbSS S PRbS S S b,RbSS S PRbS S S bѮ>6 INET_ADDRP߭ GETHOSTBYADDRP`Ѯ>6 GETHOSTBYNAMEPаR^(bn INET_NTOAPծK=PāFSP.SAVSP.CLIENTS]FHOSTCMD.OBJ;1˝ -PƇhRFHOSTCMD host_usageHH load_file h parse_file~ list_filevms_main 霹R H| LOAD_FILE h PARSE_FILE  LIST_FILE VMS_MAIN $CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACECLIENT_INTR_STATE KEY_PERSISTS TARGET_DELAY UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUT_CTYPE_DELAY LOCAL_PORTTIMEOUTTRACEPORT LOCAL_DIRFILENAMEPASSWORDHOSTNAMEHOSTADDRDIROPTARGOPTINDBUFFERHOME$CHAR_STRING_CONSTANTSFPRINTF  VAXC$FREE_OPTEXITѮ R PRRƝPRINTFƠPRINTFnLƣPRINTFRbS*S %S  b~ƻPRINTFRbS S S ƾPRINTFxFSP.SAVSP.CLIENTS]FHOSTCMD.OBJ;1VPRINTF PRINTF8RbS,S 'S "Pb~PRINTFRbS S S  PRINTF  VAXC$FREE_OPTEXIT[P555555a55mE555}55U*[FSP.CLIENTS]FLSCMD.C;3+,./F 4K-0123KPWO56lxCl7 mS҃89GFHJ /*********************************************************************\ * Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. FSP.SAV[FSP.CLIENTS]FLSCMD.C;3K^ * \*********************************************************************/ #include "tweak.h" #include "client_def.h" #include "c_extern.h" #include "bsd_extern.h" int ls_bad PROTO1(int, n) { client_done(); exit(n); } int main PROTO3(int, argc, char **, argv, char **, envp) { unsigned long pos; RDIRENT **dp; env_client(); fls_main(argc,argv,envp); client_done(); exit(0); } *[FSP.CLIENTS]FLSCMD.OBJ;1+,./F 4 -0123KPWO56LDl7@uS҃89GFHJ3FLSCMDV1.031-OCT-1994 12:39VAX C V3.2-044tR FLSCMD ls_badvms_main- U  ENV_CLIENT CLIENT_DONEEXITEXITFLS_MAIN LS_BAD VMS_MAINE$CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACECLIENT_INTR_STATE KEY_PERSISTS TARGET_DELAY FSP.SAV[FSP.CLIENTS]FLSCMD.OBJ;1UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUTuP^ CLIENT_DONEEXIT^ ENV_CLIENTݬ ݬݬFLS_MAIN CLIENT_DONEEXIT*[FSP.CLIENTS]FMKDIR.C;3+,./F 4L-0123KPWO56yCl7~S҃89GFHJ /*********************************************************************\ * Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. YLFSP.SAV[FSP.CLIENTS]FMKDIR.C;3LQ * \*********************************************************************/ #include "tweak.h" #include "client_def.h" #include "c_extern.h" static int make_dir PROTO1(char *, p) { char *op; UBUF *ub; op = util_abs_path(p); ub = client_interact(CC_MAKE_DIR,0L, strlen(op), (unsigned char *)op+1, 0, (unsigned char *)NULLP); if(ub->cmd == CC_ERR) { fprintf(stderr,"Can't create %s: %s\n",p,ub->buf); free(op); return(-1); } printf("%s\t: %s\n",p,ub->buf); free(op); return(0); } int main PROTO3(int, argc, char **, argv, char **, envp) { char **av, *av2[2]; env_client(); while(*++argv) make_dir(*argv); client_done(); exit(0); } *[FSP.CLIENTS]FMKDIR.OBJ;1+,./F 4 -0123KPWO56\Dl7χS҃89GFHJxQFSP.SAV[FSP.CLIENTS]FMKDIR.OBJ;1ܟ3FMKDIRV1.031-OCT-1994 12:39VAX C V3.2-044R FMKDIRmake_dirvms_main M ' ENV_CLIENT UTIL_ABS_PATH CLIENT_DONECLIENT_INTERACTPRINTFFPRINTF VAXC$FREE_OPTSTRLENEXIT VMS_MAIN.$CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACECLIENT_INTR_STATE KEY_PERSISTS TARGET_DELAY UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUT$CHAR_STRING_CONSTANTSPCan't create %s: %s P%s : %s P^Tݬ UTIL_ABS_PATHPS|~S~SSTRLENPI~CLIENT_INTERACTPRb@" ݬdFPRINTFS VAXC$FREE_OPTP PRINTFS VAXC$FREE_OPTP^VX ENV_CLIENTռz VAXC$FREE_OPTWPмUU UTIL_ABS_PATHPT|~T~TSTRLENPI~CLIENT_INTERACTPRb@ UfhFPRINTFTgSP UߦPRINTFTgռ CLIENT_DONEEXITXFSP.SAV[FSP.CLIENTS]FPROCMD.C;3KbD*[FSP.CLIENTS]FPROCMD.C;3+,./F 4K-0123KPWO56bb_len); len1 = BB_READ4(ub->bb_pos); pro1 = ub->buf; pro2 = ub->buf+len; printf("%s\t: ",p); if(len1) { flags = *pro2; printf("(owner: %s)(del: %s)(create: %s)(mkdir: %s)(private: %s)\n", Machine(DIR_OWNER), Y_or_N(DIR_DEL), Y_or_N(DIR_ADD), Y_or_N(DIR_MKDIR), Y_or_N(DIR_PRIV)); } printf("%s", pro1); printf("\n"); return(0); } static int set_pro PROTO2(char *, p, char *, key) { char *op, flags; unsigned len1, len; UBUF *ub; char *pro1, *pro2; op = util_abs_path(p); ub = client_interact(CC_SET_PRO,0L, strlen(op), (unsigned char *)op+1, strlen(key)+1, (unsigned char *)key); len = BB_READ2(ub->bb_len); len1 = BB_READ4(ub->bb_pos); pro1 = ub->buf; pro2 = ub->buf+len; printf("%s\t: ",p); if(len1) { flags = *pro2; printf("(owner: %s)(del: %s)(create: %s)(mkdir: %s)(private: %s)\n", Machine(DIR_OWNER), Y_or_N(DIR_DEL), Y_or_N(DIR_ADD), Y_or_N(DIR_MKDIR), Y_or_N(DIR_PRIV)); } printf("%s", pro1); printf("\n"); return(0); } int main PROTO3(int, argc, char **, argv, char **, envp) { char **av, *av2[2], *key; env_client(); if(argv[1] && (argv[1][0] == '+' || argv[1][0] == '-') && !argv[1][2]) { key = *++argv; while(*++argv) { if(!(av = glob(*argv))) { av = av2; av2[0] = *argv; av2[1] = 0; } while(*av) set_pro(*av++,key); } } else { if(argv[1]) while(*++argv) { if(!(av = glob(*argv))) { av = av2; av2[0] = fvFSP.SAV[FSP.CLIENTS]FPROCMD.C;3K[7*argv; av2[1] = 0; } while(*av) print_pro(*av++); } else print_pro("."); } client_done(); exit(0); } *[FSP.CLIENTS]FPROCMD.OBJ;1+,./F 4  -0123KPWO56<ZDl7S҃89GFHJ4FPROCMDV1.031-OCT-1994 12:39VAX C V3.2-044P%s : P(owner: %s)(del: %s)(create: %s)(mkdir: %s)(private: %s) @PotherFPyouJPNLPYNPNPPYRPNTPYVPNXPYZP%s]P _P%s : eP(owner: %s)(del: %s)(create: %s)(mkdir: %s)(private: %s) PotherPyouPNPYPNPYPNPYPNPYP%sP P.P^Sݬ UTIL_ABS_PATHPQ|~Q~QSTRLENPG~CLIENT_INTERACTPR<~NTOHSPUݢ72  jmtqJ;1  8[A0O an˕"zEBx#,te}W"'+V}yJ׈loX?5FU=0-G=m"L?W+vg&S$c.7@ X%F'~K9euÕ(u(&:Kt|*Txc-<1bdPYbui ÝI n6*i~a"i- RFUIIMK+~1W(c5 ^#P[AWBŝ@^ [W}og^?ne]@o:pH+Qji? A3!,^fy'`#_ f!MU<"1$D56G;9+2{ oյl*/آ7>ѼYu4"x>q;0bbt{/a(tjaz$.Rɉr8yWY5le!0g> 1) while(*++argv) put_file(*argv); else { prompt = isatty(0); while(1) { if(prompt) { fputs("fput: ",stdout); fflush(stdout); } if(!gets(n)) break; if(!*n) continue; put_file(n); } } client_done(); exit(0); } 4ۛFSP.SAV[FSP.CLIENTS]FPUT.OBJ;1*[FSP.CLIENTS]FPUT.OBJ;1+,./F 42 -0123KPWO56Dl7aS҃89GFHJ1FPUTV1.031-OCT-1994 12:39VAX C V3.2-044P%s: not a file PrPCannot read %s "P.$Pchdir*Pfput: P8^TݬSTATP ݬPERRORcmd == CC_ERR) { fprintf(stderr,"Can't remove %s: %s\n",p,ub->buf); free(op); return(-1); } return(0); } int main PROTO3(int, argc, char **, argv, char **, envp) { char **av, *av2[2]; env_client(); while(*++argv) { if(!(av = glob(*argv))) { av = av2; av2[0] = *argv; av2[1] = 0; } while(*av) remove_it(*av++); } client_done(); exit(0); } *[FSP.CLIENTS]FRMCMD.OBJ;1+,./F 4 -0123KPWO56cmd == CC_ERR) { fprintf(stderr,"Can't remove %s: %s\n",p,ub->buf); free(op); return(-1); } }+FSP.SAV[FSP.CLIENTS]FRMDIRCMD.C;3K( return(0); } int main PROTO3(int, argc, char **, argv, char **, envp) { char **av, *av2[2]; env_client(); while(*++argv) { if(!(av = glob(*argv))) { av = av2; av2[0] = *argv; av2[1] = 0; } while(*av) remove_it(*av++); } client_done(); exit(0); } *[FSP.CLIENTS]FRMDIRCMD.OBJ;1+,./F 4 -0123KPWO56ЖKmf룖%s'BCx3)9+/$_tK^apuXRhӚi?2.vC#JHi".Ds6TCɅL\U;C:6%h?U:i  I{^3aq`Dލ]SFRȅHק|ivct^OdX~&t B@9lj'#WR9u"-ލzo8ls[ҷ㜻- ֍Y$hytnV׶hs(dzIོQX#zET?jE{]c(X!"<94eیTE1luYxVZVV=ג2Uhȷÿ˞52߫Wpz q В"wj귲+fKxKPp]5qtz4|g0$Do ߑ]Hdpq) =B4 =i25Y+8݃Lxu#o^͎ASIWYΙ8O3+D=kQ*#`y`/NsI7&Xu2=7}!. .jqpyq|; jmZ~h\:A:vO#f#"apAw\gBMNWG=|Ab:1@۹NX j!htdCHXa~^SCnp2'Z=IQT\V3 Kv@*瑗Ԍ ޻zmCMJFxp9EwFLrNYFj52/h WU#U'|EAw:#8;8;t 5 ZWfR(@r_Y9z1^(N?G&pse^#{ vwI%69ojj- =-VN,K%m/1S'`a8a#j%~kwBjuE=#!a4in$5m92Jgtv19(Sfzm#BoO_V@GEOV_TIMEOUT $CHAR_STRING_CONSTANTSPЬScGLOBPR ޭRcԭbPT݂σbռYЬRբGRռFЬScGLOBPR ޭRcԭbP݂Mbռ Pž3 CLIENT_DONEEXIT FSP.SAV [FSP.CLIENTS]FVER.C;3K /*********************************************************************\ * Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. * \*********************************************************************/ #include "tweak.h" #include "client_def.h" #include "c_extern.h" #include "version.h" #include int main PROTO3(int, argc, char **, argv, char **, envp) { UBUF *ub; unsigned int len, tput = 0, len2; char *v1, *v2; if(argc == 1) { /* no arg supplied, get version string of server */ env_client(); ub = client_interact(CC_VERSION,0L, 0, (unsigned char *)NULLP, 0, (unsigned char *)NULLP); len = BB_READ2(ub->bb_len); len2 = BB_READ4(ub->bb_pos); v1 = ub->buf; v2 = ub->buf+len; printf("FSP version: %s\n",v1); /* we have a new type of server */ if(len2) { if(*v2 & VER_LOG) printf("\tLogging of all server transactions is ENABLED.\n"); else printf("\tLogging of all server transactions is DISABLED.\n"); if(*v2 & VER_READONLY) printf("\tRemote server is run in READONLY mode.\n"); else printf("\tRemote server is run in READ/WRITE mode.\n"); (nFSP.SAV [FSP.CLIENTS]FVER.C;3KU if(*v2 & VER_REVNAME) printf("\tServer REQUIRES connections to reverse name.\n"); else printf("\tServer DOESN'T REQUIRE connections to reverse.\n"); if(*v2 & VER_PRIVMODE) printf("\tRemote server is run in PRIVATE mode.\n"); else printf("\tRemote server is run in PUBLIC mode.\n"); if(*v2 & VER_THRUPUT) { printf("\tRemote server throughput control is ENABLED."); tput |= (((unsigned)*(++v2) << 24) & 0xff000000); tput |= (((unsigned)*(++v2) << 16) & 0x00ff0000); tput |= (((unsigned)*(++v2) << 8) & 0x0000ff00); tput |= ((unsigned)*(++v2) & 0x000000ff); printf(" (max %d bytes/sec)\n", tput); } else printf("\tRemote server throughput control is DISABLED.\n"); } client_done(); } else printf("Local FSP version: %s\n",VERSION_STR); exit(0); } *[FSP.CLIENTS]FVER.OBJ;1+,!./F 4 -0123KPWO56|Dl7T҃89GFHJZFSP.SAV![FSP.CLIENTS]FVER.OBJ;11FVERV1.031-OCT-1994 12:39VAX C V3.2-044PFSP version: %s P Logging of all server transactions is ENABLED. BP Logging of all server transactions is DISABLED. tP Remote server is run in READONLY mode. P Remote server is run in READ/WRITE mode. P Server REQUIRES connections to reverse name. P Server DOESN'T REQUIRE connections to reverse. (P Remote server is run in PRIVATE mode. PP Remote server is run in PUBLIC mode. wP Remote server throughput control is ENABLED.P (max %d bytes/sec) P Remote server throughput control is DISABLED. PLocal FSP version: %s PVMS Version 2.7.1, May 21st, 1993P^SUѬ15 ENV_CLIENT|~|~CLIENT_INTERACTPR<~NTOHSPWݢNTOHLPV PWPTPcPRINTFRbV1dߣbߣBbdߣtPRINTF PÝPRINTFd PRINTF PRINTFd (PRINTF PPRINTFdewPRINTFTdPxPPʏPPUTdPxPPʏPPUTdPxPPʏPPUTdPʏPPUUåPRINTFPútR FVERvms_maine Q 4 ENV_CLIENT CLIENT_DONECLIENT_INTERACTPRINTFEXITNTOHLNTOHS VMS_MAINe$CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACECLIENT_INTR_STATE KEY_PERSISTS TARGET_DELAY{UFSP.SAV![FSP.CLIENTS]FVER.OBJ;11f UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUT#$CHAR_STRING_CONSTANTS?PRINTF CLIENT_DONEPRINTFEXIT*[FSP.CLIENTS]MAKEFILE.;1+,#./F 4Ln-0123KPWO561@Cl7T҃89GFHJCLIENTS = fcatcmd fcdcmd fducmd ffindcmd fgetcmd fgrabcmd fhostcmd flscmd \ fmkdir fprocmd fput frmcmd frmdircmd fver OBJS = fcatcmd.o fcdcmd.o ffindcmd.o fgetcmd.o fgrabcmd.o fhostcmd.o \ flscmd.o fmkdir.o fprocmd.o fput.o frmcmd.o frmdircmd.o fver.o fducmd.o MERGE_OBJS = fcatcmd_m.o fcdcmd_m.o fducmd_m.o ffindcmd_m.o fgetcmd_m.o \ fgrabcmd_m.o fhostcmd_m.o flscmd_m.o fmkdir_m.o fprocmd_m.o \ fput_m.o frmcmd_m.o frmdircmd_m.o fver_m.o merge.o LDEPEND = ../common/libcommon.a ../client/lib)FSP.SAV#[FSP.CLIENTS]MAKEFILE.;1LAclient.a ../bsd_src/libbsdfsp.a LIBS = -L../common -L../bsd_src -L../client -lclient -lcommon -lbsdfsp # We split compile and link in order not to disturb parallel make all: compile linkclients compile:${PARALLEL_MAKE} ${OBJS} linkclients:${PARALLEL_MAKE} ${CLIENTS} install: all for A in ${CLIENTS}; do ${INSTALL} $$A ${BIN}; done de-install: for A in ${CLIENTS}; do ${RM} -f ${BIN}/$$A; done ${RM} -f ${BIN}/fspmerge fspmerge:${PARALLEL_MAKE} ${MERGE_OBJS} ${LDEPEND} ${CC} -o fspmerge ${MERGE_OBJS} ${LIBS} ${EX_LIBS} install_merge: fspmerge ${INSTALL} fspmerge ${BIN} for A in ${CLIENTS}; \ do ${RM} -f ${BIN}/$$A; ${LN} ${BIN}/fspmerge ${BIN}/$$A; \ done clean: ${RM} -f *.o ${CLIENTS} ${RM} -f fspmerge fcatcmd: fcatcmd.o ${LDEPEND} ${CC} -o fcatcmd fcatcmd.o ${LIBS} ${EX_LIBS} fcdcmd: fcdcmd.o ${LDEPEND} ${CC} -o fcdcmd fcdcmd.o ${LIBS} ${EX_LIBS} fducmd: fducmd.o ${LDEPEND} ${CC} -o fducmd fducmd.o ${LIBS} ${EX_LIBS} ffindcmd: ffindcmd.o ${LDEPEND} ${CC} -o ffindcmd ffindcmd.o ${LIBS} ${EX_LIBS} fgetcmd: fgetcmd.o ${LDEPEND} ${CC} -o fgetcmd fgetcmd.o ${LIBS} ${EX_LIBS} fgrabcmd: fgrabcmd.o ${LDEPEND} ${CC} -o fgrabcmd fgrabcmd.o ${LIBS} ${EX_LIBS} fhostcmd: fhostcmd.o ${LDEPEND} ${CC} -o fhostcmd fhostcmd.o ${LIBS} ${EX_LIBS} flscmd: flscmd.o ${LDEPEND} ${CC} -o flscmd flscmd.o ${LIBS} ${EX_LIBS} fmkdir: fmkdir.o ${LDEPEND} ${CC} -o fmkdir fmkdir.o ${LIBS} ${EX_LIBS} fprocmd: fprocmd.o ${LDEPEND} ${CC} -o fprocmd fprocmd.o ${LIBS} ${EX_LIBS} fput: fput.o ${LDEPEND} ${CC} -o fpu]FSP.SAV#[FSP.CLIENTS]MAKEFILE.;14L t fput.o ${LIBS} ${EX_LIBS} frmcmd: frmcmd.o ${LDEPEND} ${CC} -o frmcmd frmcmd.o ${LIBS} ${EX_LIBS} frmdircmd: frmdircmd.o ${LDEPEND} ${CC} -o frmdircmd frmdircmd.o ${LIBS} ${EX_LIBS} fver: fver.o ${LDEPEND} ${CC} -o fver fver.o ${LIBS} ${EX_LIBS} fcatcmd.o: fcatcmd.c ../include/client_def.h ../include/common_def.h fcatcmd.o: ../include/tweak.h ../include/proto.h fcdcmd.o: fcdcmd.c ../include/client_def.h ../include/common_def.h fcdcmd.o: ../include/tweak.h ../include/proto.h fducmd.o: fducmd.c ../include/client_def.h ../include/common_def.h fducmd.o: ../include/tweak.h ../include/proto.h ffindcmd.o: ffindcmd.c ../include/client_def.h ../include/common_def.h ffindcmd.o: ../include/tweak.h ../include/proto.h fgetcmd.o: fgetcmd.c ../include/client_def.h ../include/common_def.h fgetcmd.o: ../include/tweak.h ../include/proto.h fgrabcmd.o: fgrabcmd.c ../include/client_def.h ../include/common_def.h fgrabcmd.o: ../include/tweak.h ../include/proto.h fhostcmd.o: fhostcmd.c ../include/client_def.h ../include/common_def.h fhostcmd.o: ../include/tweak.h ../include/proto.h flscmd.o: flscmd.c ../include/client_def.h ../include/common_def.h flscmd.o: ../include/tweak.h ../include/proto.h fmkdir.o: fmkdir.c ../include/client_def.h ../include/common_def.h fmkdir.o: ../include/tweak.h ../include/proto.h fprocmd.o: fprocmd.c ../include/client_def.h ../include/common_def.h fprocmd.o: ../include/tweak.h ../include/proto.h fput.o: fput.c ../include/client_def.h ../include/common_def.h fput.o: ../include/tweak.h ../include/proto.-bLFSP.SAV#[FSP.CLIENTS]MAKEFILE.;14LJh frmcmd.o: frmcmd.c ../include/client_def.h ../include/common_def.h frmcmd.o: ../include/tweak.h ../include/proto.h frmdircmd.o: frmdircmd.c ../include/client_def.h ../include/common_def.h frmdircmd.o: ../include/tweak.h ../include/proto.h fver.o: fver.c ../include/client_def.h ../include/common_def.h fver.o: ../include/tweak.h ../include/proto.h fcatcmd_m.o: fcatcmd.c ../include/client_def.h ../include/common_def.h fcatcmd_m.o: ../include/tweak.h ../include/proto.h @echo '#include "fcatcmd.c"' > fcatcmd_m.c ${CC} ${CFLAGS} -Dmain=fcatcmd_main -c fcatcmd_m.c @${RM} -f fcatcmd_m.c fcdcmd_m.o: fcdcmd.c ../include/client_def.h ../include/common_def.h fcdcmd_m.o: ../include/tweak.h ../include/proto.h @echo '#include "fcdcmd.c"' > fcdcmd_m.c ${CC} ${CFLAGS} -Dmain=fcdcmd_main -c fcdcmd_m.c @${RM} -f fcdcmd_m.c fducmd_m.o: fducmd.c ../include/client_def.h ../include/common_def.h fducmd_m.o: ../include/tweak.h ../include/proto.h @echo '#include "fducmd.c"' > fducmd_m.c ${CC} ${CFLAGS} -Dmain=fducmd_main -c fducmd_m.c @${RM} -f fducmd_m.c ffindcmd_m.o: ffindcmd.c ../include/client_def.h ../include/common_def.h ffindcmd_m.o: ../include/tweak.h ../include/proto.h @echo '#include "ffindcmd.c"' > ffindcmd_m.c ${CC} ${CFLAGS} -Dmain=ffindcmd_main -c ffindcmd_m.c @${RM} -f ffindcmd_m.c fgetcmd_m.o: fgetcmd.c ../include/client_def.h ../include/common_def.h fgetcmd_m.o: ../include/tweak.h ../include/proto.h @echo '#include "fgetcmd.c"' > fgetcmd_m.c ${CC} ${CFLAGS} -Dmain=fgetcmd_main -c fgetcmd_m.c @${RM} -f FyFSP.SAV#[FSP.CLIENTS]MAKEFILE.;14Ly fgetcmd_m.c fgrabcmd_m.o: fgrabcmd.c ../include/client_def.h ../include/common_def.h fgrabcmd_m.o: ../include/tweak.h ../include/proto.h @echo '#include "fgrabcmd.c"' > fgrabcmd_m.c ${CC} ${CFLAGS} -Dmain=fgrabcmd_main -c fgrabcmd_m.c @${RM} -f fgrabcmd_m.c fhostcmd_m.o: fhostcmd.c ../include/client_def.h ../include/common_def.h fhostcmd_m.o: ../include/tweak.h ../include/proto.h @echo '#include "fhostcmd.c"' > fhostcmd_m.c ${CC} ${CFLAGS} -Dmain=fhostcmd_main -c fhostcmd_m.c @${RM} -f fhostcmd_m.c flscmd_m.o: flscmd.c ../include/client_def.h ../include/common_def.h flscmd_m.o: ../include/tweak.h ../include/proto.h @echo '#include "flscmd.c"' > flscmd_m.c ${CC} ${CFLAGS} -Dmain=flscmd_main -c flscmd_m.c @${RM} -f flscmd_m.c fmkdir_m.o: fmkdir.c ../include/client_def.h ../include/common_def.h fmkdir_m.o: ../include/tweak.h ../include/proto.h @echo '#include "fmkdir.c"' > fmkdir_m.c ${CC} ${CFLAGS} -Dmain=fmkdir_main -c fmkdir_m.c @${RM} -f fmkdir_m.c fprocmd_m.o: fprocmd.c ../include/client_def.h ../include/common_def.h fprocmd_m.o: ../include/tweak.h ../include/proto.h @echo '#include "fprocmd.c"' > fprocmd_m.c ${CC} ${CFLAGS} -Dmain=fprocmd_main -c fprocmd_m.c @${RM} -f fprocmd_m.c fput_m.o: fput.c ../include/client_def.h ../include/common_def.h fput_m.o: ../include/tweak.h ../include/proto.h @echo '#include "fput.c"' > fput_m.c ${CC} ${CFLAGS} -Dmain=fput_main -c fput_m.c @${RM} -f fput_m.c frmcmd_m.o: frmcmd.c ../include/client_def.h ../include/common_def.h frmcmd_m.o: ../include/tweak.h ..FSP.SAV#[FSP.CLIENTS]MAKEFILE.;14Ls/include/proto.h @echo '#include "frmcmd.c"' > frmcmd_m.c ${CC} ${CFLAGS} -Dmain=frmcmd_main -c frmcmd_m.c @${RM} -f frmcmd_m.c frmdircmd_m.o: frmdircmd.c ../include/client_def.h ../include/common_def.h frmdircmd_m.o: ../include/tweak.h ../include/proto.h @echo '#include "frmdircmd.c"' > frmdircmd_m.c ${CC} ${CFLAGS} -Dmain=frmdircmd_main -c frmdircmd_m.c @${RM} -f frmdircmd_m.c fver_m.o: fver.c ../include/client_def.h ../include/common_def.h fver_m.o: ../include/tweak.h ../include/proto.h @echo '#include "fver.c"' > fver_m.c ${CC} ${CFLAGS} -Dmain=fver_main -c fver_m.c @${RM} -f fver_m.c merge.o: merge.c *[FSP.CLIENTS]MERGE.C;5+,$. /F 4Z P-0123KPWO 56㏂Cl7&T҃89GFHJ# 8RFSP.SAV$[FSP.CLIENTS]MERGE.C;5C;4Z  /*********************************************************************\ * Copyright (c) 1992 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. * \*********************************************************************/ #include "tweak.h" #include void merge_usage() { fprintf(stderr,"Usage: fmerge cmd [...]\n\n"); fprintf(stderr,"`cmd' determines action to take:\n"); fprintf(stderr,"Setup:\n"); fprintf(stderr," fhostcmd [-d delay] [-p local port] [-l local dir] [-o timeout]\n"); fprintf(stderr," [-t trace] [-w password] [-f filename] [-h number|name]\n"); fprintf(stderr," [host port [directory] | abbreviation] - set resources\n "); fprintf(stderr," fhostcmd [-f file] - set from resources file\n"); fprintf(stderr,"\nStatus:\n"); fprintf(stderr," fver [string] - display remote [or local] version\n"); fprintf(stderr," flscmd [-lsflags] [file [...]] - list remote files\n"); fprintf(stderr," fducmd [-s|a|r] file - Display file size, in kbytes\n"); fprintf(stderr,"\nFile/Directory Options:\n"); fprintf(stderr," fmkdir dir - create remotug~x;4 #hBPH. ^/&}t|oqZ#]iIl$gA Nv ;@kRk^.j0T _lZ9iF?+6H0a2=Y#ls`R ~^|v1} F7h :k{Ft{$Rd,((&i}zNU*FCdcSXh{cWBV/G M`.| T$_X%J2]v#<E~o-*1p*A;гa2&; #Y~'5+˄btmU mcgQXK2JGS{irkb*+ 7w}m("rW^%pQkq2Xsx>?)5P9^.0m'c5Kw,wfLK.Oz~J*x(l;"Hz/][`lB'6L9S]|$r*B16@n(1Z2?|&1`L KS 3 jg0cl:%a:H~4vDZ#:7qNg ehjY3x<).'_\>_J~x C/`.G]WPRl"2a2dn!Ao*/-O)0/n^DY'PT! OxT6@Kc];"{q 2m9 x"&:6z"xQhmHrj#$"F2YT~NRkQ };x& hoMhD ]n& pImxrgf7r`b >}1D('T[}B@?jn}==tw I$&p yjzTO!qA- +"n|PDi?hF23 I65U)A9+o~r2E=swKc?:~H?*^pzSAVK,` K)>OXVs=^N CHh3wc*p|EU.xk~1R#UCUDd442Py3 2l KDfu;_o~S}C"Pl/Y9b.=SBe $ |L8s,qeFϮ럩܋ ɟԙ'uCZ[a?;LW:JzP\*G{ 'bPX(5R}j~ Y8 }HCaY<_Hk+D[7 SM6k^S "5J1IG] 3@ABMJ9M3:R}`1l7V@hKUDaoWG{l >vwgjas]k{8LYzFSP.SAV$[FSP.CLIENTS]MERGE.C;5OBJ;2Z e directory\n"); fprintf(stderr," fcdcmd dir - change working directory to dir\n"); fprintf(stderr," fprocmd [+c|-c|+p|-p|+d|-d|+m|-m] dir - set/show protections\n"); fprintf(stderr," frmcmd [file [...]] - remove remote files\n"); fprintf(stderr," frmdircmd [dir [...]] - remove remote directories\n"); fprintf(stderr," ffindcmd path [...] expression - Find files matching expression\n"); fprintf(stderr,"\nFile Transfer:\n"); fprintf(stderr," fput [file [...]] - send file to remote\n"); fprintf(stderr," fcatcmd [file [...]] - copy each file to standard output\n"); fprintf(stderr," fgetcmd [-f|u|t|n|a|r] [file [...]] - download files\n"); fprintf(stderr," fgrabcmd [-f|u|t|n|a] [file [...]] - download files then delete\n"); } int main PROTO3(int, argc, char **, argv, char **, envp) { char *p, *q; int i; #ifdef VMS q=argv[1]; /* fsp command */ argv++; argc--; /* strip first argument (=FMERGE) */ #else for(p = q = argv[0]; *p; p++) if(*p == '/') q = p+1; #endif if ( q == NULL) { fprintf(stderr,"No FSP command as argument\n"); merge_usage(); exit(1); } if(!strcmp(q,"fcatcmd")) fcatcmd_main(argc,argv,envp); else if(!strcmp(q,"fcdcmd")) fcdcmd_main(argc,argv,envp); else if(!strcmp(q,"fgetcmd")) fgetcmd_main(argc,argv,envp); else if(!strcmp(q,"fgrabcmd")) fgrabcmd_main(argc,argv,envp); else if(!strcmp(q,"flscmd")) flscmd_main(argc,argv,envp); else if(!strcmp(q,"fmkdir")) fmkdir_main(argc,argv,envp); else if(!sFSP.SAV$[FSP.CLIENTS]MERGE.C;5OBJ;2Z Rtrcmp(q,"fprocmd")) fprocmd_main(argc,argv,envp); else if(!strcmp(q,"fput")) fput_main(argc,argv,envp); else if(!strcmp(q,"frmcmd")) frmcmd_main(argc,argv,envp); else if(!strcmp(q,"frmdircmd")) frmdircmd_main(argc,argv,envp); else if(!strcmp(q,"fver")) fver_main(argc,argv,envp); else if(!strcmp(q,"fducmd")) fducmd_main(argc,argv,envp); else if(!strcmp(q,"fhostcmd")) fhostcmd_main(argc,argv,envp); else if(!strcmp(q,"ffindcmd")) ffindcmd_main(argc,argv,envp); else { fprintf(stderr,"Unknown FSP client command: %s\n",q); merge_usage(); exit(1); } exit(0); } *[FSP.CLIENTS]MERGE.C_ORIG;1+,%./F 4K:-0123KPWO56Cl7/T҃89GFHJ[oNFSP.SAV%SP.CLIENTS]MERGE.C_ORIG;1K /*********************************************************************\ * Copyright (c) 1992 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. * \*********************************************************************/ #include "tweak.h" #include int main PROTO3(int, argc, char **, argv, char **, envp) { char *p, *q; int i; #ifdef VMS q=argv[1]; /* fsp command */ argv++; argc--; /* strip first argument (=FMERGE) */ #else for(p = q = argv[0]; *p; p++) if(*p == '/') q = p+1; #endif if(!strcmp(q,"fcatcmd")) fcatcmd_main(argc,argv,envp); else if(!strcmp(q,"fcdcmd")) fcdcmd_main(argc,argv,envp); else if(!strcmp(q,"fgetcmd")) fgetcmd_main(argc,argv,envp); else if(!strcmp(q,"fgrabcmd")) fgrabcmd_main(argc,argv,envp); else if(!strcmp(q,"flscmd")) flscmd_main(argc,argv,envp); else if(!strcmp(q,"fmkdir")) fmkdir_main(argc,argv,envp); else if(!strcmp(q,"fprocmd")) fprocmd_main(argc,argv,envp); else if(!strcmp(q,"fput")) fput_main(argc,argv,envp); else if(!strcmp(q,"frmcmd")) frmcmd_main(argc,argv,envp); else if(!strcmp(q,"frmdircmd")) frmdircmd_main(argc,argv,envp); else if(!strcmp(q,"fver")FSP.SAV%SP.CLIENTS]MERGE.C_ORIG;1K;C) fver_main(argc,argv,envp); else if(!strcmp(q,"fducmd")) fducmd_main(argc,argv,envp); else if(!strcmp(q,"fhostcmd")) fhostcmd_main(argc,argv,envp); else if(!strcmp(q,"ffindcmd")) ffindcmd_main(argc,argv,envp); else { fprintf(stderr,"Unknown FSP client command: %s\n",q); exit(1); } exit(0); } *[FSP]COMMON.DIR;1+,&./F 4- 0123 KPWO56@p7`89GFHJI MAKEFILE.'RANDOM.C( RANDOM.OBJ)STRDUP.C* STRDUP.OBJ+TWEAK.H, TWEAK.H_ORIG-UDP_IO.C. UDP_IO.C_ORIG/ UDP_IO.OBJ0*[FSP.COMMON]MAKEFILE.;1+,'./F 48-&0123KPWO56YۄCl7~CT҃89GFHJ}FSP.SAV'&[FSP.COMMON]MAKEFILE.;18COMOBJS = random.o strdup.o udp_io.o all: libcommon.a libcommon.a:${PARALLEL_MAKE} ${COMOBJS} ${RM} -f libcommon.a ${AR} ${ARFLAGS} libcommon.a ${COMOBJS} ${RANLIB} libcommon.a clean: ${RM} -f *.o *.a random.o: random.c ../include/proto.h ../include/tweak.h strdup.o: strdup.c ../include/proto.h ../include/tweak.h udp_io.o: udp_io.c ../include/proto.h ../include/tweak.h udp_io.o: ../include/common_def.h *[FSP.COMMON]RANDOM.C;2+,(./F 4Oh-&0123KPWO56<&Cl7_wT҃89GFHJ/* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that: (1) source distributions retain this entire copyright * notice and comment, and (2) distributions including binaries display * the following acknowledgement: ``This product includes software * developed by the University of California, Berkeley and its contributors'' * in the documentation or other materials provided with the d=SFSP.SAV(&[FSP.COMMON]RANDOM.C;2J;2Oistribution * and in all advertising materials mentioning features or use of this * software. Neither the name of the University nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)random.c 5.7 (Berkeley) 6/1/90"; #endif /* LIBC_SCCS and not lint */ #include "tweak.h" #include #ifdef NEED_RANDOM /* * random.c: * An improved random number generation package. In addition to the standard * rand()/srand() like interface, this package also has a special state info * interface. The initstate() routine is called with a seed, an array of * bytes, and a count of how many bytes are being passed in; this array is then * initialized to contain information for random number generation with that * much state information. Good sizes for the amount of state information are * 32, 64, 128, and 256 bytes. The state can be switched by calling the * setstate() routine with the same array as was initiallized with initstate(). * By default, the package runs with 128 bytes of state information and * generates far better random numbers than a linear congruential generator. * If the amount of state information is less than 32 bytes, a sFSP.SAV(&[FSP.COMMON]RANDOM.C;2J;2ORimple linear * congruential R.N.G. is used. * Internally, the state information is treated as an array of longs; the * zeroeth element of the array is the type of R.N.G. being used (small * integer); the remainder of the array is the state information for the * R.N.G. Thus, 32 bytes of state information will give 7 longs worth of * state information, which will allow a degree seven polynomial. (Note: the * zeroeth word of state information also has some other information stored * in it -- see setstate() for details). * The random number generation technique is a linear feedback shift register * approach, employing trinomials (since there are fewer terms to sum up that * way). In this approach, the least significant bit of all the numbers in * the state table will act as a linear feedback shift register, and will have * period 2^deg - 1 (where deg is the degree of the polynomial being used, * assuming that the polynomial is irreducible and primitive). The higher * order bits will have longer periods, since their values are also influenced * by pseudo-random carries out of the lower bits. The total period of the * generator is approximately deg*(2**deg - 1); thus doubling the amount of * state information has a vast influence on the period of the generator. * Note: the deg*(2**deg - 1) is an approximation only good for large deg, * when the period of the shift register is the dominant factor. With deg * equal to seven, the period is actually much longer than the 7*(2**7 - 1) * predictRQFSP.SAV(&[FSP.COMMON]RANDOM.C;2O(ed by this formula. */ /* * For each of the currently supported random number generators, we have a * break value on the amount of state information (you need at least this * many bytes of state info to support this random number generator), a degree * for the polynomial (actually a trinomial) that the R.N.G. is based on, and * the separation between the two lower order coefficients of the trinomial. */ #define TYPE_0 0 /* linear congruential */ #define BREAK_0 8 #define DEG_0 0 #define SEP_0 0 #define TYPE_1 1 /* x**7 + x**3 + 1 */ #define BREAK_1 32 #define DEG_1 7 #define SEP_1 3 #define TYPE_2 2 /* x**15 + x + 1 */ #define BREAK_2 64 #define DEG_2 15 #define SEP_2 1 #define TYPE_3 3 /* x**31 + x**3 + 1 */ #define BREAK_3 128 #define DEG_3 31 #define SEP_3 3 #define TYPE_4 4 /* x**63 + x + 1 */ #define BREAK_4 256 #define DEG_4 63 #define SEP_4 1 /* * Array versions of the above information to make code run faster -- relies * on fact that TYPE_i == i. */ #define MAX_TYPES 5 /* max number of types above */ static int degrees[MAX_TYPES] = {DEG_0, DEG_1, DEG_2, DEG_3, DEG_4}; static int seps[MAX_TYPES] = {SEP_0, SEP_1, SEP_2, SEP_3, SEP_4}; /* * Initially, everything is set up as if from : * initstate( 1, &randtbl, 128 ); * Note that this initialization takes advantage of the fact that srandom() * advances the front and rear pointers 10*rand_deg times, and hence the * rear pointer which starts at 0 will also end up at zero; thus the zeroeth * element of the state informationZQFSP.SAV(&[FSP.COMMON]RANDOM.C;2Ou , which contains info about the current * position of the rear pointer is just * MAX_TYPES*(rptr - state) + TYPE_3 == TYPE_3. */ static long randtbl[DEG_3+1] = {TYPE_3, 0x9a319039, 0x32d9c024, 0x9b663182, 0x5da1f342, 0xde3b81e0, 0xdf0a6fb5, 0xf103bc02, 0x48f340fb, 0x7449e56b, 0xbeb1dbb0, 0xab5c5918, 0x946554fd, 0x8c2e680f, 0xeb3d799f, 0xb11ee0b7, 0x2d436b86, 0xda672e2a, 0x1588ca88, 0xe369735d, 0x904f35f7, 0xd7158fd6, 0x6fa6f051, 0x616e6b96, 0xac94efdc, 0x36413f93, 0xc622c298, 0xf5a42ab8, 0x8a88d77b, 0xf5ad9d0e, 0x8999220b, 0x27fb47b9 }; /* * fptr and rptr are two pointers into the state info, a front and a rear * pointer. These two pointers are always rand_sep places aparts, as they * cycle cyclically through the state information. (Yes, this does mean we * could get away with just one pointer, but the code for random() is more * efficient this way). The pointers are left positioned as they would be * from the call initstate( 1, randtbl, 128 ) (The position of the rear * pointer, rptr, is really 0 (as explained above in the initialization of * randtbl) because the state table pointer is set to point to randtbl[1] * (as explained below). */ static long *fptr = &randtbl[SEP_3+1]; static long *rptr = &randtbl[1]; /* * The following things are the pointer to the state information table, * the type of the current generator, the degree of the current polynomial * being used, and the separation between the two poi3/OFSP.SAV(&[FSP.COMMON]RANDOM.C;2Onters. * Note that for efficiency of random(), we remember the first location of * the state information, not the zeroeth. Hence it is valid to access * state[-1], which is used to store the type of the R.N.G. * Also, we remember the last location, since this is more efficient than * indexing every time to find the address of the last element to see if * the front and rear pointers have wrapped. */ static long *state = &randtbl[ 1 ]; static int rand_type = TYPE_3; static int rand_deg = DEG_3; static int rand_sep = SEP_3; static long *end_ptr = &randtbl[ DEG_3 + 1 ]; /* * srandom: * Initialize the random number generator based on the given seed. If the * type is the trivial no-state-information type, just remember the seed. * Otherwise, initializes state[] based on the given "seed" via a linear * congruential generator. Then, the pointers are set to known locations * that are exactly rand_sep places apart. Lastly, it cycles the state * information a given number of times to get rid of any initial dependencies * introduced by the L.C.R.N.G. * Note that the initialization of randtbl[] for default usage relies on * values produced by this routine. */ void srandom PROTO1(unsigned int, x) { register int i, j; long random(); if(rand_type == TYPE_0) state[0] = x; else { j = 1; state[0] = x; for(i = 1; i < rand_deg; i++) { state[i] = 1103515245*state[i - 1] + 12345; } fptr = &state[rand_sep]; rptr = &state[0]; for(i = 0; i < 10*rand_deg; i++) rando ŧ b 1w- |3:{ep;cA0Ht OH)O |D}9V *g )]o f4G)Y@ $YDX?<K8dLN _QY* Ujlp=0khiE/:(65_zAF;FjS@< 5?H PBn(! (MPbGWF&{]i % IcSO_} O4k7>83>?wC:( `C&4g6Xw`$u$Y=aJHgMXJNODYR W!|D#}%nj]Xb.0_J/ EiBN yVJZET]Tg W0N@o$4KJRn1a/}yElZnhX[\A[q2;Qjm2?\ks/57"S]Z&IHvfWVvC#$U03\_=2(w8F^JMmiO%hF SSR@ +Q M X PA(6bL:7AN^HUtgIntB9A~ sWC ||^ UTG &iw0,'qx!(Q|A_tl jKm7hzjV ]?{UlbY5`'7dap,4 .>#'U4!LP: ypZ:[8&:d7 4byx F[t 74v?7!ZCO |;j 5kG(go^jwWP\+.@Kv Ld3 kv"Ktcu~Zb.^NEJ2s7"TbqGw 4tdYSf?kNGi^EHk-5}AS;nR%svdg[Q|TNywAT 6F"G^@ uI3N iq MQSa\4TrEJAQW 7%dMbzY07-ob& W[ CU&'MMbF|:_'8)cw#\yD;6cLc_ [ G^KYHjM`|{flaFOzuJgx`#26'{N&&D0![p9!]cPhSj*Un,A"o?8|UH^RONk*qbDeD'i^sXVcYW[lM@;CM!6tXk{n ZbiY_L)k w* =9,kGm|5"v[kv>eR]y E<4q%r*j7x=~+B DTsax?%?o> \x#%>zi|t8t=2aH7&hy%% ij%XwQxq{*o,3<<%::ge}q`z"$:ma^%1vbzhf1W31hgc=d*.{>kj"j>-{'11p7./z'2Pij <ig'La$o)Ydo ?WqRBl{ #kg!Q?*7n/hul"d2=>o3k~9*Guf)}*:%,JH PFSP.SAV(&[FSP.COMMON]RANDOM.C;2;2OOm(); } } /* * initstate: * Initialize the state information in the given array of n bytes for * future random number generation. Based on the number of bytes we * are given, and the break values for the different R.N.G.'s, we choose * the best (largest) one we can and set things up for it. srandom() is * then called to initialize the state information. * Note that on return from srandom(), we set state[-1] to be the type * multiplexed with the current value of the rear pointer; this is so * successive calls to initstate() won't lose this information and will * be able to restart with setstate(). * Note: the first thing we do is save the current state, if any, just like * setstate() so that it doesn't matter when initstate is called. * Returns a pointer to the old state. */ char * initstate PROTO3(unsigned int, seed, char *, arg_state, int, n ) { register char *ostate = (char *)(&state[-1]); if(rand_type == TYPE_0) state[-1] = rand_type; else state[-1] = MAX_TYPES*(rptr - state) + rand_type; if(n < BREAK_1) { if(n < BREAK_0) { fprintf(stderr,"initstate: not enough state (%d bytes); ignored.\n", n); return 0; } rand_type = TYPE_0; rand_deg = DEG_0; rand_sep = SEP_0; } else { if(n < BREAK_2) { rand_type = TYPE_1; rand_deg = DEG_1; rand_sep = SEP_1; } else { if(n < BREAK_3) { rand_type = TYPE_2; rand_deg = DEG_2; rand_sep = SEP_2; } else { if(n < BREAK_4) { rand_type = TYPE_3; rand_deg = DEG_3; r1~@FSP.SAV(&[FSP.COMMON]RANDOM.C;2;2Oyand_sep = SEP_3; } else { rand_type = TYPE_4; rand_deg = DEG_4; rand_sep = SEP_4; } } } } state = &(((long *)arg_state)[1]); /* first location */ end_ptr = &state[rand_deg]; /* must set end_ptr before srandom */ srandom(seed); if(rand_type == TYPE_0) state[-1] = rand_type; else state[-1] = MAX_TYPES*(rptr - state) + rand_type; return(ostate); } /* * setstate: * Restore the state from the given state array. * Note: it is important that we also remember the locations of the pointers * in the current state information, and restore the locations of the pointers * from the old state information. This is done by multiplexing the pointer * location into the zeroeth word of the state information. * Note that due to the order in which things are done, it is OK to call * setstate() with the same state as the current state. * Returns a pointer to the old state information. */ char *setstate PROTO1(char *, arg_state) { register long *new_state = (long *)arg_state; register int type = new_state[0]%MAX_TYPES; register int rear = new_state[0]/MAX_TYPES; char *ostate = (char *)(&state[-1]); if(rand_type == TYPE_0) state[-1] = rand_type; else state[-1] = MAX_TYPES*(rptr - state) + rand_type; switch(type) { case TYPE_0: case TYPE_1: case TYPE_2: case TYPE_3: case TYPE_4: rand_type = type; rand_deg = degrees[type]; rand_sep = seps[type]; break; default: fprintf(stderr,"setstate: state info has been munged;jLSFSP.SAV(&[FSP.COMMON]RANDOM.C;2Oc  not changed.\n"); } state = &new_state[1]; if(rand_type != TYPE_0) { rptr = &state[rear]; fptr = &state[(rear + rand_sep)%rand_deg]; } end_ptr = &state[rand_deg]; /* set end_ptr too */ return(ostate); } /* * random: * If we are using the trivial TYPE_0 R.N.G., just do the old linear * congruential bit. Otherwise, we do our fancy trinomial stuff, which is the * same in all ther other cases due to all the global variables that have been * set up. The basic operation is to add the number at the rear pointer into * the one at the front pointer. Then both pointers are advanced to the next * location cyclically in the table. The value returned is the sum generated, * reduced to 31 bits by throwing away the "least random" low bit. * Note: the code takes advantage of the fact that both the front and * rear pointers can't wrap on the same call by not testing the rear * pointer if the front one has wrapped. * Returns a 31-bit random number. */ long random PROTO0((void)) { long i; if(rand_type == TYPE_0) { i = state[0] = (state[0]*1103515245 + 12345)&0x7fffffff; } else { *fptr += *rptr; i = (*fptr >> 1)&0x7fffffff; /* chucking least random bit */ if(++fptr >= end_ptr) { fptr = state; ++rptr; } else { if(++rptr >= end_ptr) rptr = state; } } return(i); } #endif /* NEED_RANDOM */ 5FSP.SAV)&[FSP.COMMON]RANDOM.OBJ;1-*[FSP.COMMON]RANDOM.OBJ;1+,)./F 4 -&0123KPWO56,Dl7T҃89GFHJ3RANDOMV1.031-OCT-1994 12:38VAX C V3.2-044P?P91$21fB];޵o @HkIt۱Y\Teh.y=kC-*.gڈʈ]si5O֏Qokna?A6"Ƹ*{׈ "G'8,,Pinitstate: not enough state (%d bytes); ignored. 2Psetstate: state info has been munged; not changed. P^R´ ЬҰPЬҰP¸$°SPQŏmNAAcQ90Q@cPP¸°T¼SCd¨d¬Q ¸SQS1P´"ŏmNAҰP90PˏPҰҰTMҬҨ¨SxcPˏPTS¨¨°¨¬P¬¬°¬Q ¸PQP1{P^R°QT´SSPQ¬PPPSPЬ SS *SSFPRINTFP|´¼fPS@´¸¼IPS´¸¼-PS´¸¼P´?¸¼ЬP°¸P@ҰݬSRANDOM´S °PSP°QQ¬PPPSPTPP^WSЬUzeP{PQPPTeVðPXôQQPPìRR-FSP.SAV)&[FSP.COMMON]RANDOM.OBJ;1*RQRTPP~Pz?PTôDcøDüߧ2 R RANDOMsrandom initstatesetstate random y SRANDOMFPRINTFRANDOM SRANDOM  INITSTATE SETSTATE RANDOMu$CODE$DATASTDINSTDOUTSTDERRf$CHAR_STRING_CONSTANTSFPRINTFðô&ðTFdìüVRzRP{øPQPPRBdèøRBӰXP^\̴"ŏmNAܰP90PˏPܰܰRMܬܨ̨QxaPˏPRQ̨̨̨̰̬P̬̬̰̬RPtP*[FSP.COMMON]STRDUP.C;2+,*./F 4L-&0123KPWO56|Cl7(T҃89GFHJFSP.SAV*&[FSP.COMMON]STRDUP.C;2L?#include "tweak.h" #ifdef NEED_STRDUP #include #include "my-string.h" char *strdup PROTO1(char *, str) { char *nstr; if (str == (char*)0) return str; nstr = (char*)malloc((unsigned int)(strlen(str) + 1)); if (nstr == (char*)0) { fprintf(stderr, "strdup(): not enough memory to duplicate `%s'\n", str); exit(1); } strcpy(nstr, str); return nstr; } #endif *[FSP.COMMON]STRDUP.OBJ;1+,+./F 4  -&0123KPWO56Dl7ɏT҃89GFHJ3STRDUPV1.031-OCT-1994 12:38VAX C V3.2-044WR STRDUP strdupX ISTRLENSTRCPYFPRINTFEXITMALLOC STRDUPX$CODE$DATASTDINSTDOUTSTDERR/$CHAR_STRING_CONSTANTSPstrdup(): not enough memory to duplicate `%s' P^լЬPݬSTRLENPPMALLOCPRݬFPRINTFEXITݬRSTRCPYRPp>FSP.SAV+&[FSP.COMMON]STRDUP.OBJ;1(*[FSP.COMMON]TWEAK.H;2+,,. /F 4O -&0123KPWO 56Cl7T҃89GFHJ>/* include/tweak.h. Generated automatically by configure. */#ifndef _FSP_TWEAK_H_#define _FSP_TWEAK_H_B/* define this if your system allows file names > 14 characters */#define HAVE_LONG_FILE_NAMES 1#/* Define if you have dirent.h. */ #undef DIRENT</* Define if you don't have vprintf but do have _doprnt. */#undef HAVE_DOPRNT#/* Define if you have unistd.h. */#define HAVE_UNISTD_H 1&/* Define this if you have tzfile.h */#define HAVE_TZFILE_H 1//* Define if you havaۮFSP.SAV,&[FSP.COMMON]TWEAK.H;2O 7e the vprintf function. */#define HAVE_VPRINTF 1?/* Define this if your compiler understands ANSI prototyping */#define HAVE_ANSI_PROTO 1M/* Define if you have the ANSI C header files. (ansi strings, ctype, etc.) */#define STDC_HEADERS 16/* Define this if you are running on an AIX system. */#undef _ALL_SOURCE+/* Define this if you have posix compliance#undef _POSIX_SOURCE=/* Define if you don't have dirent.h, but have sys/dir.h. */#define SYSDIR 1>/* Define if you don't have dirent.h, but have sys/ndir.h. */#undef SYSNDIRC/* Define if the closedir function returns void instead of int. */#define VOID_CLOSEDIR 17/* Define to `int' if doesn't define. */ #undef uid_t #undef gid_t#define pid_t int#define mode_t int #undef size_t#define nlink_t intF/* Define HAVE_D_INO if you have d_ino in dirent (or direct) struct */2/* see /usr/include/dir.h or ndir.h or dirent.h */#define HAVE_D_INO 1L/* Define HAVE_D_FILENO if you have d_fileno in dirent (or direct) struct */2/* see /usr/include/dir.h or ndir.h or dirent.h */#undef HAVE_D_FILENO4/* Define to empty if the keyword does not work. */ #undef const;/* Define the following if your site has a funky bsearch */#define bsearch ansi_bsearchA/* define the following if your site doesn't define 'strdup()' */#define NEED_STRDUPA/* define the following if your site doesn't define 'random()' */#define NEED_RANDOM@/* define the following if your site doesn't defin=?FSP.SAV,&[FSP.COMMON]TWEAK.H;2O e 'bcopy()' */#undef NEED_BCOPY3/* Define the following if your site has lockf() */#undef HAVE_LOCKF8/* Define the following if you site has shared memory */#undef HAVE_SHMEM5/* Define the following if your system has flock() */#define HAVE_FLOCK 1:/* define this if WEXITSTATUS is defined on your system */#undef HAVE_WEXITSTATUS6/* define this if S_ISREG is defined on your system */#undef HAVE_S_ISREG6/* define this if S_ISDIR is defined on your system */#undef HAVE_S_ISDIR:/* define this if you have 'union wait' in */#ifndef __hpux#define HAVE_UNION_WAIT 1#endif(/* define this if you have SECSPERDAY */#define HAVE_SECSPERDAY 1*/* define this if you have DAYSPERNYEAR */#define HAVE_DAYSPERNYEAR 1(/* define this if your have strings.h *//* #define HAVE_STRINGS_H 1*/'/* define this if your have string.h */#define HAVE_STRING_H 1&/* define this if you have memory.h */#define HAVE_MEMORY_H 1O/* define this if your string.h has bogus type declarations for a few things */#undef STRING_H_BOGUSK/* These two will be automatically set by the configure script if needed */#undef USE_SECSPERDAY#undef USE_DAYSPERNYEARC/* defined if these data types have the indicated sizes in bytes */#define SIZE_SRT_2 1#define SIZE_LNG_4 1#undef SIZE_INT_2#define SIZE_INT_4 1#ifndef HAVE_WEXITSTATUS*#define WEXITSTATUS(x) ((x).w_T.w_Retcode)#endif#ifndef HAVE_S_ISREG(#define S_ISREG(mode) ((mode) & S_IFREG) sFSP.SAV,&[FSP.COMMON]TWEAK.H;2O #endif#ifndef HAVE_S_ISREG(#define S_ISDIR(mode) ((mode) & S_IFDIR)#endif#if defined(DIRENT)#define HAVE_STRUCT_DIRENT#else#undef HAVE_STRUCT_DIRENT#endif#ifndef HAVE_SECSPERDAY!#define SECSPERDAY USE_SECSPERDAY#endif#ifndef HAVE_DAYSPERNYEAR%#define DAYSPERNYEAR USE_DAYSPERNYEAR#endif2#if defined(HAVE_D_INO) && !defined(HAVE_D_FILENO)#define d_fileno d_ino#else2#if !defined(HAVE_D_INO) && defined(HAVE_D_FILENO)#define d_ino d_fileno#endif#endifM/****************************************************************************F* Macros to read and write multi-byte fields from the message header.M****************************************************************************/#if defined(SIZE_SRT_2)"#define WORD_TYPE_2 unsigned short#else#if defined(SIZE_INT_2)#define WORD_TYPE_2 unsigned#endif#endif#if defined(SIZE_LNG_4)!#define WORD_TYPE_4 unsigned long#else#if defined(SIZE_INT_4)#define WORD_TYPE_4 unsigned#endif#endif#ifdef WORD_TYPE_4(/* there is an integer type of size 4 */.#define BB_READ4(V) ntohl(*(WORD_TYPE_4 *)(V))5#define BB_WRITE4(V,A) *(WORD_TYPE_4 *)(V) = htonl(A)#else(/* there is no integer type of size 4 */6#define BB_READ4(V) ((((V)[0] << 24) & 0xff000000) + \( (((V)[1] << 16) & 0x00ff0000) + \( (((V)[2] << 8) & 0x0000ff00) + \% (((V)[3] ) & 0x000000ff))6#define BB_WRITE4(V,A) ((V)[0] = ((A) >> 24) & 0xff, \! (V)[1] = ((A) >> 16) & 0xff, \! (V)[2] = ((8ɋ  cftpJ;1M%ؔ$YgeCxjljPAC;?Ta|{@%(a*~E`l VRg}gF%|BrEhHFxZO\x_Zp;N, Re=*@@dv1gԅQ@ ҠwIؒՆrj~p#I5ѣL륦Pc}К/h=Xݸʡ)FODV_Fmh;>#M; 4_w<_Paj&xlK'TQw'9&&Dzl/WURIU3s-״UiQ r2bw4R#͆U $0Sx|\܊u1*G:}ٝ \dZk!bJbCO訷X4:kgdD5 /sE b),q4hj'U |  \]c+kb79G*-g'$$YmL_5U"6k՛׹;+I؃ f?sNxv{;(z(%^"WIzc,[Հ2c+ew@2<[ߜ&Ir(gx8y6K^JaSDYSO*oK}+Q#3<QoO&SE*'w!Ivv.)W?0iZ> +S!!}E(yW dy7^^p $C .&%4oR_G}\(mYF3Oun.,5?+); q E m3)y{Bn"W*TmlVG2 '>&R0trAwel.(uN I#rr3!8D]x $MYjBXv$z!uS}P"|J_[*=.q\ap8o-r*),gOnk Chb-lyzx azR:,1n v)+?~w"75  L#NPGzfdFB&UFSP.SAV,&[FSP.COMMON]TWEAK.H;2O  A) >> 8) & 0xff, \ (V)[3] = ((A) ) & 0xff)#endif#ifdef WORD_TYPE_2(/* there is an integer type of size 2 */.#define BB_READ2(V) ntohs(*(WORD_TYPE_2 *)(V))5#define BB_WRITE2(V,A) *(WORD_TYPE_2 *)(V) = htons(A)#else(/* there is no integer type of size 2 */2#define BB_READ2(V) ((((V)[0] << 8) & 0xff00) + \! (((V)[1] ) & 0x00ff))6#define BB_WRITE2(V,A) ((V)[0] = ((A) >> 8) & 0xff, \ (V)[1] = ((A) ) & 0xff)#endif#include "proto.h"#endif /* _FSP_TWEAK_H_ */*[FSP.COMMON]TWEAK.H_ORIG;1+,-. /F 4O -&0123KPWO 56|sCl7`T҃89GFHJFSP.SAV-&[FSP.COMMON]TWEAK.H_ORIG;1O OL>/* include/tweak.h. Generated automatically by configure. */#ifndef _FSP_TWEAK_H_#define _FSP_TWEAK_H_B/* define this if your system allows file names > 14 characters */#define HAVE_LONG_FILE_NAMES 1#/* Define if you have dirent.h. */ #undef DIRENT</* Define if you don't have vprintf but do have _doprnt. */#undef HAVE_DOPRNT#/* Define if you have unistd.h. */#define HAVE_UNISTD_H 1&/* Define this if you have tzfile.h */#define HAVE_TZFILE_H 1//* Define if you have the vprintf function. */#define HAVE_VPRINTF 1?/* Define this if your compiler understands ANSI prototyping */#define HAVE_ANSI_PROTO 1M/* Define if you have the ANSI C header files. (ansi strings, ctype, etc.) */#define STDC_HEADERS 16/* Define this if you are running on an AIX system. */#undef _ALL_SOURCE+/* Define this if you have posix compliance#undef _POSIX_SOURCE=/* Define if you don't have dirent.h, but have sys/dir.h. */#define SYSDIR 1>/* Define if you don't have dirent.h, but have sys/ndir.h. */#undef SYSNDIRC/* Define if the closedir function returns void instead of int. */#define VOID_CLOSEDIR 17/* Define to `int' if doesn't define. */ #undef uid_t #undef gid_t#define pid_t int#define mode_t int #undef size_t#define nlink_t intF/* Define HAVE_D_INO if you have d_ino in dirent (or direct) struct */2/* see /usr/include/dir.h or ndir.h or dirent.h */#define HAVE_D_INO 1L/* Define HAVE_D_FILENO if you have d_fiR!xFSP.SAV-&[FSP.COMMON]TWEAK.H_ORIG;1O leno in dirent (or direct) struct */2/* see /usr/include/dir.h or ndir.h or dirent.h */#undef HAVE_D_FILENO4/* Define to empty if the keyword does not work. */ #undef const;/* Define the following if your site has a funky bsearch */#define bsearch ansi_bsearchA/* define the following if your site doesn't define 'strdup()' */#undef NEED_STRDUPA/* define the following if your site doesn't define 'random()' */#undef NEED_RANDOM@/* define the following if your site doesn't define 'bcopy()' */#undef NEED_BCOPY3/* Define the following if your site has lockf() */#undef HAVE_LOCKF8/* Define the following if you site has shared memory */#undef HAVE_SHMEM5/* Define the following if your system has flock() */#define HAVE_FLOCK 1:/* define this if WEXITSTATUS is defined on your system */#undef HAVE_WEXITSTATUS6/* define this if S_ISREG is defined on your system */#undef HAVE_S_ISREG6/* define this if S_ISDIR is defined on your system */#undef HAVE_S_ISDIR:/* define this if you have 'union wait' in */#ifndef __hpux#define HAVE_UNION_WAIT 1#endif(/* define this if you have SECSPERDAY */#define HAVE_SECSPERDAY 1*/* define this if you have DAYSPERNYEAR */#define HAVE_DAYSPERNYEAR 1(/* define this if your have strings.h */#define HAVE_STRINGS_H 1'/* define this if your have string.h */#define HAVE_STRING_H 1&/* define this if you have memory.h */#define HAVE_MEMORY_H 1O/* define this if your string.h has TpzFSP.SAV-&[FSP.COMMON]TWEAK.H_ORIG;1O v?bogus type declarations for a few things */#undef STRING_H_BOGUSK/* These two will be automatically set by the configure script if needed */#undef USE_SECSPERDAY#undef USE_DAYSPERNYEARC/* defined if these data types have the indicated sizes in bytes */#define SIZE_SRT_2 1#define SIZE_LNG_4 1#undef SIZE_INT_2#define SIZE_INT_4 1#ifndef HAVE_WEXITSTATUS*#define WEXITSTATUS(x) ((x).w_T.w_Retcode)#endif#ifndef HAVE_S_ISREG(#define S_ISREG(mode) ((mode) & S_IFREG)#endif#ifndef HAVE_S_ISREG(#define S_ISDIR(mode) ((mode) & S_IFDIR)#endif#if defined(DIRENT)#define HAVE_STRUCT_DIRENT#else#undef HAVE_STRUCT_DIRENT#endif#ifndef HAVE_SECSPERDAY!#define SECSPERDAY USE_SECSPERDAY#endif#ifndef HAVE_DAYSPERNYEAR%#define DAYSPERNYEAR USE_DAYSPERNYEAR#endif2#if defined(HAVE_D_INO) && !defined(HAVE_D_FILENO)#define d_fileno d_ino#else2#if !defined(HAVE_D_INO) && defined(HAVE_D_FILENO)#define d_ino d_fileno#endif#endifM/****************************************************************************F* Macros to read and write multi-byte fields from the message header.M****************************************************************************/#if defined(SIZE_SRT_2)"#define WORD_TYPE_2 unsigned short#else#if defined(SIZE_INT_2)#define WORD_TYPE_2 unsigned#endif#endif#if defined(SIZE_LNG_4)!#define WORD_TYPE_4 unsigned long#else#if defined(SIZE_INT_4)#define WORD_TYPE_4 unsigned#endif#endif#iFSP.SAV-&[FSP.COMMON]TWEAK.H_ORIG;1O 3 fdef WORD_TYPE_4(/* there is an integer type of size 4 */.#define BB_READ4(V) ntohl(*(WORD_TYPE_4 *)(V))5#define BB_WRITE4(V,A) *(WORD_TYPE_4 *)(V) = htonl(A)#else(/* there is no integer type of size 4 */6#define BB_READ4(V) ((((V)[0] << 24) & 0xff000000) + \( (((V)[1] << 16) & 0x00ff0000) + \( (((V)[2] << 8) & 0x0000ff00) + \% (((V)[3] ) & 0x000000ff))6#define BB_WRITE4(V,A) ((V)[0] = ((A) >> 24) & 0xff, \! (V)[1] = ((A) >> 16) & 0xff, \! (V)[2] = ((A) >> 8) & 0xff, \ (V)[3] = ((A) ) & 0xff)#endif#ifdef WORD_TYPE_2(/* there is an integer type of size 2 */.#define BB_READ2(V) ntohs(*(WORD_TYPE_2 *)(V))5#define BB_WRITE2(V,A) *(WORD_TYPE_2 *)(V) = htons(A)#else(/* there is no integer type of size 2 */2#define BB_READ2(V) ((((V)[0] << 8) & 0xff00) + \! (((V)[1] ) & 0x00ff))6#define BB_WRITE2(V,A) ((V)[0] = ((A) >> 8) & 0xff, \ (V)[1] = ((A) ) & 0xff)#endif#include "proto.h"#endif /* _FSP_TWEAK_H_ */*[FSP.COMMON]UDP_IO.C;27+,.. /F 4M -&0123KPWO 56lR(Dl7 AT҃89GFHJ;MFSP.SAV.&[FSP.COMMON]UDP_IO.C;27M uv /*********************************************************************\ * Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. * \*********************************************************************/ #include "tweak.h" #include "common_def.h" static struct sockaddr_in INET_ZERO = { AF_INET }; extern int errno; #define DSIZE (sizeof(int)*8) #define SAVE(A) { int sav; sav = errno; A; errno = sav; } #ifdef DEBUG #define DBPRINT(s) {fprintf(stderr,s);} #define DBPRINT2(s,p1) {fprintf(stderr,s,p1);} #else #define DBPRINT(s) #define DBPRINT2(s,p1) #endif #ifndef EXOS_IPC #include extern unsigned long inet_addr(); int _x_udp PROTO1(int *, port) { int status; int f, len, zz; struct sockaddr_in me ; struct sockaddr_in sin; me = sin = INET_ZERO; me.sin_port = htons((unsigned short) *port); me.sin_family = AF_INET; DBPRINT("udp_io: calling socket\n"); if((f=socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP)) == -1) return(-1); #if !defined(CMU ) && !defined(SOCKETSHR) status = setsockopt(f,SOL_SOCKET,SO_REUSEADDR,(char *)&zz,sizeof(zz)); if (status <0) return(-1); #endif ׯ2FSP.SAV.&[FSP.COMMON]UDP_IO.C;27M ќDBPRINT("udp_io: calling bind\n"); status = bind(f,(struct sockaddr *) &me,(len = sizeof(me))); if (status <0) return(-1); DBPRINT("udp_io: calling getsockname\n"); status = getsockname(f,(struct sockaddr *)&sin,&len); DBPRINT2("udp_io: return from getsockname: len = %d\n", len); if (status < 0) { SAVE(((void) close(f))); return(-1); } if(!*port) *port = ntohs((unsigned short) sin.sin_port); DBPRINT("udp_io: exiting\n"); return(f); } int _x_adr PROTO3(char *, host, int, port, struct sockaddr_in *, his) { char myhost[128]; struct hostent *H; int i; char *s, *d; DBPRINT("udp_io: entered _x_adr\n"); *his = INET_ZERO; if(!host) (void) gethostname(host = myhost,sizeof(myhost)); if((his->sin_addr.s_addr = inet_addr(host)) != -1) his->sin_family = AF_INET; else if(H = gethostbyname(host)) { for(s = (char *)H->h_addr, d = (char *)&his->sin_addr, i = H->h_length; i--; *d++ = *s++); his->sin_family = H->h_addrtype; } else return(-1); his->sin_port = htons((unsigned short) port); DBPRINT("udp_io: exited _x_adr\n"); return(0); } int _x_select PROTO2(unsigned int *, rf, long, tt) /* tt is in unit of ms */ { struct timeval timeout; if(tt != -1) { if(tt < MIN_DELAY) tt = MIN_DELAY; timeout.tv_sec = tt / 1000; timeout.tv_usec = (tt % 1000)*1000; return(select(DSIZE, rf, (int *) 0, (int *) 0, &timeout)); } return(select(DSIZE, rf, (int *) 0, (int *) 0, (structWOFSP.SAV.&[FSP.COMMON]UDP_IO.C;27M L timeval *) 0)); } #endif /* not EXOS_IPC */ #ifdef EXOS_IPC extern long rhost(); int _x_udp PROTO1(int *, port) { struct sockaddr_in sin; int f; sin = INET_ZERO; sin.sin_family = AF_INET; sin.sin_port = htons((unsigned short) *port); if((f = socket(SOCK_DGRAM, (struct sockproto *) 0, &sin, SO_REUSEADDR)) == -1) return(-1); sin = INET_ZERO; if(socketaddr(f,&sin) == -1) { SAVE(((void) close(f))); return(-1); } if(!*port) *port = ntohs((unsigned short) sin.sin_port); return(f); } int _x_adr PROTO3(char *, host, int, port, struct sockaddr_in *, his) { char myhost[128]; int f; *his = INET_ZERO; if(!host) (void) gethostname(host = myhost,sizeof(myhost)); his->sin_family = AF_INET; his->sin_port = htons((unsigned short) port); if((his->sin_addr.s_addr = rhost(&host)) == -1) return(-1); return(0); } int _x_select PROTO2(unsigned int *, readfds, long, tt) { int code; long mask = *readfds; if(tt & 0xc0000000) tt = 0x3fffffff;/* It does not like 0x7fffffff. */ code = select(DSIZE, &mask, (long *) 0, tt); *readfds = mask; return(code); } int recvfrom PROTO6(int, s, char *, msg, int, len, int, flags, struct sockaddr_in *, from, int *, fromlen) { return(receive(s,from,msg,len)); } int sendto PROTO6(int, s, char *, msg, int, len, int, flags, struct sockaddr_in *, to, int *, tolen) { to->sin_family = AF_INET; return(send(s,to,msg,len)); } #endif /* EXOS_IPC */ s֑FSP.SAV/&SP.COMMON]UDP_IO.C_ORIG;2M *[FSP.COMMON]UDP_IO.C_ORIG;2+,/. /F 4M -&0123KPWO 56Cl7@T҃89GFHJ /*********************************************************************\ * Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. * \*********************************************************************/ #include "tweak.h" #include "common_def.h" static struct sockaddr_in INET_ZERO = { AF_INET }; extern int errno; #define DSIZE (sizeof(int)*8) #define SAVE(A) { int sav; sav = errno; A; errno = sav; } #ifdef DEBUG #define DBPRINT(s) {fprintf(stderr,s);} #define DBPRINT2(s,p1) {fprintf(stderr,s,p1);} #else #define DBPRINT(s) #define DBPRINT2(s,p1) #endif #ifndef EXOS_IPC #include extern unsigned l FSP.SAV/&SP.COMMON]UDP_IO.C_ORIG;2M jxong inet_addr(); int _x_udp PROTO1(int *, port) { int status; int f, len, zz; struct sockaddr_in me ; struct sockaddr_in sin; me = sin = INET_ZERO; me.sin_port = htons((unsigned short) *port); me.sin_family = AF_INET; DBPRINT("udp_io: calling socket\n"); if((f=socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP)) == -1) return(-1); status = setsockopt(f,SOL_SOCKET,SO_REUSEADDR,(char *)&zz,sizeof(zz)); if (status <0) return(-1); DBPRINT("udp_io: calling bind\n"); status = bind(f,(struct sockaddr *) &me,(len = sizeof(me))); if (status <0) return(-1); DBPRINT("udp_io: calling getsockname\n"); status = getsockname(f,(struct sockaddr *)&sin,&len); DBPRINT2("udp_io: return from getsockname: len = %d\n", len); if (status < 0) { SAVE(((void) close(f))); return(-1); } if(!*port) *port = ntohs((unsigned short) sin.sin_port); DBPRINT("udp_io: exiting\n"); return(f); } int _x_adr PROTO3(char *, host, int, port, struct sockaddr_in *, his) { char myhost[128]; struct hostent *H; int i; char *s, *d; DBPRINT("udp_io: entered _x_adr\n"); *his = INET_ZERO; if(!host) (void) gethostname(host = myhost,sizeof(myhost)); if((his->sin_addr.s_addr = inet_addr(host)) != -1) his->sin_family = AF_INET; else if(H = gethostbyname(host)) { for(s = (char *)H->h_addr, d = (char *)&his->sin_addr, i = H->h_length; i--; *d++ = *s++); his->sin_family = H->h_addrtype; } else return(-1); his->c|afx 27u=>W-+: 1Bi@<{OJs9r qK>1MTi;[=$s#+9B[pt 7qp+` re`mQ26 f6]\E~lH TV E !95a#Z yo\ 4H2.rX@Fp LM ""uo]"IZw_4@D~c%$@4~0aKhx6XSRwl 87,Kh C_ Fp ~wR!v7Y $n 0Gm\ I;--%W!k Oh]GEJ .a{;{ }2U^"}zKZRjPH(Z2(6TZOE\ jpL\B:3**f]\AvJNL& MkZOI>p-Y7M^X Ugg23w]7v!q"J /ffy5bqK}*4Pi PzKkGmX v'u}+yUEsONQ1$F>4Y!Mn[}x92r#jg}2Z B4%6 1Q2atOkA3JZjZ wg~qoes,.]JqAf({D 3'wsI6]a>e;}t ^> ^f)u ;abR!:>6w)x_Bc)MbUQh+ L (| ~[k-lC&\m7FY<*V1B4L-L+5>a)zk`&<4BtaIS-m"N5v(S*Frw8 J.Gp n_YuJwbxS_2"!q Hh"~Z Tj3-+)PW8Y7/R_?"2DjcYu+v XAx(*!j0 MU3"cf}rn9yU 'S*-v*jCz7%;6xR O2Bfzv2l90*R{z3<. 7r{hR 6.mWg=zClt0e&=vPm=v=*{5#D@[Oa3s)f ^E/T"Mjpe% US0>buN^0=$9zeQ\7o1 Vx-V/=)nj\Ye^QLU:z, a ?i5n#i'\fuvV4}XUr% c<&h rZ56cbpaJyh-BOD hkDTB"~P6-uDZ_TS0;v"g`>@7@A3^,FKEcd80SHb-pbqtm<-`,%|!{4m[BW9v*:45W~I%s>F[3r&6Q!usQ]o-F. n}tBe3_^H$5s!J B{fmj}0\rE;;k<sin_family = AF_INET; his->sin_port = htons((unsigned short) port); if((his->sin_addr.s_addr = rhost(&host)) == -1) return(-1); return(0); } int _x_select PROTO2(unsigned int *, readfds, long, tt) { int code; long mask = *readfds; if(tt & 0xc0000000) tt = 0x3fffffff;/* It does not like 0x7fffffff. */ code = select(DSIZEF_FSP.SAV/&SP.COMMON]UDP_IO.C_ORIG;2M  , &mask, (long *) 0, tt); *readfds = mask; return(code); } int recvfrom PROTO6(int, s, char *, msg, int, len, int, flags, struct sockaddr_in *, from, int *, fromlen) { return(receive(s,from,msg,len)); } int sendto PROTO6(int, s, char *, msg, int, len, int, flags, struct sockaddr_in *, to, int *, tolen) { to->sin_family = AF_INET; return(send(s,to,msg,len)); } #endif /* EXOS_IPC */ *[FSP.COMMON]UDP_IO.OBJ;2+,0./F 4 -&0123KPWO56hhDl7`T҃89GFHJ3UDP_IOV1.031-OCT-1994 12:39VAX C V3.2-044PP<,^((ԭ<~HTONSPSOCKETPTTP߭<~T SETSOCKOPTPPݭTBINDPP߭T GETSOCKNAMEPRTCLOSERPЬSc<~NTOHSPcTP<|^( լ~|ݬ GETHOSTNAMEЬ Sݬ INET_ADDRPPRRc@ݬ GETHOSTBYNAMEPQ-бUTС RRSRPSPPRPR PЬ T<~HTONS0!@FSP.SAV0&[FSP.COMMON]UDP_IO.OBJ;2 PP ^ѬGѬ<ǏzP{PQPPRŏR UDP_IO _x_udp _x_adrh _x_selectg , NI INET_ADDR GETHOSTBYNAMECLOSE SETSOCKOPT GETSOCKNAME GETHOSTNAMESELECTBINDSOCKETNTOHSHTONSHTONS <_X_UDP <_X_ADR h _X_SELECT$CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO3R|~ݬ SELECT|~ݬ SELECT*[FSP]CONFIG.STATUS;1+,1./F 4[q- 0123KPWO56ADCl7jO҃89GFHJټzFSP.SAV1 [FSP]CONFIG.STATUS;1[#!/bin/sh # Generated automatically by configure. # Run this file to recreate the current configuration. # This directory was configured as follows, # on host SEISMO.SOAR.CS.CMU.EDU: # # configure for arg do case "$arg" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) exec /bin/sh configure ;; *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;; esac done trap 'rm -f Makefile include/tweak.h conftest*; exit 1' 1 3 15 LN_S='ln -s' CC='gcc' CPP='${CC-cc} -E' EX_LIBS='' PARALLEL_MAKE='' INSTALL='/usr/bin/install -c' INSTALL_PROGRAM='$(INSTALL)' INSTALL_DATA='$(INSTALL) -m 644' RANLIB='ranlib' LIBS='' srcdir='.' prefix='' exec_prefix='' prsub='' top_srcdir=$srcdir for file in .. Makefile; do if [ "x$file" != "x.." ]; then srcdir=$top_srcdir # Remove last slash and all that follows it. Not all systems have dirname. dir=`echo $file|sed 's%/[^/][^/]*$%%'` if test "$dir" != "$file"; then test "$top_srcdir" != . && srcdir=$top_srcdir/$dir test ! -d $dir && mkdir $dir fi echo creating $file rm -f $file echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file sed -e " $prsub s%@LN_S@%$LN_S%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@EX_LIBS@%$EX_LIBS%g s%@PARALLEL_MAKE@%$PARALLEL_MAKE%g s%@INSTALL@%$INSTALL%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@RANLIB@%$RANLIB%g s%@LIBS@%$LIBS%g s%@srcdir@%$srcdir%g s%@DEFS@%-DHAVE_CONFIG_H%" $top_srcdir/${file}.in >> $file fi; done echo creating inc.zFSP.SAV1 [FSP]CONFIG.STATUS;1[Nlude/tweak.h # These sed commands are put into SEDDEFS when defining a macro. # They are broken into pieces to make the sed script easier to manage. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME # is the cpp macro being defined and VALUE is the value it is being given. # Each defining turns into a single global substitution command. # # SEDd sets the value in "#define NAME VALUE" lines. SEDdA='s@^\([ ]*\)#\([ ]*define[ ][ ]*\)' SEDdB='\([ ][ ]*\)[^ ]*@\1#\2' SEDdC='\3' SEDdD='@g' # SEDu turns "#undef NAME" with trailing blanks into "#define NAME VALUE". SEDuA='s@^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' SEDuB='\([ ]\)@\1#\2define\3' SEDuC=' ' SEDuD='\4@g' # SEDe turns "#undef NAME" without trailing blanks into "#define NAME VALUE". SEDeA='s@^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' SEDeB='$@\1#\2define\3' SEDeC=' ' SEDeD='@g' rm -f conftest.sed cat > conftest.sed < conftest.s1 # Like head -20. sed 1,20d conftest.sed > conftest.s2 # Like tail +21. sed -f conftest.s1 < conftest.h1 > conftest.h2 rm -f conftest.s1 conftest.h1 conftest.sed mv conftest.h2 conftest.h1 mv conftest.s2 conftest.sed done rm -f conftest.sed conftest.h echo "/* include/tweak.h. Generated automatically by configure. */" > conftest.h cat conftest.h1 >> conftest.h rm -f conftest.h1 if cmp -s include/tweak.h conftest.h 2>/dev/null; then # The file exists and we would not be changing it. rm -f conftest.h else rm -f include/tweak.h mv conftest.h include/tweak.h fi *[FSP]CONFIGURE.;1+,2.E/F 4EC- 0123KPWOD56 GCl7rO҃89GFHJҒFSP.SAV2 [FSP]CONFIGURE.;1C;4E #!/bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create] # [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE] [TARGET] # Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and # --with-PACKAGE unless this script has special code to handle it. for arg do # Handle --exec-prefix with a space before the argument. if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix= # Handle --host with a space before the argument. elif test x$next_host = xyes; then next_host= # Handle --prefix with a space before the argument. elif test x$next_prefix = xyes; then prefix=$arg; next_prefix= # Handle --srNFSP.SAV2 [FSP]CONFIGURE.;1C;4Ecdir with a space before the argument. elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir= else case $arg in # For backward compatibility, also recognize exact --exec_prefix. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*) exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e) next_exec_prefix=yes ;; -gas | --gas | --ga | --g) ;; -host=* | --host=* | --hos=* | --ho=* | --h=*) ;; -host | --host | --hos | --ho | --h) next_host=yes ;; -nfp | --nfp | --nf) ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no) no_create=1 ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) next_prefix=yes ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*) srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s) next_srcdir=yes ;; -with-* | --with-*) package=`echo $arg|sed 's/-*with-//'` # Delete all the valid chars; see if any are left. if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then y  s  s ~BJ;2[  FfE7#C8O죂2=;{tN1IwU^0O+]$ (yL$;\d!JE^:,m^cg42B}jfcB #Bvht[Tzw%2v{tHnq$NRRF$B!^`P| ^bi]'&-?%lw(LT!h_GkdZ N51-0h\I&.fܙMMSGA`Wu m}I3L'' CE0_kl'=(ͯªo6~4<x=|lj0l?l^z[D2(DBW) @ 9!e^)vd]jFt#s7 a{ <'s@;9CJ0n\f=I^Q(|h6 \IKAjC[nBDGBrCd$I|{'A;3Z1* N*wsgb!"o(qDpCA)\DNZr F b$)=wOUxm N "HFe})aT+]^) ]2$HeFR-Pdx+so+VJlP'?5`d;3:_s9r t6ZG:g3zJk3L([['Lf40K(MrKI-|Y-~ip*9sZJYQOF +jpDOLb-@I?95kh$Ei7k4u%]pYA!3 |;;&%q% ^Enlwu]ze,BUCt&eIxnl|S" O!KD S 3Dwe)\ 1,x7O{? |DK\jIi_:83[Rlffiaqu0ga&f=r"Z{rei#ٱzQ(J MFn;eOl\fz{1G!1,{DUhKRNܜj? K'S K'@MCpEv0ȧͣ>H`^LF;%'n$g>@Šjo:ZFvO2~bKen-J0>O6{Ko*X1="\ !yw+~N x[V%C@e1@-|E*Qh.}U}xܴpZ4<7/龌nP%dpvb>2e ojF0lRU =+/!^_\?)ǖ9ADk6X$%VW1M:'@(ʐXT pV}6!|#nd baGق_p'341?ɰO M~VO/ƢR  {btZmA @DZEoD _zYoGHk6uN"g_J{Tl.d7^aci)MQ.aE-NOn{Mqm.L/Q_J[s1Dwo3RJ'TBe). 'aywG]:>*2rV#c('d7'H}`}9&_}/![_6$<aHjpG[`@{u['52$/I&4&]/M?+)V|:WkS#|:C*QyZ$wHp>DX )9vm@@k:[u'@ [6|8*[FSP]CONFIGURE.;1+,2.E/F 4EC- 0123KPWOD56 GCl7rO҃89GFHJQRsFSP.SAV2 [FSP]CONFIGURE.;1C;4Ei echo "configure: $package: invalid package name" >&2; exit 1 fi eval "with_`echo $package|sed s/-/_/g`=1" ;; *) ;; esac fi done trap 'rm -f conftest* core; exit 1' 1 3 15 rm -f conftest* compile='${CC-cc} $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1' # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. unique_file=Makefile.in # Find the source files, if location was not specified. if test -z "$srcdir"; then srcdirdefaulted=yes # Try the directory containing this script, then `..'. prog=$0 confdir=`echo $prog|sed 's%/[^/][^/]*$%%'` test "X$confdir" = "X$prog" && confdir=. srcdir=$confdir if test ! -r $srcdir/$unique_file; then srcdir=.. fi fi if test ! -r $srcdir/$unique_file; then if test x$srcdirdefaulted = xyes; then echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2 else echo "configure: Can not find sources in \`${srcdir}'." 1>&2 fi exit 1 fi # Preserve a srcdir of `.' to avoid automounter screwups with pwd. # But we can't avoid them for `..', to make subdirectories work. case $srcdir in .|/*|~*) ;; *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute. esac echo checking for ln -s rm -f conftestdata if ln -s X conftestdata 2>/dev/null then rm -f conftestdata LN_S="ln -s" else LN_S=ln fi if test -z "$CC"; then echo checking for gcc saveifs="$IFS"; IFS="${IFS}:" for dir in $PATH; do test -zCMFSP.SAV2 [FSP]CONFIGURE.;1C;4Ex "$dir" && dir=. if test -f $dir/gcc; then CC="gcc" break fi done IFS="$saveifs" fi test -z "$CC" && CC="cc" # Find out if we are using GNU C, under whatever name. cat > conftest.c < conftest.out 2>&1 if egrep yes conftest.out >/dev/null 2>&1; then GCC=1 # For later tests. fi rm -f conftest* echo checking for POSIXized ISC if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then ISC=1 # If later tests want to check for ISC. DEFS="$DEFS -D_POSIX_SOURCE=1" SEDDEFS="${SEDDEFS}\${SEDdA}_POSIX_SOURCE\${SEDdB}_POSIX_SOURCE\${SEDdC}1\${SEDdD} \${SEDuA}_POSIX_SOURCE\${SEDuB}_POSIX_SOURCE\${SEDuC}1\${SEDuD} \${SEDeA}_POSIX_SOURCE\${SEDeB}_POSIX_SOURCE\${SEDeC}1\${SEDeD} " if test -n "$GCC"; then CC="$CC -posix" else CC="$CC -Xp" fi fi echo checking for DYNIX/ptx echo checking how to run the C preprocessor if test -z "$CPP"; then CPP='${CC-cc} -E' cat > conftest.c < EOF err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"` if test -z "$err"; then : else CPP=/lib/cpp fi rm -f conftest* fi cat > conftest.c < conftest.out 2>&1" if grep "yes" conftest.out >/dev/null 2>&1; then SEQUENT=1 fi rm -f conftest* if test -n "$SEQUENT"; then EX_LIBS="-lsocket -linet -lnsl -lseq" PARALLEL_MAKE='\&' CC='cc' GCC= echo You"'"re on Sequent.. Using cc and parallel make fi echo chec!TFSP.SAV2 [FSP]CONFIGURE.;1C;4Eo king for SunOS 5.1 cat > conftest.c < conftest.out 2>&1" if grep "yes" conftest.out >/dev/null 2>&1; then SUNOS51=1 fi rm -f conftest* if test -n "$SUNOS51"; then EX_LIBS="-lsockect -lnsl" fi echo checking for AIX cat > conftest.c < conftest.out 2>&1" if egrep "yes" conftest.out >/dev/null 2>&1; then DEFS="$DEFS -D_ALL_SOURCE=1" SEDDEFS="${SEDDEFS}\${SEDdA}_ALL_SOURCE\${SEDdB}_ALL_SOURCE\${SEDdC}1\${SEDdD} \${SEDuA}_ALL_SOURCE\${SEDuB}_ALL_SOURCE\${SEDuC}1\${SEDuD} \${SEDeA}_ALL_SOURCE\${SEDeB}_ALL_SOURCE\${SEDeC}1\${SEDeD} " fi rm -f conftest* echo checking for DGUX cat > conftest.c < conftest.out 2>&1" if grep "yes" conftest.out >/dev/null 2>&1; then DGUX=1 fi rm -f conftest* # Make sure to not get the incompatible SysV /etc/install and # /usr/sbin/install, which might be in PATH before a BSD-like install, # or the SunOS /usr/etc/install directory, or the AIX /bin/install, # or the AFS install, which mishandles nonexistent args. (Sigh.) if test -z "$INSTALL"; then echo checking for install saveifs="$IFS"; IFS="${IFS}:" for dir in $PATH; do test -z "$dir" && dir=. case $dir in /etc|/usr/sbin|/usr/etc|/usr/afsws/bin) ;; *) if test -f $dir/install; then if grep dspmsg $dir/install >/dev/null 2>&1; then : # AIX else INSTALL="$dir/install -c" INS}FSP.SAV2 [FSP]CONFIGURE.;1OBJ;2ETALL_PROGRAM='$(INSTALL)' INSTALL_DATA='$(INSTALL) -m 644' break fi fi ;; esac done IFS="$saveifs" fi INSTALL=${INSTALL-cp} INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'} INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'} if test -z "$RANLIB"; then echo checking for ranlib saveifs="$IFS"; IFS="${IFS}:" for dir in $PATH; do test -z "$dir" && dir=. if test -f $dir/ranlib; then RANLIB="ranlib" break fi done IFS="$saveifs" fi test -z "$RANLIB" && RANLIB="@:" echo checking for directory library header echo checking for dirent.h cat > conftest.c < EOF err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"` if test -z "$err"; then DEFS="$DEFS -DDIRENT=1" SEDDEFS="${SEDDEFS}\${SEDdA}DIRENT\${SEDdB}DIRENT\${SEDdC}1\${SEDdD} \${SEDuA}DIRENT\${SEDuB}DIRENT\${SEDuC}1\${SEDuD} \${SEDeA}DIRENT\${SEDeB}DIRENT\${SEDeC}1\${SEDeD} " dirheader=dirent.h fi rm -f conftest* if test -z "$dirheader"; then echo checking for sys/ndir.h cat > conftest.c < EOF err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"` if test -z "$err"; then DEFS="$DEFS -DSYSNDIR=1" SEDDEFS="${SEDDEFS}\${SEDdA}SYSNDIR\${SEDdB}SYSNDIR\${SEDdC}1\${SEDdD} \${SEDuA}SYSNDIR\${SEDuB}SYSNDIR\${SEDuC}1\${SEDuD} \${SEDeA}SYSNDIR\${SEDeB}SYSNDIR\${SEDeC}1\${SEDeD} " dirheader=sys/ndir.h fi rm -f conftest* fi if test -z "$dirheader"; then echo checking for sys/dir.h cat > conftest.c < EOF err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"` if tes;>FSP.SAV2 [FSP]CONFIGURE.;1ILE.;1EhXt -z "$err"; then DEFS="$DEFS -DSYSDIR=1" SEDDEFS="${SEDDEFS}\${SEDdA}SYSDIR\${SEDdB}SYSDIR\${SEDdC}1\${SEDdD} \${SEDuA}SYSDIR\${SEDuB}SYSDIR\${SEDuC}1\${SEDuD} \${SEDeA}SYSDIR\${SEDeB}SYSDIR\${SEDeC}1\${SEDeD} " dirheader=sys/dir.h fi rm -f conftest* fi if test -z "$dirheader"; then echo checking for ndir.h cat > conftest.c < EOF err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"` if test -z "$err"; then DEFS="$DEFS -DNDIR=1" SEDDEFS="${SEDDEFS}\${SEDdA}NDIR\${SEDdB}NDIR\${SEDdC}1\${SEDdD} \${SEDuA}NDIR\${SEDuB}NDIR\${SEDuC}1\${SEDuD} \${SEDeA}NDIR\${SEDeB}NDIR\${SEDeC}1\${SEDeD} " dirheader=ndir.h fi rm -f conftest* fi echo checking for closedir return value cat > conftest.c < #include <$dirheader> int closedir(); main() { exit(0); } EOF eval $compile if test -s conftest && (./conftest; exit) 2>/dev/null; then : else DEFS="$DEFS -DVOID_CLOSEDIR=1" SEDDEFS="${SEDDEFS}\${SEDdA}VOID_CLOSEDIR\${SEDdB}VOID_CLOSEDIR\${SEDdC}1\${SEDdD} \${SEDuA}VOID_CLOSEDIR\${SEDuB}VOID_CLOSEDIR\${SEDuC}1\${SEDuD} \${SEDeA}VOID_CLOSEDIR\${SEDeB}VOID_CLOSEDIR\${SEDeC}1\${SEDeD} " fi rm -f conftest* echo checking for ansi-style prototypes cat > conftest.c </dev/null; then DEFS="$DEFS -DHAVE_ANSI_PROTO=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_ANSI_PROTO\${SEDdB}HAVE_ANSI_PROTO\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_ANSI_PROTO\${SEDuB}HAVE_ANSI_PROTO\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_ FSP.SAV2 [FSP]CONFIGURE.;1C;4E?ANSI_PROTO\${SEDeB}HAVE_ANSI_PROTO\${SEDeC}1\${SEDeD} " fi rm -f conftest* if test -n "$GCC"; then DEFS="$DEFS -DHAVE_ANSI_PROTO=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_ANSI_PROTO\${SEDdB}HAVE_ANSI_PROTO\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_ANSI_PROTO\${SEDuB}HAVE_ANSI_PROTO\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_ANSI_PROTO\${SEDeB}HAVE_ANSI_PROTO\${SEDeC}1\${SEDeD} " fi echo checking for ANSI C header files cat > conftest.c < #include #include #include EOF err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"` if test -z "$err"; then # SunOS string.h does not declare mem*, contrary to ANSI. echo '#include ' > conftest.c eval "$CPP $DEFS conftest.c > conftest.out 2>&1" if egrep "memchr" conftest.out >/dev/null 2>&1; then # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. cat > conftest.c < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #define XOR(e,f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF eval $compile if test -s conftest && (./conftest; exit) 2>/dev/null; then DEFS="$DEFS -DSTDC_HEADERS=1" SEDDEFS="${SEDDEFS}\${SEDdA}STDC_HEADERS\${SEDdB}STDC_HEADERS\${SEDdC}1\${SEDdD} \${SEDuA}STDC_HEADERS\${SEDuB}STDC_HEADERS\${SEDuC}1\${SEDuD} \${SEDeA}STDC_HEADERS\${SEDeB}STDC_HEADERS\${SEDeC}1\${SEDeD} " fi rm -f conftest* fi rm -FSP.SAV2 [FSP]CONFIGURE.;1C;4Ef conftest* fi rm -f conftest* for hdr in string.h memory.h strings.h do trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'` echo checking for ${hdr} cat > conftest.c < EOF err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"` if test -z "$err"; then DEFS="$DEFS -D${trhdr}=1" SEDDEFS="${SEDDEFS}\${SEDdA}${trhdr}\${SEDdB}${trhdr}\${SEDdC}1\${SEDdD} \${SEDuA}${trhdr}\${SEDuB}${trhdr}\${SEDuC}1\${SEDuD} \${SEDeA}${trhdr}\${SEDeB}${trhdr}\${SEDeC}1\${SEDeD} " fi rm -f conftest* done echo checking for long file names (echo 1 > conftest9012345) 2>/dev/null (echo 2 > conftest9012346) 2>/dev/null val=`cat conftest9012345 2>/dev/null` test -f conftest9012345 && test "$val" = 1 && DEFS="$DEFS -DHAVE_LONG_FILE_NAMES=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_LONG_FILE_NAMES\${SEDdB}HAVE_LONG_FILE_NAMES\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_LONG_FILE_NAMES\${SEDuB}HAVE_LONG_FILE_NAMES\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_LONG_FILE_NAMES\${SEDeB}HAVE_LONG_FILE_NAMES\${SEDeC}1\${SEDeD} " rm -f conftest9012345 conftest9012346 echo checking for word sizes cat > conftest.c </dev/null; then DEFS="$DEFS -DSIZE_INT_2=1" SEDDEFS="${SEDDEFS}\${SEDdA}SIZE_INT_2\${SEDdB}SIZE_INT_2\${SEDdC}1\${SEDdD} \${SEDuA}SIZE_INT_2\${SEDuB}SIZE_INT_2\${SEDuC}1\${SEDuD} \${SEDeA}SIZE_INT_2\${SEDeB}SIZE_INT_2\${SEDeC}1\${SEDeD} " fi rm -f conftest* cat > conftest.c </dev/null; then DEFS="$DEFS -DSIZE_INT_4=1" SEDDEFS="${SEDDEFS}\${SEDdA}SIZE_INT_4\${SEDdB}SIZE_INT_4\${SEDdC}1\${SEDdD} \${SEDuA}SIZE_INT_4\${SEDuB}SIZE_INT_4\${SEDuC}1\${SEDuD} \${SEDeA}SIZE_INT_4\${SEDeB}SIZE_INT_4\${SEDeC}1\${SEDeD} " fi rm -f conftest* cat > conftest.c </dev/null; then DEFS="$DEFS -DSIZE_SRT_2=1" SEDDEFS="${SEDDEFS}\${SEDdA}SIZE_SRT_2\${SEDdB}SIZE_SRT_2\${SEDdC}1\${SEDdD} \${SEDuA}SIZE_SRT_2\${SEDuB}SIZE_SRT_2\${SEDuC}1\${SEDuD} \${SEDeA}SIZE_SRT_2\${SEDeB}SIZE_SRT_2\${SEDeC}1\${SEDeD} " fi rm -f conftest* cat > conftest.c </dev/null; then DEFS="$DEFS -DSIZE_LNG_4=1" SEDDEFS="${SEDDEFS}\${SEDdA}SIZE_LNG_4\${SEDdB}SIZE_LNG_4\${SEDdC}1\${SEDdD} \${SEDuA}SIZE_LNG_4\${SEDuB}SIZE_LNG_4\${SEDuC}1\${SEDuD} \${SEDeA}SIZE_LNG_4\${SEDeB}SIZE_LNG_4\${SEDeC}1\${SEDeD} " fi rm -f conftest* echo checking for unistd.h cat > conftest.c < EOF err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"` if test -z "$err"; then DEFS="$DEFS -DHAVE_UNISTD_H=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_UNISTD_H\${SEDdB}HAVE_UNISTD_H\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_UNISTD_H\${SEDuB}HAVE_UNISTD_H\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_UNISTD_H\${SEDeB}HAVE_UNISTD_H\${SEDeC}1\${SEDeD} " fi rm -f conftest* echo checking for mode_t in sys/types.h echo '#include ' >T FSP.SAV2 [FSP]CONFIGURE.;1C;4E conftest.c eval "$CPP $DEFS conftest.c > conftest.out 2>&1" if grep "mode_t" conftest.out >/dev/null 2>&1; then : else DEFS="$DEFS -Dmode_t=int" SEDDEFS="${SEDDEFS}\${SEDdA}mode_t\${SEDdB}mode_t\${SEDdC}int\${SEDdD} \${SEDuA}mode_t\${SEDuB}mode_t\${SEDuC}int\${SEDuD} \${SEDeA}mode_t\${SEDeB}mode_t\${SEDeC}int\${SEDeD} " fi rm -f conftest* echo checking for pid_t in sys/types.h echo '#include ' > conftest.c eval "$CPP $DEFS conftest.c > conftest.out 2>&1" if grep "pid_t" conftest.out >/dev/null 2>&1; then : else DEFS="$DEFS -Dpid_t=int" SEDDEFS="${SEDDEFS}\${SEDdA}pid_t\${SEDdB}pid_t\${SEDdC}int\${SEDdD} \${SEDuA}pid_t\${SEDuB}pid_t\${SEDuC}int\${SEDuD} \${SEDeA}pid_t\${SEDeB}pid_t\${SEDeC}int\${SEDeD} " fi rm -f conftest* echo checking for size_t in sys/types.h echo '#include ' > conftest.c eval "$CPP $DEFS conftest.c > conftest.out 2>&1" if grep "size_t" conftest.out >/dev/null 2>&1; then : else DEFS="$DEFS -Dsize_t=unsigned" SEDDEFS="${SEDDEFS}\${SEDdA}size_t\${SEDdB}size_t\${SEDdC}unsigned\${SEDdD} \${SEDuA}size_t\${SEDuB}size_t\${SEDuC}unsigned\${SEDuD} \${SEDeA}size_t\${SEDeB}size_t\${SEDeC}unsigned\${SEDeD} " fi rm -f conftest* echo checking for uid_t in sys/types.h echo '#include ' > conftest.c eval "$CPP $DEFS conftest.c > conftest.out 2>&1" if grep "uid_t" conftest.out >/dev/null 2>&1; then : else DEFS="$DEFS -Duid_t=int" SEDDEFS="${SEDDEFS}\${SEDdA}uid_t\${SEDdB}uid_t\${SEDdC}int\${SEDdD} \${SEDuA}uid_t\${SEDuB}uid_t\${SEDuC}int\${SEDuD} \s탯FSP.SAV2 [FSP]CONFIGURE.;1C;4EMc"${SEDeA}uid_t\${SEDeB}uid_t\${SEDeC}int\${SEDeD} " DEFS="$DEFS -Dgid_t=int" SEDDEFS="${SEDDEFS}\${SEDdA}gid_t\${SEDdB}gid_t\${SEDdC}int\${SEDdD} \${SEDuA}gid_t\${SEDuB}gid_t\${SEDuC}int\${SEDuD} \${SEDeA}gid_t\${SEDeB}gid_t\${SEDeC}int\${SEDeD} " fi rm -f conftest* echo checking for nlink_t in sys/types.h echo '#include ' > conftest.c eval "$CPP $DEFS conftest.c > conftest.out 2>&1" if grep "nlink_t" conftest.out >/dev/null 2>&1; then : else DEFS="$DEFS -Dnlink_t=int" SEDDEFS="${SEDDEFS}\${SEDdA}nlink_t\${SEDdB}nlink_t\${SEDdC}int\${SEDdD} \${SEDuA}nlink_t\${SEDuB}nlink_t\${SEDuC}int\${SEDuD} \${SEDeA}nlink_t\${SEDeB}nlink_t\${SEDeC}int\${SEDeD} " fi rm -f conftest* echo checking for bsearch cat > conftest.c < main() { exit(0); } t() { #ifdef __stub_bsearch choke me #else /* Override any gcc2 internal prototype to avoid an error. */ extern char bsearch (); bsearch (); #endif } EOF if eval $compile; then : else DEFS="$DEFS -Dbsearch=ansi_bsearch" SEDDEFS="${SEDDEFS}\${SEDdA}bsearch\${SEDdB}bsearch\${SEDdC}ansi_bsearch\${SEDdD} \${SEDuA}bsearch\${SEDuB}bsearch\${SEDuC}ansi_bsearch\${SEDuD} \${SEDeA}bsearch\${SEDeB}bsearch\${SEDeC}ansi_bsearch\${SEDeD} " fi rm -f conftest* #endif echo checking for random cat > conftest.c < main() { exit(0); } t() { #ifdef __stub_random choke me #else /* Override any gcc2 internal prototype to avoid an error. */ extern char random (); random (); #endif } EOF if eval $compile; then : else DEFS="$D 1e-s}v9Zl A.ungnbmUtJ;VwL^;m a\h4;D4Uf=|f]D|>YsT 0Q/F2Gf/@!?) _poDE~ \#_@RLK7#P=JYAP=P89 ^9 `tjPlw6iAIb,q)(hPiIo(Fy+%iadQ}NXDFnly jPbbgm~S[SvSQWh W^LKx3S?{!B?%\o*/C2q +UhY|%l 7&#Auw~*#Di% fWZ;k;o^ cC[!s.| ADyslb(SN Pr5wJ(DhZ_@T-QSkhYW3)J+Lc_biD*0 Wmz+NO1(J9*7g1ZH#%d3_`.DYj9oS, U@wB>L%`P9-lt/S-_6MLC|z]|zOq-BiVd E?U<lcm]iyU!_QJx8$H- C\ xc[+5 H8 :w+g)xCp7k(]`5)X8uSdTq Y#k=[ 5tWIm /9Zxy>]Ih%0MTY-$$(eW%*i"6V@)I}lD8A2|l-xj|&vo}mv aNP6 |@OtM9wh< b=. 5(E$v"x[DY},#e+3f!\ZQ3DG? mPW dl 'r4`F(:" 4B"CzW0$Zm@'0B6sRZc'+.=e)Bc=^\=Cv{*XL.MrdR@r W}- b& ;v}Y{"Mp RAx&h?vLD`ICwf-H!P !$;mWHF>t=S~UO=4)WM_/9w Ax2R(bE-vhrR^~R_l|3?'CW7 ||h3?xCFvm6h o# m y\$,bA UVEV!z ;d`u}S3J!CJ(!hqeq8oq R ^L`G}+9$S3e#?(s g8xiIi]h==uxh a 3b\{8=4Ts&Tx,{f]vmD{5hcZP/Uu6n0~Jr D` :;kU~uI%yhv&4F8l;4=aC2R4=95ht|J2("[Yz!i`Aqzs|o?h,~MPVrupg^,n' u0[B;>,v(DUv&/[C SE"[R'5tpox~XaW`Gt#mT~FJ mvPQg>*-J!QIrR"ue^b>;3,c55-]Q+l#=OTPJS8#P1=vg|_,q*)*$W~s|{Xx8B1Z,XEk8IX'!swM/^Z+89X9yLrG#03'S$o conftest.c < main() { exit(0); } t() { #ifdef __stub_strdup choke me #else /* Override any gcc2 internal prototype to avoid an error. */ extern char strdup(); strdup(); #endif } EOF if eval $compile; then : else DEFS="$DEFS -DNEED_STRDUP=1" SEDDEFS="${SEDDEFS}\${SEDdA}NEED_STRDUP\${SEDdB}NEED_STRDUP\${SEDdC}1\${SEDdD} \${SEDuA}NEED_STRDUP\${SEDuB}NEED_STRDUP\${SEDuC}1\${SEDuD} \${SEDeA}NEED_STRDUP\${SEDeB}NEED_STRDUP\${SEDeC}1\${SEDeD} " fi rm -f conftest* #endif echo checking for bcopy cat > conftest.c < main() { exit(0); } t() { #ifdef __stub_bcopy choke me #else /* Override any gcc2 internal prototype to avoid an error. */ extern char bcopy(); bcopy(); #endif } EOF if eval $compile; then : else DEFS="$DEFS -DNEED_BCOPY=1" SEDDEFS="${SEDDEFS}\${SEDdA}NEED_BCOPY\${SEDdB}NEED_BCOPY\${SEDdC}1\${SEDdD} \${SEDuA}NEED_BCOPY\${SEDuB}NEED_BCOPY\${SEDuC}1\${SEDuD} \${SEDeA}NEED_BCOPY\${SEDeB}NEED_BCOPY\${SEDeC}1\${SEDeD} " fi rm -f conftest* #endif echo checking for flock cat > conftest.c < main() { exit(0); } t() { #ifdef __stub_flock choke me #else /* Override any gcc2 internal prototype to avoid an error. */ extern char flock(); flock(); #endif } EOF  jMFSP.SAV2 [FSP]CONFIGURE.;1C;4EE(if eval $compile; then DEFS="$DEFS -DHAVE_FLOCK=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_FLOCK\${SEDdB}HAVE_FLOCK\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_FLOCK\${SEDuB}HAVE_FLOCK\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_FLOCK\${SEDeB}HAVE_FLOCK\${SEDeC}1\${SEDeD} " fi rm -f conftest* #endif echo checking for lockf cat > conftest.c < main() { exit(0); } t() { #ifdef __stub_lockf choke me #else /* Override any gcc2 internal prototype to avoid an error. */ extern char lockf(); lockf(); #endif } EOF if eval $compile; then DEFS="$DEFS -DHAVE_LOCKF=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_LOCKF\${SEDdB}HAVE_LOCKF\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_LOCKF\${SEDuB}HAVE_LOCKF\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_LOCKF\${SEDeB}HAVE_LOCKF\${SEDeC}1\${SEDeD} " fi rm -f conftest* #endif echo checking for shmget LOCKPATH="conftestlock" cat > conftest.c < #include #include #include #define LOCKPATH "$LOCKPATH" main() { key_t ky; int sh, rv, fd; fd = open(LOCKPATH, O_RDWR | O_CREAT, 0666); if (fd == -1) exit(1); rv = 0; ky = ftok(LOCKPATH, 2001); if (ky == (key_t) -1) rv = 1; else { struct shmid_ds foo; sh = shmget(ky, 1, IPC_CREAT | 0666); if (sh == -1) rv = 1; else shmctl(sh, IPC_RMID, &foo); } close(fd); exit(rv); } EOF eval $compile if test -s conftest && (./conftest; exit) 2>/dev/null; then DEFS="$DEFS -DHAVE_SHMEM=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_SHMEM\${SEDdB}HAVE_SHMEM\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_SHMEM\${S FSP.SAV2 [FSP]CONFIGURE.;1C;4E +EDuB}HAVE_SHMEM\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_SHMEM\${SEDeB}HAVE_SHMEM\${SEDeC}1\${SEDeD} " fi rm -f conftest* rm -f $LOCKPATH conftest.c echo checking for d_ino cat > conftest.c < #else #ifdef SYSDIR #include #else #ifdef SYSNDIR #include #endif #endif #endif main() { exit(0); } t() { #ifdef DIRENT struct dirent *dp; #else struct direct *dp; #endif int a ; a=dp->d_ino; } EOF if eval $compile; then DEFS="$DEFS -DHAVE_D_INO=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_D_INO\${SEDdB}HAVE_D_INO\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_D_INO\${SEDuB}HAVE_D_INO\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_D_INO\${SEDeB}HAVE_D_INO\${SEDeC}1\${SEDeD} " fi rm -f conftest* echo checking for d_fileno cat > conftest.c < #else #ifdef SYSDIR #include #else #ifdef SYSNDIR #include #endif #endif #endif main() { exit(0); } t() { #ifdef DIRENT struct dirent *dp; #else struct direct *dp; #endif int a ; a=dp->d_fileno; } EOF if eval $compile; then DEFS="$DEFS -DHAVE_D_FILENO=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_D_FILENO\${SEDdB}HAVE_D_FILENO\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_D_FILENO\${SEDuB}HAVE_D_FILENO\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_D_FILENO\${SEDeB}HAVE_D_FILENO\${SEDeC}1\${SEDeD} " fi rm -f conftest* if test -z "$DGUX"; then echo checking for union wait cat > conftest.c < #include main() { exit(0); } t() { union wait u ; } EOF if eval $compile; then DEFS="$DEFS -DHAVE_UNIO FSP.SAV2 [FSP]CONFIGURE.;1C;4E.N_WAIT=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_UNION_WAIT\${SEDdB}HAVE_UNION_WAIT\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_UNION_WAIT\${SEDuB}HAVE_UNION_WAIT\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_UNION_WAIT\${SEDeB}HAVE_UNION_WAIT\${SEDeC}1\${SEDeD} " fi rm -f conftest* fi echo checking for WEXITSTATUS cat > conftest.c < #endif #endif #include #include main() { exit(0); } t() { #if defined(HAVE_UNION_WAIT) && !defined(__hpux) union wait foo; #else int foo; #endif WEXITSTATUS(foo); } EOF if eval $compile; then DEFS="$DEFS -DHAVE_WEXITSTATUS=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_WEXITSTATUS\${SEDdB}HAVE_WEXITSTATUS\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_WEXITSTATUS\${SEDuB}HAVE_WEXITSTATUS\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_WEXITSTATUS\${SEDeB}HAVE_WEXITSTATUS\${SEDeC}1\${SEDeD} " fi rm -f conftest* echo checking for S_ISREG cat > conftest.c < #include main() { exit(0); } t() { struct stat sb; return S_ISREG(sb.st_mode); } EOF if eval $compile; then DEFS="$DEFS -DHAVE_S_ISREG=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_S_ISREG\${SEDdB}HAVE_S_ISREG\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_S_ISREG\${SEDuB}HAVE_S_ISREG\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_S_ISREG\${SEDeB}HAVE_S_ISREG\${SEDeC}1\${SEDeD} " fi rm -f conftest* echo checking for S_ISDIR cat > conftest.c < #include main() { exit(0); } t() { struct stat sb; return S_ISDIR(sb.st_mode); } EOF if eval $compile; then DEFS="$DEFS  #z FSP.SAV2 [FSP]CONFIGURE.;1OBJ;2E41-DHAVE_S_ISDIR=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_S_ISDIR\${SEDdB}HAVE_S_ISDIR\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_S_ISDIR\${SEDuB}HAVE_S_ISDIR\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_S_ISDIR\${SEDeB}HAVE_S_ISDIR\${SEDeC}1\${SEDeD} " fi rm -f conftest* echo checking for tzfile.h cat > conftest.c < EOF err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"` if test -z "$err"; then TZFILE_H=1 DEFS="$DEFS -DHAVE_TZFILE_H=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_TZFILE_H\${SEDdB}HAVE_TZFILE_H\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_TZFILE_H\${SEDuB}HAVE_TZFILE_H\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_TZFILE_H\${SEDeB}HAVE_TZFILE_H\${SEDeC}1\${SEDeD} " else DEFS="$DEFS -D'USE_SECSPERDAY=(long)60*60*24'" SEDDEFS="${SEDDEFS}\${SEDdA}USE_SECSPERDAY\${SEDdB}USE_SECSPERDAY\${SEDdC}(long)60*60*24\${SEDdD} \${SEDuA}USE_SECSPERDAY\${SEDuB}USE_SECSPERDAY\${SEDuC}(long)60*60*24\${SEDuD} \${SEDeA}USE_SECSPERDAY\${SEDeB}USE_SECSPERDAY\${SEDeC}(long)60*60*24\${SEDeD} " DEFS="$DEFS -DUSE_DAYSPERNYEAR=365" SEDDEFS="${SEDDEFS}\${SEDdA}USE_DAYSPERNYEAR\${SEDdB}USE_DAYSPERNYEAR\${SEDdC}365\${SEDdD} \${SEDuA}USE_DAYSPERNYEAR\${SEDuB}USE_DAYSPERNYEAR\${SEDuC}365\${SEDuD} \${SEDeA}USE_DAYSPERNYEAR\${SEDeB}USE_DAYSPERNYEAR\${SEDeC}365\${SEDeD} " fi rm -f conftest* if test -n "$TZFILE_H"; then echo checking for SECSPERDAY cat > conftest.c < main() { exit(0); } t() { long b = SECSPERDAY; } EOF if eval $compile; then DEFS="$DEFS -DHAVE_SECSPERDAY=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_SECSPERDAY\${SEDdB}HAVE_SECSPERBFSP.SAV2 [FSP]CONFIGURE.;1OBJ;2E24DAY\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_SECSPERDAY\${SEDuB}HAVE_SECSPERDAY\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_SECSPERDAY\${SEDeB}HAVE_SECSPERDAY\${SEDeC}1\${SEDeD} " else echo checking for SECS_PER_DAY cat > conftest.c < main() { exit(0); } t() { long b = SECS_PER_DAY; } EOF if eval $compile; then DEFS="$DEFS -DUSE_SECSPERDAY=SECS_PER_DAY" SEDDEFS="${SEDDEFS}\${SEDdA}USE_SECSPERDAY\${SEDdB}USE_SECSPERDAY\${SEDdC}SECS_PER_DAY\${SEDdD} \${SEDuA}USE_SECSPERDAY\${SEDuB}USE_SECSPERDAY\${SEDuC}SECS_PER_DAY\${SEDuD} \${SEDeA}USE_SECSPERDAY\${SEDeB}USE_SECSPERDAY\${SEDeC}SECS_PER_DAY\${SEDeD} " else DEFS="$DEFS -D'USE_SECSPERDAY=(long)60*60*24'" SEDDEFS="${SEDDEFS}\${SEDdA}USE_SECSPERDAY\${SEDdB}USE_SECSPERDAY\${SEDdC}(long)60*60*24\${SEDdD} \${SEDuA}USE_SECSPERDAY\${SEDuB}USE_SECSPERDAY\${SEDuC}(long)60*60*24\${SEDuD} \${SEDeA}USE_SECSPERDAY\${SEDeB}USE_SECSPERDAY\${SEDeC}(long)60*60*24\${SEDeD} " fi rm -f conftest* fi rm -f conftest* echo checking for DAYSPERNYEAR cat > conftest.c < main() { exit(0); } t() { int b = DAYSPERNYEAR; } EOF if eval $compile; then DEFS="$DEFS -DHAVE_DAYSPERNYEAR=1" SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_DAYSPERNYEAR\${SEDdB}HAVE_DAYSPERNYEAR\${SEDdC}1\${SEDdD} \${SEDuA}HAVE_DAYSPERNYEAR\${SEDuB}HAVE_DAYSPERNYEAR\${SEDuC}1\${SEDuD} \${SEDeA}HAVE_DAYSPERNYEAR\${SEDeB}HAVE_DAYSPERNYEAR\${SEDeC}1\${SEDeD} " else echo checking for DAYS_PER_NYEAR cat > conftest.c < main() { exit(0); } t() { int b = DAYS_PER_NYEAR; } EOF PFSP.SAV2 [FSP]CONFIGURE.;1OBJ;2E 7if eval $compile; then DEFS="$DEFS -DUSE_DAYSPERNYEAR=DAYS_PER_NYEAR" SEDDEFS="${SEDDEFS}\${SEDdA}USE_DAYSPERNYEAR\${SEDdB}USE_DAYSPERNYEAR\${SEDdC}DAYS_PER_NYEAR\${SEDdD} \${SEDuA}USE_DAYSPERNYEAR\${SEDuB}USE_DAYSPERNYEAR\${SEDuC}DAYS_PER_NYEAR\${SEDuD} \${SEDeA}USE_DAYSPERNYEAR\${SEDeB}USE_DAYSPERNYEAR\${SEDeC}DAYS_PER_NYEAR\${SEDeD} " else DEFS="$DEFS -DUSE_DAYSPERNYEAR=365" SEDDEFS="${SEDDEFS}\${SEDdA}USE_DAYSPERNYEAR\${SEDdB}USE_DAYSPERNYEAR\${SEDdC}365\${SEDdD} \${SEDuA}USE_DAYSPERNYEAR\${SEDuB}USE_DAYSPERNYEAR\${SEDuC}365\${SEDuD} \${SEDeA}USE_DAYSPERNYEAR\${SEDeB}USE_DAYSPERNYEAR\${SEDeC}365\${SEDeD} " fi rm -f conftest* fi rm -f conftest* fi echo checking for string.h declaring some functions incorrectly echo "$DEFS #include #include " > conftest.c $CC conftest.c -o conftest $LIBS > conftest.out 2>&1 if grep "conflicting types for built-in function" conftest.out >/dev/null; then DEFS="$DEFS -DSTRING_H_BOGUS=1" SEDDEFS="${SEDDEFS}\${SEDdA}STRING_H_BOGUS\${SEDdB}STRING_H_BOGUS\${SEDdC}1\${SEDdD} \${SEDuA}STRING_H_BOGUS\${SEDuB}STRING_H_BOGUS\${SEDuC}1\${SEDuD} \${SEDeA}STRING_H_BOGUS\${SEDeB}STRING_H_BOGUS\${SEDeC}1\${SEDeD} " fi rm -f conftest* echo checking for vprintf cat > conftest.c < conftest.c < conftest.c < config.status </dev/null`: # # $0 $* for arg do case "\$arg" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) exec /bin/sh $0 $* ;; *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;; esac done trap 'rm -f Makefile include/tweak.h conftest*; exit 1' 1 3 15 LN_S='$LN_S' CC='$CC' CPP='$CPP' EX_LIBS='$EX_LIBS' PARALLEL_MAKE='$PARALLEL_MAKE' INSTALL='$INSTALL' INSTALL_PROGRAM='$INSTALL_PROGRAM' INSTALL_DATA='$INSTALL_DATA' RANLIB='$RANLIB' LIBS='$LIBS' srcdir='$srcdir' prefix='$prefix' exec_prefix='$exec_prefix' prsub='$prsub' EOF cat >> config.status <<\EOF top_srcdir=$srcdir for file in .. Makefile; do if [ "x$file" != "x.." ]; then srcdir=$top_srcdir # Remove last slash and all that follows it. Not all systems have dirname. dir=`echo $file|sed 's%/[^/][^/]*$%%'` if test "$dir" != "$file"; then test "$top_srcdir" != . && srcdir=$top_srcdir/$dir test ! -d $dir && mkdir $dir fi echo creating $file rm -f $file echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file sed -e " $prsub s%@LN_S@%$LN_S%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@EX_LIBS@%$EX_LIBS%g s%@PARALLEL_MAKE@%$PARALLEL_MAKE%g s%@INSTALL@%$INSTALL%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@RANLIB@%$RANLIB%g s%@LIBS@%$LIBS%g s%@srcdir@%$srcdir%g s%@DEFS@%-DHAVE_CONFIG_H%" $top_srcdir/${file}.in >> $file fi; done echo creating include/qTFSP.SAV2 [FSP]CONFIGURE.;1OBJ;2E@tweak.h # These sed commands are put into SEDDEFS when defining a macro. # They are broken into pieces to make the sed script easier to manage. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME # is the cpp macro being defined and VALUE is the value it is being given. # Each defining turns into a single global substitution command. # # SEDd sets the value in "#define NAME VALUE" lines. SEDdA='s@^\([ ]*\)#\([ ]*define[ ][ ]*\)' SEDdB='\([ ][ ]*\)[^ ]*@\1#\2' SEDdC='\3' SEDdD='@g' # SEDu turns "#undef NAME" with trailing blanks into "#define NAME VALUE". SEDuA='s@^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' SEDuB='\([ ]\)@\1#\2define\3' SEDuC=' ' SEDuD='\4@g' # SEDe turns "#undef NAME" without trailing blanks into "#define NAME VALUE". SEDeA='s@^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' SEDeB='$@\1#\2define\3' SEDeC=' ' SEDeD='@g' rm -f conftest.sed cat > conftest.sed <> config.status <> config.status <<\EOF CONFEOF rm -f conftest.h # Break up the sed commands because old seds have small limits. cp $top_srcdir/include/tweak.h.in conftest.h1 while : do lines=`grep -c . conftest.sed` if test -z "$lines" || test "$lines" -eq 0; then break; fi rm -f conftest.s1 conftest.s2 conftest.h2 sed 20q conftest.sed > conftest.s1 # Like head -20. sed 1,20d conftest.sed > conftest.s2 # Like tail +21. sed -f conftest.s1 < conftest.h1 > conftest.h2 rm -f conftest.s1 conftest.h1 conftest.sed mv conftesGZ}}nxeo\D _\2{`BW P=b-Ex'8ui]jT_2o[cLh* T+57.O ,g"Z ]} ,E?q <,%N?>'pk_{7{t wod8~L%&AB>Ll SD3&p}"op]>]7$iS6!xJ5 R .*0b`lSdr{*2o:#0JY'S!Z%wk}'h\9U~Jqf`xH{O0M'q%Mv40)NS%VY8)^S\z0i%D2Fd@!)XKrjW5=&Lgxx*b-\IPK,7)G!#][ev~t@4mzL;C;,Z( yW m6pd@@#Q%kF+.y^.gHA  H3|p@-D <@|T|+7Ga>FB,L8%gm3b d2?^;(c'(L/[:?f6iCFjCjX?5D^2<I5Mvc_s,q?6hJ_WN7@M:?"mmdEhU5da 1rNJ|= ^)u rftWW s!(`E 8wU~3o WmB]fT:g1y OJ;_2Db$"; /.mJ_ilPg=O 8@V0W:S[oYvYt wJ@JJBq).c];o _k ^z$M cc*3J&qQwkj*8}WKMI>,0PMaxImAA'5z:+S ID^PzWxQjR 1k[&VL,Wp_bz?lO{;V2y{bI( N(=xQV?4v #&1(B'7V7$;sY(zrW'}SCD\1 1]XfM%:myJJr_e)-(W]%^Ss">PZ..Xz*+mom.6C!?KM /,b8'`G 8B3c3(AJ_x~nVy6uQ !Sxt>t-9XhSRN{ >]]-F/ /1s[=;PATHw6p~TMe; mdw87T0`vb:0:(|EkH0-3{ $+Xo+^YO[t uHS JjJbDb%rHm-Vm'Dh\kn nb conftest.h cat conftest.h1 >> conftest.h rm -f conftest.h1 if cmp -s include/tweak.h conftest.h 2>/dev/null; then # The file exists and we would not be changing it. rm -f conftest.h else rm -f include/tweak.h mv conftest.h include/tweak.h fi EOF chmod +x config.status test -n "$no_create" || ./config.status *[FSP]CONFIGURE.IN;1+,3. /F 4i - 0123KPWO 56mGICl76zO҃89GFHJdnl Process this file with autoconf to produce a working configure script. AC_INIT(Makefile.in) AC_CONFIG_HEADER(include/tweak.h) AC_LN_S AC_PROG_CC AC_ISC_POSIX echo checking for DYNIX/ptx FSP_PROGRAM_GREP(yes, [#if defined(_SEQUENT_) yes #endif ], SEQUENT=1,) if test -n "$SEQUENT"; then EX_LIBS="-lsocket -linet -lnsl -lseq" PARALLEL_MAKE='\&' CC='cc' GCC= echo You"'"re on Sequent.. Using cc and parallel make fi echo checking for SunOS 5.1 FSP_PROGRAM_GREP(yes, [#if defined(SVR4) && defined(SPARC) yesaFSP.SAV3 [FSP]CONFIGURE.IN;1i  #endif ], SUNOS51=1,) if test -n "$SUNOS51"; then EX_LIBS="-lsockect -lnsl" fi AC_SUBST(EX_LIBS) AC_SUBST(PARALLEL_MAKE) AC_AIX echo checking for DGUX FSP_PROGRAM_GREP(yes, [#if defined(DGUX) yes #endif], DGUX=1,) AC_PROG_INSTALL AC_PROG_RANLIB AC_DIR_HEADER echo checking for ansi-style prototypes AC_TEST_PROGRAM([main(int argc,char **argv){exit(0);}], AC_DEFINE(HAVE_ANSI_PROTO),,) if test -n "$GCC"; then AC_DEFINE(HAVE_ANSI_PROTO) fi AC_STDC_HEADERS AC_HAVE_HEADERS(string.h memory.h strings.h) AC_LONG_FILE_NAMES echo checking for word sizes AC_TEST_PROGRAM([ main(){ exit(sizeof(unsigned)!=2); }], AC_DEFINE(SIZE_INT_2)) AC_TEST_PROGRAM([ main(){ exit(sizeof(unsigned)!=4); }], AC_DEFINE(SIZE_INT_4)) AC_TEST_PROGRAM([ main(){ exit(sizeof(short)!=2); }], AC_DEFINE(SIZE_SRT_2)) AC_TEST_PROGRAM([ main(){ exit(sizeof(long)!=4); }], AC_DEFINE(SIZE_LNG_4)) AC_UNISTD_H FSP_MODE_T FSP_PID_T FSP_SIZE_T FSP_UID_T FSP_NLINK_T AC_FUNC_CHECK(bsearch , , AC_DEFINE(bsearch, ansi_bsearch)) AC_FUNC_CHECK(random , , AC_DEFINE(NEED_RANDOM)) AC_FUNC_CHECK(strdup, , AC_DEFINE(NEED_STRDUP)) AC_FUNC_CHECK(bcopy, , AC_DEFINE(NEED_BCOPY)) AC_FUNC_CHECK(flock, AC_DEFINE(HAVE_FLOCK), ) AC_FUNC_CHECK(lockf, AC_DEFINE(HAVE_LOCKF), ) echo checking for shmget LOCKPATH="conftestlock" AC_TEST_PROGRAM([ #include #include #include #include #define LOCKPATH "$LOCKPATH" main() { key_t ky; int sh, rv, fd; fd = open(LOCKPATH, O_RDWR | O_CREAT, 0666); if (fd == -1) exit(1); LFSP.SAV3 [FSP]CONFIGURE.IN;1D.C;3i  rv = 0; ky = ftok(LOCKPATH, 2001); if (ky == (key_t) -1) rv = 1; else { struct shmid_ds foo; sh = shmget(ky, 1, IPC_CREAT | 0666); if (sh == -1) rv = 1; else shmctl(sh, IPC_RMID, &foo); } close(fd); exit(rv); }], AC_DEFINE(HAVE_SHMEM)) rm -f $LOCKPATH conftest.c AC_COMPILE_CHECK(d_ino, [#ifdef DIRENT #include #else #ifdef SYSDIR #include #else #ifdef SYSNDIR #include #endif #endif #endif], [ #ifdef DIRENT struct dirent *dp; #else struct direct *dp; #endif int a ; a=dp->d_ino;], AC_DEFINE(HAVE_D_INO), ) AC_COMPILE_CHECK(d_fileno, [#ifdef DIRENT #include #else #ifdef SYSDIR #include #else #ifdef SYSNDIR #include #endif #endif #endif], [ #ifdef DIRENT struct dirent *dp; #else struct direct *dp; #endif int a ; a=dp->d_fileno;], AC_DEFINE(HAVE_D_FILENO), ) if test -z "$DGUX"; then AC_COMPILE_CHECK(union wait,[#include #include ], [union wait u ; ], AC_DEFINE(HAVE_UNION_WAIT),) fi AC_COMPILE_CHECK(WEXITSTATUS, [#ifdef HAVE_UNISTD_H #ifndef __hpux #include #endif #endif #include #include ], [ #if defined(HAVE_UNION_WAIT) && !defined(__hpux) union wait foo; #else int foo; #endif WEXITSTATUS(foo);], AC_DEFINE(HAVE_WEXITSTATUS), ) AC_COMPILE_CHECK(S_ISREG, [#include #include ], [struct stat sb; return S_ISREG(sb.st_mode);], AC_DEFINE(HAVE_S_ISREG), ) AC_COMPILE_CHECK(S_ISDIR, [#include #include ], MFSP.SAV3 [FSP]CONFIGURE.IN;1D.OBJ;1i [struct stat sb; return S_ISDIR(sb.st_mode);], AC_DEFINE(HAVE_S_ISDIR), ) AC_HEADER_CHECK(tzfile.h, [TZFILE_H=1 AC_DEFINE(HAVE_TZFILE_H)], [AC_DEFINE(USE_SECSPERDAY, (long)60*60*24) AC_DEFINE(USE_DAYSPERNYEAR, 365)]) if test -n "$TZFILE_H"; then AC_COMPILE_CHECK(SECSPERDAY, [#include ], [long b = SECSPERDAY;], AC_DEFINE(HAVE_SECSPERDAY), [AC_COMPILE_CHECK(SECS_PER_DAY, [#include ], [long b = SECS_PER_DAY;], AC_DEFINE(USE_SECSPERDAY, SECS_PER_DAY), AC_DEFINE(USE_SECSPERDAY, (long)60*60*24))]) AC_COMPILE_CHECK(DAYSPERNYEAR, [#include ], [int b = DAYSPERNYEAR;], AC_DEFINE(HAVE_DAYSPERNYEAR), [AC_COMPILE_CHECK(DAYS_PER_NYEAR, [#include ], [int b = DAYS_PER_NYEAR;], AC_DEFINE(USE_DAYSPERNYEAR, DAYS_PER_NYEAR), AC_DEFINE(USE_DAYSPERNYEAR, 365))]) fi echo checking for string.h declaring some functions incorrectly echo "$DEFS #include #include " > conftest.c $CC conftest.c -o conftest $LIBS > conftest.out 2>&1 if grep "conflicting types for built-in function" conftest.out >/dev/null; then AC_DEFINE(STRING_H_BOGUS) fi rm -f conftest* AC_VPRINTF if test -z "$GCC"; then AC_CONST fi AC_OUTPUT(Makefile) 2& FSP.SAV4 [FSP]DESCRIP.MMS;1MD.OBJ;1P *[FSP]DESCRIP.MMS;1+,4./F 4P- 0123KPWO56,JCl7O҃89GFHJ!========================================================================== ! MMS description file for VMS-fsp V2.7.0 May 17, 1993 !========================================================================== ! ! 27 Dec 92 Original by S.A.Pechler, ! 3 Jan 93 Modified for version V2.6.5 ! 28 Jan 93 Modified for version V2.6.5jt.3 ! 11 Feb 93 Modified for version V2.6.5jt.7 ! 5 Mar 93 Modified for version V2.6.5jt.8 ! 17 May 93 Modified for version V2.7.0 ! To build the VMS-FSP clients ! ---------------------------- ! For UCX: mms /MACRO=(UCX=1) ! For Multinet: mms /MACRO=(MUL=1) ! For Multinet without ucx$ipc library: mms /MACRO=(LIB=1) ! (One-time users will find it easier to use the MAKECLIENT.COM command ! file, which generates the client software. Just type "@MAKECLIENT" from ! within the [.fsp.vms] directory .) ! To build the VMS-FSP server ! --------------------------- ! For UCX: mms server /MACRO=(UCX=1) ! For Multinet: mms server /MACRO=(MUL=1EOFSP.SAV4 [FSP]DESCRIP.MMS;1D.C;3P=f) ! For Multinet without ucx$ipc library: mms server /MACRO=(LIB=1) ! (One-time users will find it easier to use the MAKESERVER.COM command ! file, which generates the server software. Just type "@MAKESERVER" from ! within the [.fsp.vms] directory.) ! To build the fsp-server without shared libraries, ! mms noshare ! To delete unnecessary .OBJ files, ! mms clean ! There's no mms-makefile for the merge files, use [.vms]MAKEMERGE.COM ! instead. !============================================================================ ! This is where you want to install the binary (only when using the ! 'install' option). ! BIN=pool:[bdaasp] !============================================================================ ! The following variable defines the compiler to use in your compilation. ! CC = cc !CC=gcc !============================================================================ ! Flags for the compiler. ! .IFDEF DEBUG CFLAGS = /def=(DEBUG=1) \ /include=[.include.vms] /object=$@ .ELSE CFLAGS = /nodebug /include=[.include.vms] /object=$@ .ENDIF !============================================================================ ! Linker command ! LD = link .IFDEF DEBUG LDFLAGS = .ELSE LDFLAGS = /notrace .ENDIF !============================================================================ ! Linker libraries ! .IFDEF UCX LDLIB = [.vms]ucxshare.opt .ELSE .IFDEF LIB LDLIB = [.vms]libshare.opt .ELSE LDLIB = [.vms]mulshare.opt .ENDIF .ENDIF !can't do 3 recursive .IFDEF's .IFDEF TGV LDLIB = [.vms]tgvshare.opt .ENRFSP.SAV4 [FSP]DESCRIP.MMS;1D.C;3PDIF EXE = O = .obj; SERVER = fspd.exe CLIENTS = flscmd.exe, fcdcmd.exe, fgetcmd.exe, frmcmd.exe, frmdircmd.exe,\ fprocmd.exe, fmkdir.exe, fput.exe, fver.exe, fcatcmd.exe,\ fgrabcmd.exe, fducmd.exe, ffindcmd.exe, fhostcmd.exe ICLIENTS = $(BIN)flscmd.exe, $(BIN)fcdcmd.exe, $(BIN)fgetcmd.exe, \ $(BIN)frmcmd.exe, $(BIN)frmdircmd.exe, $(BIN)fprocmd.exe, \ $(BIN)fmkdir.exe, $(BIN)fput.exe, $(BIN)fver.exe, \ $(BIN)fcatcmd.exe, $(BIN)fgrabcmd.exe MISC_OBJ = [.vms_src]miscvms$(O),[.vms_src]convpath$(O) SERVER_OBJ = [.server]main$(O),[.server]lib$(O),[.server]host$(O),\ [.server]conf$(O),[.server]file$(O),[.server]filecache$(O),\ [.common]udp_io$(O),[.common]random$(O),[.common]strdup$(O),\ [.vms_src]vmsreaddir$(O),[.vms_src]vmsmain$(O),$(MISC_OBJ) CLIENT_OBJ = [.client]lib$(O),[.client]util$(O),[.client]lock$(O),\ [.common]udp_io$(O),[.vms_src]vmsmain$(O) GLOB_OBJ = [.bsd_src]glob$(O) UTIL_LS_OBJ = [.bsd_src]cmp$(O),[.bsd_src]ls$(O),[.bsd_src]print$(O), \ [.bsd_src]util$(O),[.vms_src]getopt$(O),$(GLOB_OBJ) UTIL_PROC_OBJ = [.bsd_src]find$(O),[.bsd_src]option$(O),[.bsd_src]operator$(O),\ [.bsd_src]function$(O),[.bsd_src]fnmatch$(O) GETOPT_OBJ = [.vms_src]getopt$(O) LDFLAGS2 = default : init $(CLIENTS) @ ! Do nothing. install : init $(ICLIENTS) @ ! Do nothing. server : init $(SERVER) @ ! Do nothing. init : !descrip.mms .IFDEF UCX $def/nolog c$include [.include] $bLFSP.SAV4 [FSP]DESCRIP.MMS;1D.OBJ;1Pˮ def/nolog sys sys$library $def/nolog netinet sys$library .ELSE $def/nolog c$include [.include] $def/nolog sys multinet_root:[multinet.include.sys] $def/nolog netinet multinet_root:[multinet.include.netinet] .ENDIF fspd.exe : $(SERVER_OBJ) $(LD) /exe=FSPD.EXE $(LDFLAGS) $(SERVER_OBJ), $(LDLIB)/options flscmd.exe : [.clients]flscmd$(O), $(CLIENT_OBJ), $(UTIL_LS_OBJ) $(LD) $(LDFLAGS) [.clients]flscmd$(O),$(CLIENT_OBJ),$(UTIL_LS_OBJ),\ $(LDLIB)/options fcdcmd.exe : [.clients]fcdcmd$(O), $(CLIENT_OBJ), $(GLOB_OBJ) $(LD) $(LDFLAGS) [.clients]fcdcmd$(O),$(CLIENT_OBJ),$(GLOB_OBJ),\ $(LDLIB)/options fgetcmd.exe : [.clients]fgetcmd$(O), $(CLIENT_OBJ), $(MISC_OBJ),\ $(GETOPT_OBJ), $(GLOB_OBJ) $(LD) $(LDFLAGS) [.clients]fgetcmd$(O),$(CLIENT_OBJ),$(MISC_OBJ),\ $(GETOPT_OBJ),$(GLOB_OBJ),$(LDLIB)/options frmcmd.exe : [.clients]frmcmd$(O), $(CLIENT_OBJ), $(GLOB_OBJ) $(LD) $(LDFLAGS) [.clients]frmcmd$(O), $(CLIENT_OBJ), $(GLOB_OBJ), \ $(LDLIB)/options frmdircmd.exe : [.clients]frmdircmd$(O), $(CLIENT_OBJ), $(GLOB_OBJ) $(LD) $(LDFLAGS) [.clients]frmdircmd$(O), $(CLIENT_OBJ), $(GLOB_OBJ), \ $(LDLIB)/options fprocmd.exe : [.clients]fprocmd$(O), $(CLIENT_OBJ), $(GLOB_OBJ) $(LD) $(LDFLAGS) [.clients]fprocmd$(O), $(CLIENT_OBJ), $(GLOB_OBJ), \ $(LDLIB)/options fmkdir.exe : [.clients]fmkdir$(O), $(CLIENT_OBJ) $(LD) $(LDFLAGS) [.clients]fmkdir$(O), $(CLIENT_OBJ), \ $(LDLIB)/opd8FSP.SAV4 [FSP]DESCRIP.MMS;1D.C;3P tions fput.exe : [.clients]fput$(O), $(CLIENT_OBJ) $(LD) $(LDFLAGS) [.clients]fput$(O), $(CLIENT_OBJ), \ $(LDLIB)/options fver.exe : [.clients]fver$(O), $(CLIENT_OBJ) $(LD) $(LDFLAGS) [.clients]fver$(O), $(CLIENT_OBJ), \ $(LDLIB)/options fcatcmd.exe : [.clients]fcatcmd$(O), $(CLIENT_OBJ), $(GLOB_OBJ),\ $(GETOPT_OBJ) $(LD) $(LDFLAGS) [.clients]fcatcmd$(O), $(CLIENT_OBJ), $(GLOB_OBJ), \ $(GETOPT_OBJ),$(LDLIB)/options fgrabcmd.exe : [.clients]fgrabcmd$(O), $(CLIENT_OBJ), $(MISC_OBJ),\ $(GETOPT_OBJ),$(GLOB_OBJ) $(LD) $(LDFLAGS) [.clients]fgrabcmd$(O),$(CLIENT_OBJ),$(MISC_OBJ),\ $(GETOPT_OBJ),$(GLOB_OBJ),$(LDLIB)/options fducmd.exe : [.clients]fducmd$(O),$(CLIENT_OBJ),$(GETOPT_OBJ),$(GLOB_OBJ) $(LD) $(LDFLAGS) [.clients]fducmd$(O),$(CLIENT_OBJ),$(GETOPT_OBJ),\ $(GLOB_OBJ),$(LDLIB)/options ffindcmd.exe : [.clients]ffindcmd$(O),$(CLIENT_OBJ),$(GLOB_OBJ),\ $(UTIL_PROC_OBJ),$(MISC_OBJ) $(LD) $(LDFLAGS) [.clients]ffindcmd$(O),$(CLIENT_OBJ),$(GLOB_OBJ),\ $(UTIL_PROC_OBJ),$(MISC_OBJ),$(LDLIB)/options fhostcmd.exe : [.clients]fhostcmd$(O),[.vms_src]vmsmain$(O),$(GETOPT_OBJ),\ $(MISC_OBJ) $(LD) $(LDFLAGS) [.clients]fhostcmd$(O),[.vms_src]vmsmain$(O),\ $(GETOPT_OBJ),$(MISC_OBJ),$(LDLIB)/options noshare : $(SERVER_OBJ) $(LD) $(LDFLAGS) $(SERVER_OBJ), \ sys$library:vaxcrtl.olb/library $(LDFLAGS2) clean : delete $(SERVER_OBJ), $(CLIENT_OBJ), $(GLOB_OBJ), $(UTIL_LS_OBJ) ! you may want to change this to 'delete *.obj;*' [.seuAFSP.SAV4 [FSP]DESCRIP.MMS;1D.C;3POrver]lib$(O) : [.server]lib.c [.include]server_def.h $(CC) $(CFLAGS) [.server]lib.c .IFDEF DEBUG $(CC) $(CFLAGS) /def=(DIRENT=1,DEBUG=1) [.server]file.c .ENDIF [.client]util$(O) : [.client]util.c [.include]client_def.h $(CC) $(CFLAGS) [.client]util.c [.bsd_src]util$(O) : [.bsd_src]util.c [.include.vms]tweak.h $(CC) $(CFLAGS) [.bsd_src]util.c [.client]lib$(O) : [.client]lib.c [.include]client_def.h $(CC) $(CFLAGS) [.client]lib.c !all other sources have default compilation rules. *[FSP]EXAMPLE.CONF;1+,5. /F 4N - 0123KPWO 56L69LCl74O҃89GFHJ# This is an example fspd.conf file. Copy it and edit it to suit your tastes. # The 'conf' command allows a global file to read local files so that # multiple users at a site can use the same central fspd file. # # conf .fspd.conf # The 'readme' commands specifies the name of the local readme file # for each directory. If no readme command is given, the readme file # defaults to .README # # readme .README # The usecachedir command tells the server if it's going to be using a # cache directory on if it$(Wrtz Z3q1IC fA7w#<~CwuPOPMM,,}):x]"Pck%& }ZMu*tD^8 x^.*5[f+,00ztV`Z>^zM???{DbmuK5dSN3{n]0^lD8wB}fZt3Wq)Z"0K}K1&Y%A7LJCD6bE;((`yA+n{*'( C8x'MƁ % "rthNycj{Zq>u50s`4+f~=3VC5x GfI4z>M* r zX_\(]Jd%)h \~p2kVMzx4._uw7t@D:aPi)wc\#;MZRpFX]wdK rJ*tSHQ2&dCxl?QxBUCM3hb0Xki X" s/qIh5fg*x F$jnv/7 e& rsZ1w1B/VpRoCrrxsh!=dO]_:}G[v%yx:95oM6v)u^ SFm,_93Z  VYB2KHN\~T<DGn|11}eNdrriGzqd-"MA[QlvQMO8DrR)rxJWy1{(JLBv w= V//%,\OiuhTT@G::VmmLyCK(3UzsQ F92$.,Ll?";]5t_N"0WW;a };.v)kr8K"d(/;h|me>T|?yu|GCHxTo;q)#P`[V`*^NeE|um>"0>3"'H 0BO iBWEM7n8q/9mBo]gfa"9+I$fw' M,cPL PI>$wh"h&+s,jyK H RW4pi#~=M I Ag:_d>-5hu?X|zjx68C [|tCgddu&kD" o o6wGv3>7g6+2> tS6u +,efA`t rG CQhQ-x 7gG< . lzlh:78|F?r8N +=uQ2kYVUye ,{\ Y<7C<9_56}d 0i@O3o!:m98M|)^9UKjg~UfqL7VOtRBI[69gw#G 0p%yfDj &@ >tyBODyps:c/KUFSP.SAV5 [FSP]EXAMPLE.CONF;1.OBJ;1N R will be relying on .FSP_CONTENT files instead. # it accepts the parameters 'on' or 'off' # usecachedir on # The 'cachedir' command controls where the server thinks the cache # directory is located if the usecachedir command is set to 'on'. # This directory can be relative to the home directory or an absolute # path. # cachedir ../cache # The 'homedir' command tells the server where it's ROOT directory is. # This directory must be given as an absolute path. # homedir /usr/fsp/data # The 'logfile' command tells the server where to log things too if # logging is enabled. # It can be a relative path from the fspd home directory or an absolute # path. # it must include the filename. # logfile ../logs/logfile # The 'log' command specifies the type of logging that should be performed. # The log command takes the following options # 'none' or any of 'all', '(!)errors', '(!)version', '(!)getdir', # '(!)getfile', '(!)upload', '(!)install', '(!)delfile', '(!)deldir', # '(!)setpro', '(!)getpro', '(!)makedir', '(!)grabfile'. # logging of 'all' will include logging of errors. # for example: # log all !errors -- will log all commands sent, but no error messages. # log all !getdir -- will log all commands except getdir and all errors # EXCEPT those that occured on a getdir command. # log install getfile errors -- will log all install and getfile commands # as well as any errors that occur on ONLY those commands. # If no log command is given, logging will be turned of (same as 'log no aO.FSP.SAV5 [FSP]EXAMPLE.CONF;1.OBJ;1N 4ne') # log all # The 'port' command specifies which port the fspd server is to listen two. # This is NOT needed if running under inetd, but otherwise is required. # # port 21 # The 'thruput' command is used to specify the thruput control in avg # of # bytes per second that the server will allow. Use 'thruput off' to specify # no thruput control. A negative value or zero will also shut off thruput # control. If this command is not given, it acts like 'thruput off' # # thruput off # The 'setuid' command is used to specify a specific uid under which the # FSP server will run. Use 'setuid off' or 'setuid 0' in order to not # attempt to perform a setuid. If this command is not given, it acts like # 'setuid off' # # setuid off # The 'daemonize' command specifies whether the fspd should fork itself into # the background when started up. The only acceptable values are 'on' or # 'off'. If this command isn't given, it acts like 'daemonize off'. # # daemonize off # The 'debug' command specifies whether the server should write debugging # output to stderr while it is running. The only acceptable values are 'on' # or 'off'. If this command is never given, it acts like 'debug off'. # # debug off # The 'restricted' command specifies whether the server is run in restricted # mode. In this case, only hosts enabled via the 'host' command will be # able to connect. The only acceptable values for this command are 'on' or # 'off'. If the command isn't given, it acts as 'restricted off'. # # restricted off # The '!$W FSP.SAV5 [FSP]EXAMPLE.CONF;1MD.C;3N ereverse_name' command specifies if the server refuses connections to # sites that it cannot reverse lookup. The only acceptable values for this # command are 'on' or 'off'. If the command is not given, it acts like # 'reverse_name off' by default. # # reverse_name off # The 'read_only' command specifies whether the server should ignore any # command that would cause a 'write' action on the server. The commands # that are refused by this are upload, install, mkdir, deldir, delfile, # and setpro. The only acceptable values for this command are 'on' or 'off'. # If the command is not given, it acts like 'read_only off'. # # read_only off # The 'host' command subsumes the function of the .IPHOSTS file from # previous versions. Each line looks as follows. (information in [] # is optional) # host host_mask [host_type message] # # host_mask is either the full numeric or text name of a machine OR # a wildcarded host mask. # wildcarded hostmasks look as follows. # 128.4 - 8.*.* -- (* acts as the range 0 - 255) # The above line would affect all hosts of the form 128.4.*.*, 128.5.*.*, # 128.6.*.*, 128.7.*.* and 128.8.*.*. # This sort of host masking is only available with numeric hosts, not with # text names. # host_type is one of D, I, or N. # I hosts are ignored, N hosts are treated as normal, and D hosts will # get back the error string message given as the third parameter. # # If host_type isn't specified, the host is treated as ignored or normal # depending on the value"vRlFSP.SAV5 [FSP]EXAMPLE.CONF;1MD.C;3N B of restricted. # # The following line allows all CMU machines (128.2.*.*) access to a site. # host 128.2.*.* N This message is useless here. *[FSP]FCATCMD.EXE;1+,6./F 4- 0123 KPWO56LDl7O҃89GFHJ0D`0205Dl6D'FCATCMDV1.0,;Dl05-13  ? ! VAXCRTL_001$+CMA$TIS_SHR_001! LIBRTL_001Q! MTHRTL_001#QFSP.SAV6 [FSP]FCATCMD.EXE;1CMD.C;3:rR Remote server not responding. IsendtoEsocket openserver addr//%s/%s/%s%s: %s directory reading out of memory %luk %lu downloading %s: %s %luk : %s [%db/s] Warning, unexpected grab error: %s %luk %lu uploading %s: %s %luk : %s [%db/s] FSP_HOSTNo FSP_HOST specified. FSP_PORTNo FSP_PORT specified. FSP_DIRNo FSP_DIR specified. FSP_LOCALPORT0FSP_PASSWORDFSP_TRACEFSP_BUF_SIZEFSP_DELAYFSP_LOCAL_DIR.FSP_TIMEOUT/.....%s: %s skipping remote directory `%s' remote file `%s' is not a file or directory! %s: illegal option -- %c %s: option requires an argument -- %c `{[*?Pathname too longOut of memory 1Arguments too longBad directory componentsBad directory componentsBad directory components{{}Out of memory 2{{}$Ba FSP.SAV6 [FSP]FCATCMD.EXE;1CMD.OBJ;1<@(#)glob.c 5.4 (Berkeley) 6/29/88LNX+T+P+L+H+D+@+<+8+4+0+,+(+$+ +++++ ++++****************^P^*ݬ ^Ѽ PPP ^XV߯ ))P;hެScެRb6Pff'PfrWhcbPff$RxRRR%ͩFSP.SAV6 [FSP]FCATCMD.EXE;1CMD.OBJ;1g4ռPUPЬSc%PR ޭRcԭb#TS|~TSW݂ebռ(^Wd[TSݬ PcSݬPc#Ь YVYRYRЬR֬bYRYRЬYYRYRЬR֬bYRYRRRVnPS<~tPc<RxRRʏRR R<SʏSˏRRS QnXXUXRXRPPUXPXPURURRծ Ѯ1[Px%RnRRR  1PRR kkgC'\լ#ѮߧD'' ' x kߧ"&ݮ dPߧ$&&&PxdVVkߧ+&ݮ ߭5P &1P1߭< ~dPѭ 1SSRYSQUQR PPUQRUPUPˏPUUY1<~PZ Ps PPPʏPa ZPPW<PPP<~JPTm"PRO\"PRRRR"P[T[N"O,"ScPRTcPRRcPRRR"P[T@[![Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬ. P^cYXe ZݬbPԮ W[Ԯ[1ծ1?hݮݮPݮA~PUe@& ݬߩݮ jP<~YPVd[QnPЮR RP QP{RPQPQݬ VRRRߣ^hYh<P^YTݬfPSP`$ߤsSSSB~ݬ ݬSݬVݬ7PWWP WēsWSޭޮQޭޮPޭ ޮ Uďc/ SS  S о RbPb/ SRR RbЮ Rđ ݭPU1ХSc1ݭcP P1cPRRЬPA  PЬP cPPP ЬP  ЬP ЬRԢcPݠPݳ{P&P"PURbQס RWxPSc1OUScPנ SYWPP|^TVݬPSЦRPSݢPbRR}ĕЬUUPhėUPW?S~SPA~%PRb@*S UĚ Pf dufSSP^ݬPR 0ARP<^uZVݬ$P ݬ>gDra?-s4 ׯz0̗8aB*ѯ#õ#YqmUsɑ2 эVJpn"ו a)}j5ݪB7f\uPy$~^-! ń*\Xf8J{,y7>&>L"e*DaN<Ӽx,T}dʐT(Vԓ oH# Uȓ8ʋE_D46eh{F i W4 voLyS[Tŝ .Q7SȽ\4ymZELZ8wIH%]07?_uؤQqT^ߨ G5̐"a$Vh BRq:.e+Ge+G຅T? -lg;}1K4dVE:/+j*f>̕ <۲b%UOxn>I%ܝ=-uPq9sH0&yJ{wѰ XL˺ <,n!e6h \g< ʂH5Y7URo"O9ѲhV=P[`Un oA^J|ž\nTΨbR=Q& 4/~ 33.7DfFyhV[vwV\uSvw6=ZwG''X##itP2vh{NOZ|u2T` 9RrQ!vϫ~}^F bY?*UmFSP.SAV6 [FSP]FCATCMD.EXE;1MD.C;3fYXWeU;ggR޼PB`e-ަePeRRe- gަePeRebhh:hݬ wPRPh-Pg4]~ЬTdMPSdSPShSߦr?PRb: ikggeRbRiUgѬgBަe]~ЬScPRcRRhRߦ5 ?PgP޼R@biަEeghP^STެWзެUTeTVDfQQRa  RQa aPa aSPSR@QRQab SPSR@TTeݬ S^ЬP`PQQP`P ^SRQaPPRP PaPP{RPRRPP0P ^1S&QСkݣ8P ZީWk$%$P.xdVVkߧ+$ݮ ߭5P $1P1߭< ~dPѭ 1SSRYSQUQR PPUQRUPUPˏPUUY1<~PZ Ps PPPʏPa ZPPW<PPP<~2?FSP.SAV9 [FSP]FCDCMD.EXE;1BCMD.OBJ;1* PT1 PR PRRRP[T[OScPRTcPRRcPRRRP[TD[[Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬP^gYXZݬbPԮ W[Ԯ[1ծ1?hݮݮPݮA~PUe@& ݬߩwhݮ jP<~PV<3heFSP.SAV9 [FSP]FCDCMD.EXE;1TCMD.C;3W PVP TP[PSVPVRPPRPRPV[V [ծ1T[<n[nSQVQ OPP*FPV< S QPQTTSRʏRSQTSPʏPVPRRS~4PUWWVRRxR~ݮPPWVRRxR~PUծݮ.ߩPSЮVV kPP*bP GЮPUG VRRPRP PVTTSRʏRPSUVTSPʏPW[ GЮPRRVRU[[RRSRTS1PTRTR1^SUZ(T5XЬPRV[?e~ݬPVݬPRCd[>d[QnPЮR RP QP{RPQPQݬ VRRRߣ^hhP^]TݬfPSP`$ߤsShSYSB~ݬ ݬSݬ{EjBphY+ƺM-Lf![T`wF\֛;}C|hK+04i>P1.wk4.9/Ao/x%'uo6,•kHQ_Ú4Ѫ[)!WyvVR>]E:sWk]x"i*vg(l2TU ֳHX멉Rvu)Wnpw=b:R l.o~-ch-9MKkjHW! HK Sش{3+paLRCwn(~%g/XN6kc^e!!Ie}^(my*y{ o<{e^߸6T;n+3Yfwx((ՏT<]CY|`42ֳ܂jo$N$1%e?aqav rYx7}w j,-K _y/,Uݿ̹6y8@ .;Ur @0Ǝ ~ 3׋D鰱c\i 㾴r]٘' "z[3PEq~Xu%yKG  <*|KZArMol@(T<LrA D+/[j/j*dˬH~tNB$I8M8S651))nMvʅݥ7SX JzTW\W!ԏ-Uml[Ųs7!{ ?.j6j,b`҃sr1\Qt״*Î4PKhPHD򧁁/]xjdc6V.X3Ǡ` p4H^]lHšB8i #SԠU ZftwzWAy_$֒ Yhx>Ѡ%]19Hכge0öOSe$laoaIٚ!0nW}mv(}0J2|fޚ8˾:P)O@ cdO/~nA2*և^7\q}m\TjbycD~V!<%:jA/gD87p*O53sll]2d(ĮE/ t87=|1}Ȫ? '%u*y/)?^gU]ڰٚyb"@LhgaՉ6zҾO2ƕ;zXa/^iJ5ϩ9FSP.SAV9 [FSP]FCDCMD.EXE;1TCMD.C;3^ V WRYU XTPdPdPpd]3bScPfAfCcPgPgRc\P\\\cPPPeekݣ8P ZީWk&CFSP.SAV< [FSP]FDUCMD.EXE;1TCMD.OBJ;1} PS<~|Pc<RxRRʏRR R<SʏSˏRRS QnXXUXRXRPPUXPXPURURRծ Ѯ1[PxRR{RRqk 1P\RRTN kkgG$\լ#ѮWߧH$5$($B x4/) kߧ"#ݮ dPߧ$###PxdVVkߧ+#ݮ ߭9P #1P1߭< ~dPѭ 1SSRYSQUQR PPUQRUPUPˏPUUY1<~PZ Ps PPPʏPa ZPPW<PPP<~RPTE!PR4!PRRR*!P[T[&!OB!ScPRTcPRR4cPRRR P[Tp[ [Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լLݬ?xT=\q|tz ~yy.83gn~K'ZP`q{|A&.@&)Bc !sJA@. *Cm"jx|ф;6xhjN5~}K:T6 S$l{{w?g[9thiV`8m!VY`D5: "^$ĥxQXQgr -(z[S#Pծ:~|kRL%#?IU xCcy1X\Sko CPB~YH˼Ocd}@\҄a/ 8ow{BܺS-tr`9@5Xԝ>!ӊU5+Ŭ HiON"CQ =IA}Rx9l=XmBF">~|={ykt=4F#d IEh[UrqyAR1 .𔘔r|(`Q?}]q\/*!Jy `p9T0_G*&-˸)Vx;J݉)3C{vAn7v.mpzKdhk5f>͐W]Awh.U| Omm˔23"kuC~GV R0?S*07@ $*Po-1l$^r<>b^OeսKq95c{7;. X?52;Xٍ?O'/NNLI޷yd$,n:&)K WN9jA DJ|gp9.8w_KM3*X~mعe~[-.AhoSW&x\rk.ŋtMR*sGuD87gzf*hkoY'"mpI iVKXћS:8P+\;cńD[U.*0g0r)_潌7i |\;|,``_dC9*l 9_1wd`cZ$+یb0֔lw M)}4mnUmB}Ov?UU7O98[si*~F(%)q: jg?G|5!VkX=.ױK/P3[Y ٚxcxR'Ͷ xY,n5̖L&?P"i1KISC_ЦM<1XgjqKH(:,¿*'P-sQ5XjЫM<6|" W8?G4XۗǧR֗dHE[aiirwL_޼uB}5p[aD3.8S}"@(*N+_ƒ!"V4]|jO) jI*[FSP]FDUCMD.EXE;1+,<./F 4- 0123 KPWO56,El7@O҃89GFHJ@*,FSP.SAV< [FSP]FDUCMD.EXE;1TCMD.OBJ;17 P^Y X=ZݬbPԮ W[Ԯ[1ծ1?hݮݮPݮA~PUe@& ݬߩݮ^ jP<~1PVd[QnPЮR RP QP{RPQPQݬ VRRRߣ^hEhP^TݬfPS!P`$ߤsS SSB~ݬ ݬSݬP߯SP<^UݬPTХRTݢPbRR3TPSPPRSTԢ ХbR PT֢ R`^ЬQaP Q ^5RЬPРScP  cP \PcP ЬPSP ^SRÏЬQa/Q Q P QмQaPa/ЬQ QQaЬPÑ`P ^aTrVݬ7PWWP WēsWSޭޮQޭޮPޭ ޮ Uďc/ SS  S о RbPb/ SRR RbЮ Rđ ݭPU1ХSc1ݭcP P1cPRRЬPA  PЬP cPPP ЬP  ЬP ЬRԢcPݠaPݳSP&P"PURbQס RYWPPSc1OUScPנ S1W(P|^TVݬPSBFSP.SAV< [FSP]FDUCMD.EXE;1TCMD.OBJ;1ЦRPSݢPbRR}ĕЬUUPhėUPW?S~SPA~PRb@*S UĚ Pf MfSP^ݬPR dROP<^ZVݬ$P ݬkݣ8P ZީWk./F 4 - 0123KPWO56r#=El7 O҃89GFHJ9 FDUCMD_MERGEV1.031-OCT-1994 12:41VAX C V3.2-044P%-7d %s  P%-7d %s P.PPrasPUsage: du [-r|a|s] directory name.  [FSP]FDUCMD_MERGE.OBJ;13 a?PX,PX$PXPߪFPRINTFEXITߪdcGLOBUTIL_PROCESS_FILE ENV_CLIENT CLIENT_DONEPRINTFFPRINTFEXITGETOPT  FDUCMD_MAINX$CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACECLIENT_INTR_STATE KEY_PERSISTS TARGET_DELAY UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUTOPTINDTOTAL_FILE_SIZE [$CHAR_STRING_CONSTANTSBGETOPTPRR1vެYѬ iRBti[UTIL_PROCESS_FILEVRBkGLOBPRޭRP@ԭb*ώUyT SPUTSXbfWRbRBkW&ߪ<FPRINTFߪMFPRINTF CLIENT_DONEPPAIIIIIIIIIIIIIIII19*[FSP]FFINDCMD.EXE;1+,@.-/F 4-.- 0123 KPWO.56,El7O҃89GFHJHFSP.SAV@ [FSP]FFINDCMD.EXE;1D.C;3-m/0D`0205ElTQFFINDCMDV1.0@El05-13#* + ? ! VAXCRTL_001$+CMA$TIS_SHR_001! LIBRTL_001Q! MTHRTL_001usage: ffind file [file ...] expression R Remote server not responding. IsendtoEsocket openserver addr//%s/%s/%s%s: %s directory reading out of memory %luk %lu downloading %s: %s %luk : %s [%db/s] Warning, unexpected grab error: %s %luk %lu uploading %s: %s %luk : %s [%db/s] FSP_HOSTNo FSP_HOST specified. FSP_PORTNo FSP_PORT specified. FSP_DIRNo FSP_DIR specified. FSP_LOCALPORT0FSP_PASSWORDFSP_TRACEFSP_BUF_SIZEFSP_DELAYFSP_LOCAL_DIR.FSP_TIMEOUT/.....%s: %s skipping remote directory `%s' remote file `%s' is not a file or directory! `{[*?Pathname too longOut of memory 1Arguments too longBad directory componentsBad directory componentsBad directory components{{}Out of memory 2{{}!()-a-and-exec-ls-name-newer-o-ok-or-print-prune-size-time-typefind: unknown option %s. find: %s requires additional arguments. (: missing closing ')'(): empty inner expression): no beginning '('!: no following expression!: IlFSP.SAV@ [FSP]FFINDCMD.EXE;1D.C;3-nothing between ! and -o-o: no expression before -o-o: no expression after -opalloc%s: %sillegal numeric value-timerealloc"%s %s"? forkexecvpmalloc%s: no terminating-exec-ok%4ld -rw-rw-rw-drwxrwxrwx%s %3u %-*s %-*s nobodynobody%8ld %sstat%s -size-type: unknown type.DIR;1/000000//DEVICE_LIST_ROOT/rmbf=2mbc=32wmbf=2mbc=32.DIR.;000000.;?!:@(#)glob.c 5.4 (Berkeley) 6/29/88JN{p~qJ;1],HbOIf&6LXLuԜ(t `nηF !*-9uD庾UQ򒝪&.s=b *`;5DĶzJs7#2kR,_p3wemIV W׬SMb'w~Gؠe/4:0Ƈf2g35\Ec:!:㽿cܥ(٧*ڧ0T`>ǯ^,WYK،~ZrYcg:ab2`KθBtss=ˁ|}䐔XYw@\CZ:]lM"=j'vma@sz2W/fs dm@j\T>I뫪DeTsqĵNoM}ٟbpK;H䱁fm;Pi' N})eB&F'UNhKKEa7fZ9\`7ϥU|Nq0~X}[g Zm4.\2QӗB\_p{$o. ]2;]@KC+}*-"^_=Esa9';`ezS[@a0K$e౳v=`6Qݢ*#Ɂ %xg0s5@'/jڹy B6lM#Yyٳ[ܐ7Jᱧ\"tBU°WA:x؂0.+~Ɛ_!.1+(ًѫ9Y HۀQ$hf}J x8\ilj#DľPk᪱R w+dENj΋*d )OX*.Tz_\&RlVL&u8HNjrwm-& uwqAnwkwjь+[@5;Z\f;\)Er;J3NI;5p3 KU 9{|gN:@ԧymݤRKB\ugvS:BD3i%a+.E-!b&wvqI*6/ 껭ǨW.uRBL@ǘbg{tmc>P[9gXs\RA'bhDYE yJ2gM& upb#9[YW >gY٠pik06ӖHtE%2|wȧɊALlY17\B B&\C- @H0 >4 @H8 C?TDF4EL;REGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG|GxGtGpGlGhGdG`G^AR'ݬݬRPPbRݬݬRPP^ R%ݬݬRPbRݬݬRPPP| ^$FЬRb#bn&PPRb bX&PREEER$ռYVѬRKЬTda#PS ޭSdԭc!UTP|~UTcfScռ P^eOE,EE<,^((ԭ<~PHPTTP߭<~TPPݭTPP߭TAPDRTuDRDPЬSc<~oPcTP<|^( լ~|ݬЬ SݬPPRRc@ݬZPQ-бUTС RRSRPSPPRPR L`rRFSP.SAV@ [FSP]FFINDCMD.EXE;1D.OBJ;1- PЬ T<~PP ^ѬGѬ<ǏzP{PQPPRŏR|~ݬ |~ݬ ~^W[TSݬ PcSݬPccЬ YVYRYRЬR֬bYRYRЬYYRYRЬR֬bYRYRRRVnPS<~XPc<RxRRʏRR R<SʏSˏRRS QnXXUXRXRPPUXPXPURURRծ Ѯ1[PxeRRWRRMG 1P8RR0* kkgA\լ#Ѯ3ߧAAA x  kߧ"MAݮ dPߧ$A&A!APxdVVkߧ+@ݮ ߭9P A1P1߭< ~dPѭ 1SSRYSQUQR PPUQRUPUPˏPUUY1<~nPZ Ps PPPʏPa ZPPW<PPP<~.PT}>PR/l>PRRRb>P[T9[^>O<>ScPRTcPRRcPRRR>P[T[ >[Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1M@FSP.SAV@ [FSP]FFINDCMD.EXE;1;3-T! URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬ><P^YX<ZݬbPԮ W[Ԯ[1ծ1?hݮݮ;PݮA~PUe@& ݬߩ<;ݮ; jP<~PV<$PVP TP[PSVPVRPPRPRPV[V [ծ1T[<n[nSQVQ OPP*FPV< S QPQTTSRʏRSQTSPʏPVPRRS~:PUWWVRRxR~ݮ:PPWVRRxR~:PUծݮd::ߩh:PSЮVV kPP*bP GЮPUG VRRPRP PVTTSRʏRPSUVTSPʏPW[ GЮPRRVRU[[RRSRTS1PTRTR1^mS*UZxT9XЬ9PRV[?e~ݬA9PVݬ#PRCd[>d[QnPЮR RP QP{RPQPQݬ VRRRߣ^h}8hL8P^TݬfPSP`$ߤsS7S7S7B~ݬ ݬSݬif[df[kݣ8P Z"ީWkRT֬PS֬S^SUVЬRbߣ2eRռPЬRbߣ6eRռߣ:ee,PRRWTR TPRfPRTߣ>ede3RWyRRPP<^URެTdS޳SBc-SBdPBݬ BB1RBЬRբݢPP\PR2RRR R]DͤC!w'^TFP^ P/&*J֙C.ʮ3Zobh2߀=aYN2{Y(~XfUkZuA#'N7]xՅk%Cnnj:JZ%_C=0*Z1H luemg;B%l$CxY{&?ƃ֤|Ш- LVJ=\+"m&K.Xb `EpCvdNfuxh< ILZ[䞨җl'(`<4 {{烬͒%yH{jҎ7 0W/hQ$@7^8+Lo+\+9TNAV W.j?9lTR$9z6߳e[Zu+:I-cOK+kt9'\$q0x|ntf*]k#Oˌu XH f)e'\ntBXȒ'7aP_CW|BĪ2HzmlG]eIAhmRPQH`#$0a4$EG :N{S+Aď H+<; @EEp&hM(1$)tUe|X=OO!I֎&:.9;,);4 -X WU24xgG-\rbTz%g z}ݫٞoCSreS3B:A'{ĠM2[;ѳ*Z?JSWEJ񰳒6db/w}{ӥQE7&a>~Lp,9YYM{˥2dz:.h~/,KSD8hVCr#W7L˲WsW\W}'cqmn!K9+4BR׆G#:qu9X0 djOC9LfGYI6nX3vlޣV4)D FK^ tHI"^4zً} l2C^xSȲݬCUBbY|̭]D?{$El7O҃89GFHJ#define main ffindcmd_main#include "clients/ffindcmd.c" *[FSP]FFINDCMD_MERGE.OBJ;1+,B./F 4 - 0123KPWO56$s>El7}P҃89GFHJ;FFINDCMD_MERGEV1.031-OCT-1994 12:41VAX C V3.2-044Pusage: ffind file [file ...] expression P^R'ݬݬRPPbRݬݬRPP^R%ݬݬRPbRݬݬRPPP| ^ ENV_CLIENTTIMEЬRb#bOPTIONPPRb bOPTIONPRFPRINTFEXITR FIND_FORMPLANռYUTIL_PROCESS_FILEVѬRKЬTdGLOBPS ޭSdԭc!UTP|~UTcZX@]FSP.SAVB [FSP]FFINDCMD_MERGE.OBJ;1fScռ CLIENT_DONEP^FPRINTFOPTION FIND_FORMPLANGLOBUTIL_PROCESS_FILE ENV_CLIENT CLIENT_DONEFPRINTFTIMEEXIT || FFINDCMD_MAINz$CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACECLIENT_INTR_STATE KEY_PERSISTS TARGET_DELAY UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUTPLANNOWISOUTPUT0PROCESS)$CHAR_STRING_CONSTANTS EXIT*[FSP]FGETCMD.EXE;1+,E.$/F 4$%- 0123 KPWO%56lDl7 P҃89GFHJ[-FSP.SAVE [FSP]FGETCMD.EXE;1ILE.;14$0D`0205MDlB?FGETCMDV1.0lMDl05-13! " ? ! VAXCRTL_001$+CMA$TIS_SHR_001! LIBRTL_001Q! MTHRTL_001fsp_%drWill not overwrite existing file %s r%s-%dfsp_%dawCannot write %s fgetcmd: local file `%s' is not a directory .chdirfutnarfget: R Remote server not responding. IsendtoEsocket openserver addr//%s/%s/%s%s: %s directory reading out of memory %luk %lu downloading %s: %s %luk : %s [%db/s] Warning, unexpected grab error: %s %luk %lu uploading %s: %s %luk : %s [%db/s] FSP_HOSTNo FSP_HOST specified. FSP_PORTNo FSP_PORT specified. FSP_DIRNo FSP_DIR specified. FSP_LOCALPORT0FSP_PASSWORDFSP_TRACEFSP_BUF_SIZEFSP_DELAYFSP_LOCAL_DIR.FSP_TIMEOUT/.....%s: %s skipping remote directory `%s' remote file `%s' is not a file or directory! `{[*?Pathname too longOut of memory 1Arguments too longBad directory componentsBad directory componentsBad directory components{{}Out of memory 2{{}%s: illegal option -- %c %s: option requires an argument -- %c .DIR;1/000000//DEVICE_LIST_ROOT/rmbf=2mbc=32wmbf=2mbc=32.\w`FSP.SAVE [FSP]FGETCMD.EXE;1ILE.;14$DIR.;000000.;?!:@(#)glob.c 5.4 (Berkeley) 6/29/88t]\FSP.SAVE [FSP]FGETCMD.EXE;1ILE.;14$]77777777777777777777777777|7x7t7p7l7h7d7`7\7X7T7P7L7^6PM6R6!6^RWSfVcX|~5TT1h-ߢT5PUU5Tߢ 55heTff5P~z5PTfTd5cߢ.Tj5PU-U_5cfߢ0T_5cߢ.T=5PUh$Tf5PTQ5Pߢ6T#5h:T-5P!gߢ=T4PUT4 gPggߢ?T4PUgU7gUݬaPU4T4U4TߢA4v4hfT4TE4h T74P 8^SRѼ Pb~@4P$T}*PRl*PRRRb*P[T[n*O<*ScPRTcPRRcPRRR*P[T`l[*[Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬ>(P^YxX(ZݬbPԮ W[Ԯ[1ծ1?hݮݮ'PݮA~PUe@& ݬߩ('ݮ' jP<~PV(1YD>2op^%:1DkfJClJ((Kd x&uc ,W?ҁW6v#L[Qi,A5lL'E 86d;-~{ C!P^N&rq zHCb oՐ+wB֙ٚt5DͶg(1#iÆf?w+cg_\Ej &Y-X@V .r4E'^ 3[q{&MyϓdT=,!7dq<%|\CXn2GahXM%."ﳡlХp"ftάmh2$3lM$ f&C2ݲB$YWdQ`wM4b#:aT5,yz~wO+hX{Uy[8=_xr#J~f^\8}i&Zz4urҿ յt!MaX F0em&<GWV]M.w˶pTsUⓟ\*Rz nt\&D$O:&ō :뚭^p0Js3^ԥ!(W-zDoM@>͝uu׽N* lnşMJ ԩP<_ NX) +nx1Tid TGΎ1_ n'$:ض[}30 hK$7 ).LJx"^tU) _Z芽=4% [i:.2Ψ45vlfQ7A}&TO EwSƏ4*ɸy.)=~3 |tF[ޚ4|<@7dfDn>k NrH }/䜧Ci nU4CʧF kgT]n槸{&ׅFMP+y}Ab2w:e{O۟ !yTP|~UTcaIc3FSP.SAVE [FSP]FGETCMD.EXE;1.C;5OBJ;2$Z(T%XЬJ%PRV[?e~ݬA%PVݬPR~Cd[>d[QnPЮR RP QP{RPQPQݬ VRRRߣ^h]$h\$P^TݬfPSyP`$ߤsS#bS#S#B~ݬ ݬSݬkݣ8P ZީWkFSP.SAVE [FSP]FGETCMD.EXE;1.C;2J;2$ÛPTUPP|^ެTдUެSгVԴx~PRUP߭cdBf RRUP^*ЬRRP$%RPݬݬ ݬRPݬݬ ݬݬ^ެRѲBTxT~PSQղ PAAcQQЬ RbSbTЬTTPS4T_PRSSRPST?SSЬRbSb޼ R޲RЬC^ЬP `Ь^ݬЬQЬRPaRQP<4^SRޣS ݮ RQЮ RPaRTЬRRTQPaRRЮTRЮRЮU|~߭蟭PʂXPOP P!aRngWσ~yh9]SdQNe]0*ش#9!ͬ3>{}wQZT!$j> aUtG@x'fe館ϔ, cGn9U;iN3ҺB 7@?,'>v VXgCSW0jx [nǥ6uPĬzu(u,Nw=J!Y,0u}IEК'zERj f"3#I߷oX㡈;#F1S6&r?7_'S(P/k2_I熗3<+Uo̗%#dӑo:-K͓D{tYD!kM0Y^b8Aa"'#$O&%'yAdZ q]Q\7 1O!vũj>R= 󌄔i&'fd^ fL=sj V pI7QkCA5*Į2b=9z7c N̎O cCkZHF0Q6 @LT@Z_o':v 9ͪ-g+ Kko=2O-+MFp<"-pwS!̾||2ZUօ0 QϧM~AS[Ekj\)'OKb'<Gwbk._qx1O@p@%~'Y:6SOfć(-Yt w=*H>{>^,r QezcHAZfgDQԅ[|jb XXIV`|2x ny I[_Dh(6_e"s+ah1w}BĿiؽqbx~yR+ ID=Zx]旦">?~g6M`R޸Je2Ķ`eSj'de2rȔ0UL#|soTia*5VLt.gdҰN:An/OTEB>Ġyfh[ φ=ol=Bѯ)'s4› rFMiۧDȊxc:㉮I=Z׏hԭrr'3i ??ΩNEcZ"n1:|$1o5ýPf(YcЋE?8&D\5`rf&W&FCLOSETߢlxMFSP.SAVL [FSP]FGRABCMD.EXE;1C;2;2$50D`0205mDl@$2FGRABCMDV1.0mDl05-13 ! ? ! VAXCRTL_001$+CMA$TIS_SHR_001! LIBRTL_001Q! MTHRTL_001fsp_%drWill not overwrite existing file %s r%s-%dfsp_%dawCannot write %s .chdirfutnafgrab: R Remote server not responding. IsendtoEsocket openserver addr//%s/%s/%s%s: %s directory reading out of memory %luk %lu downloading %s: %s %luk : %s [%db/s] Warning, unexpected grab error: %s %luk %lu uploading %s: %s %luk : %s [%db/s] FSP_HOSTNo FSP_HOST specified. FSP_PORTNo FSP_PORT specified. FSP_DIRNo FSP_DIR specified. FSP_LOCALPORT0FSP_PASSWORDFSP_TRACEFSP_BUF_SIZEFSP_DELAYFSP_LOCAL_DIR.FSP_TIMEOUT/.....%s: %s skipping remote directory `%s' remote file `%s' is not a file or directory! %s: illegal option -- %c %s: option requires an argument -- %c .DIR;1/000000//DEVICE_LIST_ROOT/rmbf=2mbc=32wmbf=2mbc=32.DIR.;000000.;?!:`{[*?Pathname too longOut of memory 1Arguments too longBad directory componentsBad directory componentsBad directory components{{}Out of memory 2{{}mbFSP.SAVL [FSP]FGRABCMD.EXE;1C;2;2$@(#)glob.c 5.4 (Berkeley) 6/29/88Dn~ #FSP.SAVL [FSP]FGRABCMD.EXE;1C;2$+p5555555555555555555555555|5x5t5p5l5h5d5`5\5X5T5P5L5H5^|4PI4N44^RlXiS2W7YЬPPT`P`/PTP`T3UU#i-ߢU3PVV3Uߢ 33igUggg3P~`3PUgUJ3cߢ.UP3PV/PVC3cgߢ0UC3cߢ.U!3PVi$Ug2PU53Pߢ6U3i:U3P!hߢ=U2PVU2 hPhhߢ?U2PVhV7hVݬPVw2U2Vc2UߢA2Z2igUf2U)2i U2P^T`X]Y>UK2ZϞSS2RbSbSbSbSbSbS bSbS bS bS bSbߤRc1P$V1PߤT|1S1ߤZެScެRbPii~iPPaUXXXX5XXXXXXXMXXXXXE=,?PePePePePeߤZcbcPiiެWghFSVhRBf'-PRޭRhP@ԭb P݂Ubhghl0PSSjߤ`X0j[0@0P8,PR ޭRԭb݂bP/<,^(8(ԭ<~PXPTTP߭<~T#PolٞFSP.SAVL [FSP]FGRABCMD.EXE;1OBJ;1$ PݭTPP߭TQP/RT)/R/PЬSc<~PcTP<|^(r լ~|ݬЬ SݬPPRRc@ݬjPQ-бUTС RRSRPSPPRPR PЬ T<~PP ^ѬGѬ<ǏzP{PQPPRŏR|~ݬ |~ݬ ^W[iTSݬ PcSݬPcЬ YVYRYRЬR֬bYRYRЬYYRYRЬR֬bYRYRRRVnPS<~hPc<RxRRʏRR R<SʏSˏRRS QnXXUXRXRPPUXPXPURURRծ Ѯ1[PxR6RRR 1PRR kkgc,\լ#Ѯߧ,u,X, x kߧ",ݮ dPߧ$,++PVxdVVkߧ++ݮ ߭9P ,1P1߭< ~dPѭ 1SSRYSQUQR PPUQRUPUPˏPUUY1<~~PZ Ps PPPʏPa ZPPW<PPP<~>PT)PR)PRRR)P[TpFSP.SAVL [FSP]FGRABCMD.EXE;1OBJ;1$a8 [)Od)ScPRTcPRRcPRRR?)P[TXh[E)[Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬf'P^YpX'ZݬbPԮ W[Ԯ[1ծ1?hݮݮ'PݮA~PUe@& ݬߩ;'&ݮ& jP<~PVd[QnPЮR RP QP{RPQPQq7BFSP.SAVL [FSP]FGRABCMD.EXE;1C;2$ש VRRRߣ^h#h#P^TݬfPSqP`$ߤsS"ZS"S#B~ݬ ݬSݬkݣ8SP ZnީWk(v_u9ALٻ}E|CMưlQSߟ; 0h9suF_,ÒHD񣺐n H)9;I$q D@ 6ʓGNe&Gim- Ht 5 e:!p}+UjDl*{6]Ld}m6o7kZIҏ9Hf0P0nI2@^1zM-Iv4* kDVKCwc9aEAbAcYW }ˇ;:FJ*e6P>3~+\x̣p8_MOCaOAeK*HgKV|2{i AS磭VĒ<^^Cא[9J[ ɠ5B"Py'Ub3W/B8(TN:vUׯN%ֹnaza^+jQpmDѭʷH}aXbth6٩\RPE#:m(?)X)YAB+)BR%kw& X⏄\v1bg)'Y>! BD&υ%Ы!cK|4_c} l?, V,)ʗ RZA09`pC^E6x!qKInh!P[4k #ĕ)b@&;]"Ϥ7٭r!F)!@BA3o&:uK: KJEJؿE>j k!at #C^kϗtq Kq\ڏ @VAXCRTL CMA$TIS_SHRLIBRTLMTHRTL*?????????@@@ @@@@@ @$@(@,@0@4@8@<@@@D@H@L@P@T@X@\@`@d@h@l@p@t@x@|@@*[FSP]FGRABCMD_MERGE.C;1+,M./F 4<- 0123KPWO56|x0El7,P҃89GFHJy8$cFSP.SAVM [FSP]FGRABCMD_MERGE.C;1G;1XL#define main fgrabcmd_main#include "clients/fgrabcmd.c" *[FSP]FGRABCMD_MERGE.OBJ;1+,N./F 4 - 0123KPWO56\'0El75P҃89GFHJ;FGRABCMD_MERGEV1.031-OCT-1994 12:41VAX C V3.2-044PPfsp_%dPr PWill not overwrite existing file %s .Pr0P%s-%d6Pfsp_%d=Pa?PwAPCannot write %s RP.TPchdirZPfutna`Pfgrab: P^GETPIDPSPRINTFDELETEEXIT^RXSWYЬPPT`P`/PTP`TSTRCPYUUCONVDOTSi-ߢUFOPENPVVFCLOSEUߢ FPRINTFigUgzFSP.SAVN [FSP]FGRABCMD_MERGE.OBJ;11gSTRLENP~VAXC$MALLOC_OPTPUgUSTRCPYcߢ.UFOPENPV/PVFCLOSEcgߢ0USPRINTFcߢ.UFOPENPVi$UgVAXC$MALLOC_OPTPUGETPIDPߢ6USPRINTFi:USTATP!hߢ=UFOPENPVUPERROR hPhhߢ?UFOPENPVhV7hVݬUTIL_GRAB_FILEPVFCLOSEUDELETEVFCLOSEUߢAFPRINTFigURENAMEU VAXC$FREE_OPTi U VAXC$FREE_OPTP^TXYUZϞSSSIGNALRbSbSbSbSbSbS bSbS bS bS bSb ENV_CLIENTߤRSTRCMPP$CHDIRPߤTPERROREXITߤZެScެRbGETOPTPii~iPPaUP,?PePePePePeߤZcbGETOPTPiiެWghFSVhRBfGLOBPRޭRhP@ԭb P݂UbhghlISATTYPSSjߤ`FPUTSjFFLUSHGETSP8GLOBPR ޭRԭb݂bPGLOB ENV_CLIENTUTIL_GRAB_FILE CLIENT_DONEGETPIDSTATRENAMEISATTYDELETESIGNALPERRORFFLUSHSPRINTFFPRINTFFPUTSGETSFCLOSEFOPENEXIT VAXC$FREE_OPTVAXC$MALLOC_OPTSTRLENCONVDOTSSTRCPYGETOPTEXITCHDIRSTRCMP 4 FGRABCMD_MAINi$CODE$DATASTDINSTDOUTSTDERRENVIRON{QFSP.SAVN [FSP]FGRABCMD_MERGE.OBJ;11+ERRNO VAXC$ERRNO CLIENT_TRACEJCLIENT_INTR_STATE KEY_PERSISTS TARGET_DELAY UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUTGRAB_CLOBBERTYPEFNAME OPTLETTERSUFFIXTNAME START_FROMOPTINDh$CHAR_STRING_CONSTANTSM CLIENT_DONEEXIT+PUXXXX5XXXXXXXMXXXXXE=*[FSP]FHOSTCMD.EXE;1+,O./F 4- 0123 KPWO56,}El7=P҃89GFHJ0D`0205NEl"FHOSTCMDV1.0̅NEl05-13   ? ! VAXCRTL_001$+CMA$TIS_SHR_001! LIBRTL_001Q! MTHRTL_001|8~FSP.SAVO [FSP]FHOSTCMD.EXE;1C;27ɷ/Usage: fhost [-d delay] [-p local port] [-l local dir] [-o timeout] [-t trace] [-w password] [-f filename] [-h [number|name]] [host port [directory] | abbreviation] .fsp_proffsp_root:fsp_profmalloc%s/.fsp_profrfseekftellmallocfseekfreadfclosehost fhost: syntax error in setup file fsp port fhost: syntax error in setup file host delay timeout trace fhost: syntax error in setup file local port local directory fsp directory password host %s not found host host: %cfsp port host fhost: syntax error in setup file port: %c /d:p:l:t:o:f:h:w:onoffnumbername$define/nolog FSP_DELAY %d $define/nolog FSP_LOCALPORT %d $define/nolog FSP_TRACE "1" $deassign FSP_TRACE $define/nolog FSP_TIMEOUT %d $define/nolog FSP_PORT %d $define/nolog FSP_LOCAL_DIR "%c" $define/nolog FSP_PASSWORD "%c" $define/nolog FSP_HOST "fhost: No host given!%s" $define/nolog FSP_DIR "%c" $define/nolog FSP_NAME "$deassign FSP_NAME %c" %s: illegal option -- %c %s: option requires an argument -- %c .DIR;1/000000//DEVICE_LIST_ROOT/rmbf=2mbc=32wmbf=2mbc=32.DIR.;000000.;?!:}EE?FSP.SAVO [FSP]FHOSTCMD.EXE;1C;27T.|xtplhd`\XTPLHD@<840,($  ^RbSߢc\lߢ:clߢnclݣ|8^uSVRUTլpRPRZPP~PUPU~UPUTݬBPRݬSU UPR.P$'RU UPRPT$ RU UPTPf$RU UP|~RP-fYR`U UCPRTfEbP -JfRU UPRP$#fU UPU UP^UTXVWnݬPhPUh *UPU1n1 f[GYHZ1UUSc Sc ݬUP1PS1nURf0b +b &bPPP@gb.UfRf b b fU8b b PRb b b  PRb b ]RfPPfIRb =b 8PbPPP@gb.0khijRb b Ue Ue SUPR]hkhij R~PĀUPSA&ĆUPSPSP~PV&čUPSPSP~P)'gĖUPQXSQSOaoa~ToFSP.SAVO [FSP]FHOSTCMD.EXE;1C;27 Qaoa aonRRRĝrkhij&UPSPS P~PbXUPSPSP7UPSPSP"UPSPSP*UPUn1nݬSP^SnXsVݬPbSSSCPb.|S޼TCdWRO bb >NR޼SBc%:RЬSBcP0RѬRQRBc?YS޼RCbUPUYU=ƀ8ƜծƼ {sZR %M'RbS+S &S !Pb~ERbS S S HrhFSP.SAVO [FSP]FHOSTCMD.EXE;1C_ORIG;2@ LK_RbS*S %S  b~h:RbS S S kt h1nV+NRbSS S PRbS S S b,RbSS S PRbS S S bѮ>6P߭P`Ѯ>6PаR^(bnxPuoծK^=PR-PƇh    Ѯ R PRRƝ Ơ nLƣo RbS*S %S  b~ƻJ RbS S S ƾ.    c8[RbS,S 'S "Pb~ RbS S S #     ^ VYXWU;ggR޼PB`e-ަePeRRe- gަePeRebhh:hݬ  PRPh-Pgl4]~ЬTd PSdSPShSߦ  ?PRb: ikggeRbRiUgѬgBަe]~ЬSc_ PRcRRhRߦ Z ?PgP޼R@biަEeghP^P^P^P^ݬ- <ά^ݬͭPP(P ͭͭ PPPP<L^ݬO/PP(`^ LNPNMXV(P6 LԋSSOO_ P0HP'O3 P@O] ЬR@ PPݭ P ЬR  ЬR@ PP^Q..QQPP^ݬ = ^US<~ЬTT ߣFSP.SAVO [FSP]FHOSTCMD.EXE;1C_ORIG;2T PR#Rv PߣTTPRbߣݬK P ߣ#ݬPά^VЬXYXPWKP(PͭPͭPW ͭWWPߦ-ߦ'ߦ%ݬPTPߦ<ߦ6ߦ4ݬdPS TZPT<~FPR+SRT<~PRT SP^ݬ<^RЬT /ЬUUPSUSSߢCSP=ߢH=PP'@ ߢKSPPTUPP|^ެTдUެSгVԴx~PRUP߭cdBf RRUP^*ЬRRP$%RPݬݬ ݬRPݬݬ ݬݬ^ެRѲBTxT~/PSQղ PAAcQQЬ RbSbTЬTTPS4T{PRSoRPSTSSЬRbSb޼ R޲RЬC^ЬP `Ь^ݬ ЬQЬRPaRQP<4^SRޣS ݮ RQЮ RPaRTЬRRTQPaRRЮTRЮRЮU|~߭蟭ePʂXPOP Pp+[L|Co5[1 &'NM[@dOY]u#NS~A]"hK:lwY"[mǃHߚX]3W92!ݖb5:B~PZsj[ɮ?+$ 2Q,SK:.1\@-ĺ(Ϧi?o-xa:|}ӇXZ1ɣAszubnLwEp`*}۩_::@kQV@Rc79uqa&WKo/Q܉CR'_l$=ߍ-u}:.1\iCj&VS^է0\%אsʺu2|VW {"ND_AB(w(S ~.bЄVkΐ9\+ǡY0$UOq mˮ*S9JBbSl "HYWvzr d[q|.uŢ|)UzQI06J]Ώӗ55\* EwG C~Sa2&xx'䫟Wdg;@1 bd攭vao)(QۅoTeSPO 3@xSS}\&%w'$ڥEUn f&3˺?BT{n]|u]Y/Ҝ+;eX/BH _a :?sxUHWkG2M0|rΉϝ[zRoq[Esr#SFqz7gqt+%mevl,V//^H2#ydUw.@Y[Rymsar)dvza^f"֓\n߹(ˀca1 LPʽN=P%%]IsJ\8ukQx Ex.e-9۷g_r7 IvZfoDv;JEYbQY0$ɯe&( O$61߁w.\9-C>\B<?oe-"XP;L8Z)B_[;Ǐhۺ=M\hBv愘 n Y h[LO )B;FSP.SAVO [FSP]FHOSTCMD.EXE;1C_ORIG;2FDfQQRa  RQa aPa aSPSR@QRQab SPSR@TTeݬ S@@P\SX''@('''''''(x(p'''''''((8(0(X(((p(h(`( (P((('(('x'h'`' Dd$" |tl<|D4 , t b'j'z''( ('((R("(b(j(r(*(Z(2(:(((''''''r'z(('''''''B('Z'  @VAXCRTL CMA$TIS_SHRLIBRTLMTHRTL)!!!!!!!!!!!!!!!!!!!!!""֍LqFSP.SAVO [FSP]FHOSTCMD.EXE;1C_ORIG;2e" """"" "$"(","0"4"8"<"@"D"H"L"*[FSP]FHOSTCMD_MERGE.C;1+,P./F 4<- 0123KPWO56PbSSSCb.S޼TCdR bb R޼SBcRЬSBcATOLPRѬRQRBc?YS޼RCbU PARSE_FILEPUYU LIST_FILEEXITƀPRINTFƜPRINTFծƼPRINTF PRINTFPRINTF PRINTFM'PRINTFRbS+S &S !Pb~EPRINTFRbS S S HPRINTFLKPRINTFRbS*S %S  b~hPRINTFRbS S S kPRINTF 1nPRINTF+RbSS S PRbS S S b,RbSS S PRbS S S bѮ>6 INET_ADDRP߭ GETHOSTBYADDRP`Ѯ>6 GETHOSTBYNAMEPаR^(bn INET_NTOAPծK=P-PƇh H| LOAD_FILE h PARSE_FILE  LIST_FILE  FHOSTCMD_MAIN $CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACECLIENT_INTR_STATE KEY_PERSISTS TARGET_DELAY UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUT_CTYPE_DELAY LOCAL_PORTTIMEOUTTRACEIFSP.SAVQ [FSP]FHOSTCMD_MERGE.OBJ;1 PORT LOCAL_DIRFILENAMEPASSWORDHOSTNAMEHOSTADDRDIROPTARGOPTINDBUFFERHOME$CHAR_STRING_CONSTANTSFPRINTF  VAXC$FREE_OPTEXITѮ R PRRƝPRINTFƠPRINTFnLƣPRINTFRbS*S %S  b~ƻPRINTFRbS S S ƾPRINTFPRINTF PRINTF8RbS,S 'S "Pb~PRINTFRbS S S  PRINTF  VAXC$FREE_OPTEXIT[P555555a55mE555}55U *[FSP]FILES.;1+,R./F 4O- 0123KPWO56\gMCl7`wWP҃89GFHJ7FSP.SAVR  [FSP]FILES.;1TATUS;12OComplete content of the FSP package: -------------------------------------------------- ChangeLog A list of all the changes made to the source code seperated by version. FILES This list. INFO Information about the purpose of FSP INSTALL Installation instructions for FSP MACHINES A list of known architectures and compilers for which this code compiles. Makefile Distributed makefile. Makefile.in input file for building makefile from configure script. aclocal.m4 Gnu M4 macros specific to configuring FSP bin/ Directory for storing binaries, empty. bsd_src/ Directory containing additional sources derived from those in public archive on uunet.uu.net. Most sources are modified to deal with FSP or some architectures. Makefile Unix Makefile for compiling the . Makefile.in input file for building makefile from configure script. cmp.c BSD compare routines. find.c Source for BSD find. fnmatch.c filename matching functions for BSD find. function.c BSD find function parser. glob.c modified BSD globbing routine. ls.c Modified ls source. operator.c operator parsing code for BSD find. option.c option parsing for BSD find. print.c Directory print routines, modified for VMS. random.c BSD random/srandom functions. util.c additional util routines for ls. client/ Code common to all clients ؂FSP.SAVR  [FSP]FILES.;1E.;1C;4OQ Makefile Unix Makefile for compiling the client libraries. Makefile.in input file for building makefile from configure script. lib.c Core routines of the client library. lock.c Simple file locking code to do client multi-plexing. util.c Supplementry routines of the client library. clients/ Code for the standalone and merged client versions Makefile Unix Makefile for building, and installing the clients. Makefile.in input file for building makefile from configure script. fcatcmd.c These compiles into individual client utilities. fcdcmd.c Those with a "cmd" in their name will require fducmd.c shell alias wrappers either because they do their own ffindcmdc file globbing on argv based on directory information fgetcmd.c gotten from the server or because the modify the fgrabcmd.c environment variables (fcdcmd and fhostcmd) fhostcmd.c flscmd.c fmkdir.c fprocmd.c fput.c frmcmd.c frmdircmd.c fver.c merge.c This file is used to call the other client programs when program merging option is used. Rather than compiling into individual client utility programs, users may opt to build a single program which contains all client funtionalities, which are to be distinguished at run time by the name used to activate the program. Significant space saving can be achieved on som,FSP.SAVR  [FSP]FILES.;1E.;1C;4OIe machines. common/ Directory containing code used in both server and clients Makefile Unix makefile for building the common library. Makefile.in input file for building makefile from configure script. strdup.c Unix strdup function. udp_io.c Lowest level routines that deal with the unix inet sockets. Some changes might be needed to get it running with other network implementations. config.status GNU autoconf that will be regenerated every time configure is run. It is used to regenerate the same configuration as before. configure SH script generated by GNU autoconf from configure.in used to test certain parameters of the operating system in order to enable compilation with the minimum of human intervention. configure.in Input script to autoconf used to generate configure. contrib/ Directory containing user contributed files and FSP code. This code is not supported by the FSP maintainer but is placed here as a courtesy to FSP users. admin/ Directory containing files written by JT Traub in order to help automate some of the tasks of FSP site admins. fspadmin/ Directory contaning admin files created by Ruben Oleson. fspshell/ FSP shell front end created by Ruben Oleson. setup/ FSP setup script created by Robert Martin-Legene descrip.mms VAX/VMS mms makefile. example.conf An example fspd.conf file suitable for copying and editing. incl1}mvu ~}BJ;1O <_–us%Uv\;rPbiMT{>PҘeNX!"@~&F=199CSf%4z\lW,f虓ݳ"wt%4Iw&} BrTh )gD7ݓ@fAXt<{٠uմOb.~ļ&ln0\΢m -]{vyDt; ?|LA7 Pʯ;v=:}P_ Xȑk9)d8Izqrpqwwc ì{; 5 V;Ҳ LO5(hEa|]t.Ka F]wm15Yr-NyO?w^/ ,roKq}JA< "Ea E+pgbm.0Io(ف_m]5e>FzmKQB#ߍt]'K,s/Yt{ LD y /1ٱ%CNKfkWZVA`rbO܀p]mHIS#2ޟW V{X.uh7x(؇VN ʎK+`3.?@[Y7Zt2 T]W_<^2Ab:f]F5  ?ЃcGTZFʵ{L-Vji0%dx,JxG3*trMW&bv1`55SXO[8W%%_n^]=g6O)wə&"6ӬYy%q`BWz7KI eؠ,OQ|7 T-8%E.bTP;|hW3m)Ey/? e¦`)XklPES\BHT@CQ2T3 Zp6aot(C3=g8CWᖌCYtF_l'Rb>sVA7~ټ<2[6=Iho0P{~q [w=emcu91,d9:!•#>i6%wL(qS7^qf" H=t%bO4Ea&tp.FB8+Idr)L$@~9e2[ 5-֣.w^5s^vZMui}̟*)W4J0FSP.SAVR  [FSP]FILES.;1E.;1C;4O ude/ Directory containing all include files. bsd_extern.h External definitions for all the functions from bsd_src dir. c_extern.h External definitions for all the functions from client dir. client_conf.h Client options that need to be manually configured. client_def.h Definition for the client code. co_extern.h External definitions for all the functions from common dir. common_def.h Definitions common to both the server code and the client code. find.h definitions for the BSD find command. ls.h definitions for the BSD ls command. my-string.h Headerfile to avoid some bogus redefinitions of strings. proto.h function prototyping headers. s_extern.h External definitions for all the functions from server dir. server_conf.h Server options that need to be manually configured. server_def.h Definitions for the server code. tweak.h System dependent configurations options. This file will be automatically generated from tweak.h.in when the configure script is run. tweak.h.in input file to configure script used to generate tweak.h version.h header file containing FSP version information. vms/ VMS specific include files dirent.h BSD dirent.h headerfile, modified for VMS. grp.h BSD grp.h headerfile, modified for VMS. param.h BSD param.h headerfile, modified for VMS. pwd.h BSD pwd.h headerfile, modified for VMS. socket.AdƮFSP.SAVR  [FSP]FILES.;1E.;1C;4O#6 h UCX socket.h, seems to be diff. on Multinet systems. stat.h UCX stat.h, for Multinet systems which don't have it. time.h BSD time.h headerfile, modified for VMS. tweak.h System dependent configuration options. types.h BSD types.h headerfile, modified for VMS. utmp.h BSD utmp.h headerfile, modified for VMS. man/ Manual pages for the FSP clients/server. Makefile Unix makefile for installing the man pages in the proper place. man1/ Files that belong in subsection 1 of the man heirarchy. fcat.1 fcatcmd.1 fcd.1 fcdcmd.1 fdu.1 fducmd.1 ffind.1 ffindcmd.1 fget.1 fgetcmd.1 fgrab.1 fgrabcmd.1 fhost.1 fhostcmd.1 fls.1 flscmd.1 fmkdir.1 fpro.1 fprocmd.1 fput.1 frm.1 frmcmd.1 frmdir.1 frmdircmd.1 fspd.1 fver.1 man5/ Files that belong in subsection 5 of the man heirarchy. fsp_prof.5 server/ Files needed to compile the FSPD server Makefile Unix Makefile for compiling the server. conf.c fspd configuration file reading routines. file.c Server routines for file i/o. filecache.c fp-caching routines. host.c Server routines for maintaining client database. lib.c Server routines for inet socket i/o. main.c Server main routine and dispatch loop. setup CSH script for initializing FSP (Unix). vms/ ]JcFSP.SAVR  [FSP]FILES.;1E.;1C;4O VMS installation and documentation directory. Bugs.VMS Known bugs as of FSP 2.7.0 Install.VMS Textfile about VMS-fsp, installation, etc. VMS.ChangeLog Changes from VMS-FSP V2.6.3 up to V2.7.0. compfspd.com DCL compiler file for server_main. compile.com DCL compiler file, adapted from VMS-IRC-Client DCL MAKE file, Copyright 1990 by Very Mad Students, University of Karlsruhe, FRG fsp.com DCL script to solve some typical CSH functions. fspd.conf Sample server configuration file for VMS. link.com DCL linker file for all executables. makeclient.com DCL makefile for all FSP clients. makemerge.com DCL makefile for the FSP-merge clients. makeserver.com DCL makefile for the FSP server. mulshare.opt Linker options file for Multinet/UCX implementations. resubfsp.com Sample DCL file to start the fspd as a batch process. runfspd.com Sample DCL file to start the fspd as a detached process. setup.com Sample DCL FSP initialization script. setupmerge.com Sample DCL FSP-merge initialization script. tgvshare.opt Linker options file for Multinet/TGV implementations. ucx$ipc.olb UCX Linker library for Multinet/UCX systems. ucxshare.opt Linker options file for UCX/TCP implementations. vms_src/ Directory in which the Unix emulation routines for VMS are located. convpath.c Unix to VMS pathconversion routines. getopt.c getop2FSP.SAVR  [FSP]FILES.;1E.;1OBJ;2O2t.c, modified for VMS, 12-AUG-1992, tmk miscvms.c miscellaneous unix emulation routines, original from XV-package, 1-NOV-1990 GJC@MITECH.COM vmsmain.c new main() to solve the 'arguments conversion to uppercase' problem. vmsreaddir.c directory emulation routines, original from XV-package, written by Rich $alz, in August, 1990. *[FSP]FLSCMD.EXE;1+,S.-/F 4-,- 0123 KPWO,56w'Dl7 `P҃89GFHJ0D`0205 DlPMFLSCMDV1.0 Dl05-13  ( ) ? ! VAXCRTL_001$+CMA$TIS_SHR_001! LIBRTL_001Q! MTHRTL_001FSP.SAVS [FSP]FLSCMD.EXE;1ILE.;1-<R Remote server not responding. IsendtoEsocket openserver addr//%s/%s/%s%s: %s directory reading out of memory %luk %lu downloading %s: %s %luk : %s [%db/s] Warning, unexpected grab error: %s %luk %lu uploading %s: %s %luk : %s [%db/s] FSP_HOSTNo FSP_HOST specified. FSP_PORTNo FSP_PORT specified. FSP_DIRNo FSP_DIR specified. FSP_LOCALPORT0FSP_PASSWORDFSP_TRACEFSP_BUF_SIZEFSP_DELAYFSP_LOCAL_DIR.FSP_TIMEOUT/.....%s: %s skipping remote directory `%s' remote file `%s' is not a file or directory! `{[*?Pathname too longOut of memory 1Arguments too longBad directory componentsBad directory componentsBad directory components{{}Out of memory 2{{}.%s: ....1ACFLRacdfgiklqrstu.%5lu %4ld %stotal %lu %6lu %4ld -rw-rw-rw-drwxrwxrwx%s %3u %-*s nobody%-*s nobody%8ld %stotal %lu ls: out of memory. usage: ls [-1ACFLRacdfgiklqrstu] [file ...] %s: illegal option -- %c %s: option requires an argument -- %c + 9FSP.SAVS [FSP]FLSCMD.EXE;1C;4-RH@(#)glob.c 5.4 (Berkeley) 6/29/88@(#)cmp.c 5.2 (Berkeley) 4/8/90@(#)ls.c 5.42 (Berkeley) 5/17/90FSP.SAVS [FSP]FLSCMD.EXE;1C;4- @(#)print.c 5.22 (Berkeley) 5/10/90@(#)util.c 5.7 (Berkeley) 4/8/90@(#) Copyright (c) 1989 The Regents of the University of California. All rights reserved. HJAFSP.SAVS [FSP]FLSCMD.EXE;1C;4- 8Pt;p;l;h;d;`;\;X;T;P;L;H;D;@;<;8;4;0;,;(;$; ;;;;; ;;;;:::::::::^P:^$ݬ ݬݬ*!9^sW[eTSݬ PcSݬPcoЬ YVYRYRЬR֬bYRYRЬYYRYRЬR֬bYRYRRRVnPS<~\Pc<RxRRʏRR R<SʏSˏRRS QnXXUXRXRPPUXPXPURURRծ Ѯ1[PxqRzRcRRYS 1PDRR<6 kkgK8\լ#Ѯߧ@8!8(8 x kߧ"7ݮ dPߧ$777PxdVVkߧ+7ݮ ߭5P 71P1`FSP.SAVS [FSP]FLSCMD.EXE;1C;4-D߭< ~dPѭ 1SSRYSQUQR PPUQRUPUPˏPUUY1<~rPZ Ps PPPʏPa ZPPW<PPP<~2PTq3PR`3PRRRV3P[Tq[R3O03ScPRTcPRRcPRRR 3P[T|$[3[Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬ21P^GbxFSP.SAVS [FSP]FLSCMD.EXE;1C;4- Y8Xa1ZݬbPԮ W[Ԯ[1ծ1?hݮݮ0PݮA~PUe@& ݬߩ00ݮ0 jP<~APVCd[>d[QnPЮR RP QP{RPQPQݬ VRRRߣ^ha-h@-P^=TݬfPSP`$ߤsS,~S,S,B~ݬ ݬSݬ#@aV)}H玑R(kUc:M쁊Ij"_BXY`|Ԛz|nAiV8nuؙǧyVZd4(v//TC~sQ  TZƑ ?"Zwp Wu$82D6IzD#-Ά̬b]6.^cze&G!n Nj'! sioK1o}q.ޯX>7?o>\Y2\p(7 ˼@}wʩ7 X28 zOS&44]#avZ ![%&D0եB!n#~?`HT'f#$Zsj YN4{BxP0x 5$wЌV (,om>k&4xF?ͧ5j/έ3dQvÝdѝn43)qt|&}qRh]wL 2LSWē+{Mv)(eMV0t -5T ?`WUi #du8FoEϤʶ//3ŻMСu\Ւ\o@0:ea0Ԯe߭;_b-xS޾gZVNlKe?,p?L'8?ٵpKºft*S6л .5wA>?^oqe=@82Q|{ɠ[HLS8" f ̠S9N)/RgHA s FSP.SAVS [FSP]FLSCMD.EXE;1C;4-PRb@ ݬëh6+Y*PTZ TUZ1% +nPnn?QUPnR RP QP{RPQPQݬ UPPPýh*h*Yz*PP^VWRYmUrX*T_*Pd1*`*5*Pd*6* *Pdd) *3)ScPfAfCcPgPgRc\P\\\cPPe)PeeVݬ$P ݬF$kݣ8P ZީWkVЬTЄST YXѬY(c~0PǟShP"ǡShPRUR~eRЄSPΔ^VWЬTTͤ͠ԧ0͠ʮޮZυUЮRjbS[rYKXPUY)c~ 0PƟShPơShPR R~eRЮRjbSէ0 ͠}͠ȧ8Ч8<<Ч8R@ͨʮԾЮ$ЮLԧ(> ЬRbwP( ޭ(bԭվ(1Iݾ,Pݾ(=1 ЬP֬`RЬS֬ˏRP@dPhPRQP?QQcЬ P׬ PP^ݬ PRtU0RP^]O0 P^9\߬'^UVYXWU;ggR޼PB`e-ަePeRRe- gަePeRebhh:hݬ PRPh-Pg<4]~ЬTdPSdSPShSߦI*?PRb: ikggeRbRiUgѬgBަe]~ЬScPRcRRhRߦ?PgP޼R@biަEeghP^+STެWзެUTeTVDfQQRa  RQa aPa aSPSR@QRQab SPSR@TTeݬ S9FSP.SAVS [FSP]FLSCMD.EXE;1OBJ;2-)@@d$HX''@('''''''(x(p'''''''((8(0(X(((p(h(`( (P((('(('x'h'`' |t ttDLDL|4d, 8 t b'j'z''( ('((R("(b(j(r(*(Z(2(:(((''''''r'z(('''''''B('Z'N @VAXCRTL CMA$TIS_SHRLIBRTLMTHRTL+lOpOtOxO|OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPP PPPpCFSP.SAVp [FSP]FLSCMD_MERGE.C;12I*[FSP]FLSCMD_MERGE.C;1+,p./F 48- 0123KPWO56\E5El7@@hP҃89GFHJ#define main flscmd_main#include "clients/flscmd.c" *[FSP]FLSCMD_MERGE.OBJ;1+,q./F 4z - 0123KPWO565El7hqP҃89GFHJ9 FLSCMD_MERGEV1.031-OCT-1994 12:41VAX C V3.2-044 ENV_CLIENT CLIENT_DONEEXITEXITFLS_MAIN LS_BAD  FLSCMD_MAINE$CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACECLIENT_INTR_STATE KEY_PERSISTS TARGET_DELAY UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LEN ENV_LOCAL_DIR ENV_TIMEOUTuP_FSP.SAVq [FSP]FLSCMD_MERGE.OBJ;1^ CLIENT_DONEEXIT^ ENV_CLIENTݬ ݬݬFLS_MAIN CLIENT_DONEEXIT*[FSP]FMERGE.EXE;1+,r".Z/F 4ZY- 0123 KPWOY56|%gCEl7zP҃89GFHJ0D`0205'CElFMERGEV1.0<'CEl05-13AU V ? ! VAXCRTL_001$+CMA$TIS_SHR_001! LIBRTL_001Q! MTHRTL_001( y{ 1* k2,Akc5rxѩ q=f6* z*h=4}593);f.8w 6nC߂ԥY 20b[@XÈJT`-(16\>ܳrW9L3ZB CX))|{kH͘j ,?҃V#11ʓO i.0wiUFaƿfe1#Cc+lJ9=-ɖU3!L$!;v1< nj_@n' fl0d[m=im۲ .LX9mĒ@i1.tO&.wI>`+J)cIlQ.{ϟ[cp.APлD,ҟsr/]ţ]Pxu!44߬4XeY 2'#ebKSQcti[segX pìJ&qpzN³(СEvf lF>LJ'QHz}J!)X,ѬhQ2dxss,cBOR6alPF܇W^lӷ `núگ=}oZVg. 6f7mW=S锿fQ:2ho{eQ|RBX ca`|]۬P.IXSwttQ[6YAAT x80ʵ;TzTNr!%[GNa `-11lehYj[$wff""p"Z@#}ܗK_k]Eؖsws]c2+Lrۜ ȹF^R]pr#ѿ ڰ$O#OL舌)"f[n˗@*5+L @ 9IS 9Ċ_TIMEOUTuP FSP.SAVr" [FSP]FMERGE.EXE;1OBJ;2Zfsp_%drWill not overwrite existing file %s r%s-%dfsp_%dawCannot write %s fgetcmd: local file `%s' is not a directory .chdirfutnarfget: fsp_%drWill not overwrite existing file %s r%s-%dfsp_%dawCannot write %s .chdirfutnafgrab: r%s: not a file rCannot read %s .chdirfput: Can't remove %s: %s ERR: %s directory mode: (owner: %s)(del: %s)(create: %s)(mkdir: %s)(private: %s) otheryouNYNYNYNY%s //Can't remove %s: %s %s : (owner: %s)(del: %s)(create: %s)(mkdir: %s)(private: %s) otheryouNYNYNYNY%s %s : (owner: %s)(del: %s)(create: %s)(mkdir: %s)(private: %s) otheryouNYNYNYNY%s .Can't create %s: %s %s : %s FSP version: %s Logging of all server transactions is ENABLED. Logging of all server transactions is DISABLED. Remote server is run in READONLY mode. Remote server is run in READ/WRITE mode. Server REQUIRES connections to reverse name. Server DOESN'T REQUIRE connections to reverse. Remote server is run in PRIVATE mode. Remote server is run in PUBLIC mode. Remote server throughput control is ENABLED. (max %d bytes/sec) Remote server throughput control is DISABLED. Local FSP version: %s VMS Version 2.7.1, May 21st, 1993%-7d %s %-7d %s .rasUsage: du [-r|a|s] directory name. --------:------ %-7d TOTAL usage: ffind file [file ...] expression /Usage: fhost [-d delay] [-p local port] [-l local dir] [-o timeout] [-t trace] [-w password] [-f filename] [-h [numberNFSP.SAVr" [FSP]FMERGE.EXE;1;1Z|name]] [host port [directory] | abbreviation] .fsp_proffsp_root:fsp_profmalloc%s/.fsp_profrfseekftellmallocfseekfreadfclosehost fhost: syntax error in setup file fsp port fhost: syntax error in setup file host delay timeout trace fhost: syntax error in setup file local port local directory fsp directory password host %s not found host host: %cfsp port host fhost: syntax error in setup file port: %c /d:p:l:t:o:f:h:w:onoffnumbername$define/nolog FSP_DELAY %d $define/nolog FSP_LOCALPORT %d $define/nolog FSP_TRACE "1" $deassign FSP_TRACE $define/nolog FSP_TIMEOUT %d $define/nolog FSP_PORT %d $define/nolog FSP_LOCAL_DIR "%c" $define/nolog FSP_PASSWORD "%c" $define/nolog FSP_HOST "fhost: No host given!%s" $define/nolog FSP_DIR "%c" $define/nolog FSP_NAME "$deassign FSP_NAME %c" Usage: fmerge cmd [...] `cmd' determines action to take: Setup: fhostcmd [-d delay] [-p local port] [-l local dir] [-o timeout] [-t trace] [-w password] [-f filename] [-h number|name] [host port [directory] | abbreviation] - set resources fhostcmd [-f file] - set from resources file Status: fver [string] - display remote [or local] version flscmd [-lsflags] [file [...]] - list remote files fducmd [-s|a|r] file - Display file size, in kbytes File/Directory Options: fmkdir dir - create remote directory fcdcmd dir - change working directory to dir fprocmd [+c|-c|+p|-p|+d|-d|+m|-m_ \1FSP.SAVr" [FSP]FMERGE.EXE;1;1D.C;3Z ] dir - set/show protections frmcmd [file [...]] - remove remote files frmdircmd [dir [...]] - remove remote directories ffindcmd path [...] expression - Find files matching expression File Transfer: fput [file [...]] - send file to remote fcatcmd [file [...]] - copy each file to standard output fgetcmd [-f|u|t|n|a|r] [file [...]] - download files fgrabcmd [-f|u|t|n|a] [file [...]] - download files then delete No FSP command as argument fcatcmdfcdcmdfgetcmdfgrabcmdflscmdfmkdirfprocmdfputfrmcmdfrmdircmdfverfducmdfhostcmdffindcmdUnknown FSP client command: %s R Remote server not responding. IsendtoEsocket openserver addr//%s/%s/%s%s: %s directory reading out of memory %luk %lu downloading %s: %s %luk : %s [%db/s] Warning, unexpected grab error: %s %luk %lu uploading %s: %s %luk : %s [%db/s] FSP_HOSTNo FSP_HOST specified. FSP_PORTNo FSP_PORT specified. FSP_DIRNo FSP_DIR specified. FSP_LOCALPORT0FSP_PASSWORDFSP_TRACEFSP_BUF_SIZEFSP_DELAYFSP_LOCAL_DIR.FSP_TIMEOUT/.....%s: %s skipping remote directory `%s' remote file `%s' is not a file or directory! `{[*?Pathname too longOut of memory 1Arguments too longBad directory componentsBad directory componentsBad directory components{{}Out of memory 2{{}.%s: ....1ACFLRacdfgiklqrstu.%5lu %4ld %stotal %lu %6lu %4ld -rw-rw-rw-drwxrwxrwx%s %3u %-*s nobody%-*s nobody%8ld %stotal %lu ls: out of memory. usage: ls [-1ACFLRac1aܿFSP.SAVr" [FSP]FMERGE.EXE;1;1D.OBJ;1Z  dfgiklqrstu] [file ...] palloc%s: %sillegal numeric value-timerealloc"%s %s"? forkexecvpmalloc%s: no terminating-exec-ok%4ld -rw-rw-rw-drwxrwxrwx%s %3u %-*s %-*s nobodynobody%8ld %sstat%s -size-type: unknown type(: missing closing ')'(): empty inner expression): no beginning '('!: no following expression!: nothing between ! and -o-o: no expression before -o-o: no expression after -o!()-a-and-exec-ls-name-newer-o-ok-or-print-prune-size-time-typefind: unknown option %s. find: %s requires additional arguments. %s: illegal option -- %c %s: option requires an argument -- %c .DIR;1/000000//DEVICE_LIST_ROOT/rmbf=2mbc=32wmbf=2mbc=32.DIR.;000000.;?!:<FSP.SAVr" [FSP]FMERGE.EXE;11MD.OBJ;1Zk@(#)glob.c 5.4 (Berkeley) 6/29/88@(#)cmp.c 5.2 (Berkeley) 4/8/90@(#)ls.c 5.42 (Berkeley) 5/17/906ϡFSP.SAVr" [FSP]FMERGE.EXE;11D.C;3Z@(#)print.c 5.22 (Berkeley) 5/10/90@(#)util.c 5.7 (Berkeley) 4/8/90<@(#) Copyright (c) 1989 The Regents of the University of California. All rights reserved. l  ,t0ܓtܔ H2yFSP.SAVr" [FSP]FMERGE.EXE;11D.C;3Zk 0  tԕ TP,($  ܃؃ԃЃ̃ȃă^Pa^RWS:VXD~TT@}h-ߢTPUUTߢ :heTffP~PTfTcߢ.TPU-Ucfߢ0Tcߢ.T}PUh$Tf[PTPߢ6Tch:TmP!gߢ=T(PUT6 gPggߢ?TPUgU7gUݬ5PUӀTUTߢAhfT€Th TwP 8^SzRѼ Pb~P$PS ޭSbԭc!PRRϟP Rrrlr\r^ݬ)!PR|~R~RrPF~ `@& ݬrrR|rPP ^i[rZ+ռ1 Y9rXWKrV,rUPЬRbw=PS ޭSbԭcBPЃTTiPR|~R~RhPF~g`@ TkjfRePcռ1q^SݬPQ|~Q~QxqPG~PR<~{PUݢfPT XUXRݬcqT_bRRޣXWPޣVWWRޣTVޣRVVRޣPUޣNUURޣLTޣJTTRޣFRޣ@RRߣpXߣZp]pP^SݬPRݬݬpPPR~RpPH~PR<~PTݢoPU XTXRݬߣ_'pUpbRR÷WõWWR óVPñVVR ïUPíUUR ëTPéTTR åRPßRRߣeoXùoüoP< ^U )ЬSУRgb+b-]XSЬRbTRռ1PЬSc:PR ޭRcԭbPT݂σbռYЬRբGRռFЬSco:PR ޭRcԭbP݂Mbռ Pž3Pn^TݬPS|~S~SnPI~PRb@" ݬdnnSjnP 4nSKnP^VnX'ռznWPмUUsPT|~T~TmPI~VPRb@ UfhmTgSP %tz Z3q1PaE-tcowT ˕;ym{-`M2F}~f~$.&l:~4TE CǪOZΒw̔Հ֩#L}JP皝$'A-PMqLwqͽgF%ϱd\^A~@1yxgKa^׷)&LoH@ŃYvيZDI9}ds=QU mO> =犯5}f-qL vj I#%P,LlY%8'j1˿J*XWu~N|@a>οTM (=ːTnjO}ڋ D'}4kV~Ltz0KB(q~cuDhY-x!KmR3o7 x'f=hǶ!"4|yNg+ȫFL(%|IyN q)CfFtvK>h(: >m*?iSzW)I[ [`FI81#f=2$1 h!4= 19Qc e`0JS@b"Y1ZJY,}'K-ļ"5ӿQRhurU[^QujfWXW, sPŎ[ܓU7Z[ vd=ؤhˮg;6p)b&~j{Z #!jdn;}?d_V9?8ehm\0TcĘ|# g9;a<)~P44^Mj@B $fpT%ViIHt,Г0%xh l–3v+bc> h07Ic4xFiqn"ʃ'SJ h)EY*IO~/{\R5Fl}fey #wL !ķ1e rt;X-KL.Ğ3#$\,'&)5Ea De]mF6vZJ KxjӶ?iHA^ Wl-jȧRrD?v~d0j O!kcl(F^* \KfeFSP.SAVr" [FSP]FMERGE.EXE;1;1.OBJ;1Z|e UߦmTgռ m^SUѬ15&|~|~PR<~uPWݢ`PV PWPTPcmRbV1dߣbߣBbdߣtl PÝld l ld (l PldewlTdPxPPʏPPUTdPxPPʏPPUTdPxPPʏPPUTdPʏPPUUåElPú5ll8l ^ЬSSQSPЏS SP QP{SPQPQRRˏ S SѬݬRk^ P^RЬQQQѬQ Qլì n ݬݬ ߢ TkP ^Z|W$ߪެTdެSc^PRR1PRPPaAIIIIIIIIIIIIIIII19!?PX,PX$PXPߪ/kjjߪdcy]PRR1vެYѬ: i+%RBti[E(VRBk5PRޭRP@ԭb*ώUyT SPUTSXbfWRbRBkW&ߪ<\jjߪMFjiXP^R'ݬݬRPPbRݬݬRPP^]KR%ݬݬRPbRݬݬRP)PP| ^"iЬRb#b[PPRb b[PRZiihR)FռY&VѬRKЬTd%4PS ޭSdԭc!UTP|~UTcfScռP^hhch ^RhSߢcVh\lߢ:clߢnclݣh|8^SfVRUTլpR\PRZPBgPFSP.SAVr" [FSP]FMERGE.EXE;1;1.OBJ;1Z#~gPUgPUgU2\PUTݬzgPRݬgU UVgPRgP$[gR:gU U!gPRfPT$ )gRgU UfPTfPf$fRfU UfP|~R}fP-fffRfU UfPRTf9fbP -~ffQfRTfU U;fPR;fP$#DfffU U fPU UeP^TFXSV4fWnݬPhPUh e*UePU1n1 jee[eYeZ9eUUSc Sc ݬUP1PS1nURf0b +b &bPPP@gb.UfRf b b fUtb b PRb b b  PRb b ]BRfPPfIR-b =b 8PbPPP@gb.0dkhijRb b Ue Ue SUPR]dkhij R~PĀUPS&ĆUPSPSP~P&čUPSPSP~PgĖUPQXSQSOaoa Qaoa aonRRRSĝckhij&UPSPS P~PUPSPSP{UPSPSP~UPSPSP]*UPUn1nݬbbP^ SXbVݬPbSSSC_b.S޼TCdR bb zR޼SBcaRЬSBc^PeRѬRQWRBc?YE=S޼RCbUPUYUu^C;ƀ8^Ɯ^%ծƼ^ ]] ]iM']VRbS+S &S !Pb~E]RbS S S Hr]DLK_]1RbS*S %S  b~h:]RbS S S k] 1n]+RbSS S PRbS S S b[,SRbSS S PRbS S S bѮ>%6vP߭P`Ѯ>6PаR^(bnDPծK=P-PƇh\] U[[Ѯ MR P>R~FSP.SAVr" [FSP]FMERGE.EXE;1;1MD.C;3Z)RƝ[Ơ[n~xLƣo[eRbS*S %S  b~ƻJ[RbS S S ƾ.[[  [8RbS,S 'S "Pb~ZRbS S S _ Z8 0ZZ ^E\ZSlcZRb߬cb߬=cb߬Ecb̈cbcbcb@cbJcḃcb̾cbcbcbCcb~cb̾cbcb"cbecbvcb̥cbcbݣ^]RЬPРSP׬S!]YYYySkYTdPݬ ݬݬ1SdPݬ ݬݬ1ˆSdPݬ ݬݬ31SdPݬ ݬݬG1c™SdPݬ ݬݬG1C SdPݬ ݬݬ1#§SdPݬ ݬݬ1¯SdPݬ ݬݬ1´SdPݬ ݬݬ1»SdPݬ ݬݬ1SdPݬ ݬݬ1SdPݬ ݬݬdSdPݬ ݬݬ{DSdPݬ ݬݬo$SXWWW^'W[TSݬ 7PcSݬPcЬ YVYRYRЬR֬bYRYRЬYYRYRЬR֬bYRYRRRVnPS<~Pc<RxRRʏRR R<SʏSˏRRS QnXXUXRXRPPUXPXPURURRծ Ѯ1[PxR&RRR 1PRR kkgU\լ#ѮߧDVUUR xDeFSP.SAVr" [FSP]FMERGE.EXE;11CMD.C;3Z ,?9 kߧ"iUݮ dPߧ$UzUIUPVxdVVkߧ+Uݮ ߭5P U1P1߭< ~d'Pѭ 1SSRYSQUQR PPUQRUPUPˏPUUY1<~PZ Ps PPPʏPa ZPPW<PPP<~PT]QPRKLQPRRRBQP[T%[NQO QScPRTcPRRcPRRRPP[Tص[P[Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ .D ~FSP.SAVr" [FSP]FMERGE.EXE;11CMD.OBJ;1Z@/e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬOP^YXmOZݬbPԮ W[Ԯ[1ծ1?hݮݮNPݮA~PUe@& ݬߩNNݮN jP<~PVd[QnPЮR RP QP{RPQPQݬ VRRRߣ^h=KhSPR\\TPlbcP bPlbPl\\TRRUTL<^UЬRЬSR>PTS>PTTT>PTߥ>>RTr>ST>TPP^5WҭSݬG>PRݬ:>PRRR, ѣ(T  ާ(֣(R,У(P@$(TЬVЬUV=PRU=PRRR=PRߧ==VRTFSP.SAVr" [FSP]FMERGE.EXE;11MD.C;3Z8=URc=RD$<^yVXWUХkݣ8P ZީWkYݑm?.u@fʖ6Ȯ Iqe!rs t/[X DeIwj6J'ۿd`%X 's&v&v%̞pp5ȂRW[3= cSsn@b6t8H=ܟ]!5 ČQwsz[b"]>m 'w㺺0hcr(#ý U<“.,Q$;DFuh bRQ}yO²vmDE9z$@Ɗ^kgXw)쒸QqK8У-~F[4Q&#6=7c@nIW8Ôj3:H!tf]bmA< *5-˽|mL%U' ,Ȍ&K#0xk(e 8]B9P/.(,Ϙ*}MKѧ {RLr4"fl 90#8ώg,a lh*)6aJ92EKR\pq:,䗥A&n-迖lF|Q8fvf:3  yj 2u˩BE06HΕ,!ؒ!)y ,JJQfƀCڭb˻_$T #w7̀k(錛~)|#@AKxzAFSP.SAVr" [FSP]FMERGE.EXE;11MD.C;3Z=>mP9TVFhPЧ`FQ<aժ/F"VfVQVPЏV VP QP{VPQPQnr <VSVVSTUPW1UxT nSPX X#1TPP^TR7W1 0 ߢ!ߤ0ЬScdP c0߭ݬPPݭ,ݭ0ߤ(Pߤ 0^}XYﻩWDTЬSS/'ЬUХZХV9SU/ZVSݬܪRbN1$RЬVSUSU{P<PPdfP`.W.L$Uޤ!QUQ/ UQU$/a$ $$ghiVuR$$9VSUSUPΐ^| |XZԮ,ռ1inv/ .*/ ЬRbwP( ޭ(bԭվ(1Iݾ,Pݾ(I/1 BЬRݢ݌$nծ1/$$ Q$[VYnTUSU19TWWX欄 X6"RQRPЏR RP QP{RPQPQXg܋gPX},<ZЬP֬`RЬS֬ˏRP@dPhPRQP?QQcЬ P׬ PP^ݬ"PR6x#1#TRP^S# #/P^\߬+#" ^qScռ(߬:Pc PcPRPPbPRռ" cPcPbPRcYPPPc<^ЬRQSb!SSURTPP]=PPb- SS]PQQSTR PPQTPP]TUSPRSSP^ЬSRYYT1(;T*1DT?13T[1TPP[`12?PTbTTPPcPP* ScPP*PPbPRSiPPRbPPPSTPnnXPd!PPWTVPP]=PUFd-QQ]PnnQVT PnVPP]VWPPTPPUUS1PP\PSP1PY1P^ PЬ ЬԠ`行q H P ^S PP+0 (?P֬ ЬPP֬ ЬP PЬPԠ ߭ݬ rPRЭQRQ a*ЬPa`eJ JFSP.SAVr" [FSP]FMERGE.EXE;11CMD.C;3ZgGߣݬߣ ЬP`RP ^SЬQСPPS1P?PЬPàcRQRQRPeeRWyRRPP<^URެTdS޳SBc-SBdPBݬ BB1RBЬRբݢPPPR2RRR R?k=-A^ō`0H7S5р35eN^jh6+^qtmTl "7S5N 0O0Ǣc-A>z&9lTg"Ԋ x5$LՏIrIHlZ]~9$qXGTX3φwk_"г QJnp~Al4bN O3'Y(e-(cTc?YImalE[D1؄\8x$>wڇ?ߴ)3חiZ;ЀSwri*5Azmjd$Jnȭw<|^k^ 2Ov2<^a4`!̉A=y{Q0H:8=;l bc[w_Fם<{jW@[݅ңd@,/>z1屆N0*GKgwy*j8V.>%Sj׉ɮ+BI6[=P}ܚ[`X*&)Ry"?茇;tXFBv%J (u3e:!#I]ſ;PƜPpm&Dci(T(dK_E4sJ?u\CLAi_iR˶o|?&XAS5Pe0Cp$WLѾXΘdAS\s\zbϢHljdIsBdk7o%_jϐj,@gJP4I B̧;rBR*lKM;<ʥg |{ڹ$C>̞`Dm-α$g$!GUUd9|p=-e=c'7+Ԑ!ߕ/Bԑy ՇH-𱗴B+RB \o&@b5qš'6$'aHV0ɜ!㙭4[8RW^-cᶹ{[X7"2C‹$@sV'LUmg㛥4.m@s ?WDѶ&xxtH&V @-98|}\@0W[i yПm_{sZrIemBȷ<{Q-Q-ݙ>%` cF0s8jDjcrܚ>mi du_+϶fA&]˪I J _M|#7nߑz_,?K[n:+ 7i&2wL?}op`DKa,9H[*[FSP]FMKDIR.EXE;1+,s./F 4- 0123 KPWO56LDl70P҃89GFHJ総_FSP.SAVs [FSP]FMKDIR.EXE;1TCMD.C;3hjLHD@<840,($  ^TݬPS|~S~SPI~PRb@" ݬdSP SP^=VXռz[WPмUUsPT|~T~T5̨FSP.SAVs [FSP]FMKDIR.EXE;1TCMD.C;34PI~VPRb@ UfhTgSP UߦTgռ ^W<[TSݬ PcSݬPcЬ YVYRYRЬR֬bYRYRЬYYRYRЬR֬bYRYRRRVnPS<~tPc<RxRRʏRR R<SʏSˏRRS QnXXUXRXRPPUXPXPURURRծ Ѯ1[PxR.RRR 1PRR kkg3\լ#Ѯߧ8% x kߧ"ݮ dPߧ$PJxdVVkߧ+rݮ ߭5P z1P1߭< ~dPѭ 1SSRYSQUQR PPUQRUPUPˏPUUY1<~PZ Ps PPPʏPa ZPPW<PPP<~JPTPR'PRRRBP[T[>O\ScPRTcPRRcPRRRP[T\[[Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬ"P^YXYZݬbPԮ W[Ԯ[1ծ1?hݮݮPݮA~PUe@& ݬߩݮ jP<~YPV<PVP TP[PSVPVRPPRPRPV[V [ծ1T[<n[nSQVQ OPP*FPV< S QPQTTSRʏRSQTSPʏPVPRRS~PUWWVRRxR~ݮ}PPWVRRxR~kPUծݮߩHPSЮVV kPP*bP GЮPUG VRRPRP PVTTSRʏRPSUVTSPʏPW[ GЮPRRVRU[[RRSRTS1PTRTR1^S"UZDTXЬnPRV[?e~ݬaPVݬPRCd[>d[QnPЮR RP QP{RPQPQݬ VRRRߣ^heh,P^uTݬfPSP`$ߤsS S SB~ݬ ݬSݬ@@<@X''@('''''''(x(p'''''''((8(0(X(((p(h(`( (P((('(('x'h'`' ttDLDL4d|, b'j'z''( ('((R("(b(j(r(*(Z(2(:(((''''''r'z(('''''''B('Z'$ @VAXCRTL CMA$TIS_SHRLIBRTLMTHRTL)L%P%T%X%\%`%d%h%l%p%t%x%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|FSP.SAVt [FSP]FMKDIR_MERGE.C;1.C;3;2{*[FSP]FMKDIR_MERGE.C;1+,t./F 48- 0123KPWO56|n|:El7XP҃89GFHJ#define main fmkdir_main#include "clients/fmkdir.c" *[FSP]FMKDIR_MERGE.OBJ;1+,u1./F 4> - 0123KPWO56':El7`P҃89GFHJ9 FMKDIR_MERGEV1.031-OCT-1994 12:41VAX C V3.2-044 ENV_CLIENT UTIL_ABS_PATH CLIENT_DONECLIENT_INTERACTPRINTFFPRINTF VAXC$FREE_OPTSTRLENEXIT  FMKDIR_MAIN.$CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNO CLIENT_TRACECLIENT_INTR_STATE KEY_PERSISTS TARGET_DELAY UDP_SENT_TIMECLIENT_BUF_LENCLIENT_NET_LENLFSP.SAVu1 [FSP]FMKDIR_MERGE.OBJ;1BJ;1j ENV_LOCAL_DIR ENV_TIMEOUT$CHAR_STRING_CONSTANTSPCan't create %s: %s P%s : %s P^Tݬ UTIL_ABS_PATHPS|~S~SSTRLENPI~CLIENT_INTERACTPRb@" ݬdFPRINTFS VAXC$FREE_OPTP PRINTFS VAXC$FREE_OPTP^VX ENV_CLIENTռz VAXC$FREE_OPTWPмUU UTIL_ABS_PATHPT|~T~TSTRLENPI~CLIENT_INTERACTPRb@ UfhFPRINTFTgSP UߦPRINTFTgռ CLIENT_DONEEXIT*[FSP]FPROCMD.EXE;1+,n./F 4- 0123 KPWO56L Dl7!P҃89GFHJeFSP.SAVn [FSP]FPROCMD.EXE;1CMD.OBJ;1}0D`0205Dl6'FPROCMDV1.0,(Dl05-13  ? ! VAXCRTL_001$+CMA$TIS_SHR_001! LIBRTL_001Q! MTHRTL_001%s : (owner: %s)(del: %s)(create: %s)(mkdir: %s)(private: %s) otheryouNYNYNYNY%s %s : (owner: %s)(del: %s)(create: %s)(mkdir: %s)(private: %s) otheryouNYNYNYNY%s .R Remote server not responding. IsendtoEsocket openserver addr//%s/%s/%s%s: %s directory reading out of memory %luk %lu downloading %s: %s %luk : %s [%db/s] Warning, unexpected grab error: %s %luk %lu uploading %s: %s %luk : %s [%db/s] FSP_HOSTNo FSP_HOST specified. FSP_PORTNo FSP_PORT specified. FSP_DIRNo FSP_DIR specified. FSP_LOCALPORT0FSP_PASSWORDFSP_TRACEFSP_BUF_SIZEFSP_DELAYFSP_LOCAL_DIR.FSP_TIMEOUT/.....%s: %s skipping remote directory `%s' remote file `%s' is not a file or directory! `{[*?Pathname too longOut of memory 1Arguments too longBad directory componentsBad directory componentsBad directory components{{}Out of memory 2{{}FSP.SAVn [FSP]FPROCMD.EXE;1CMD.OBJ;1N@(#)glob.c 5.4 (Berkeley) 6/29/88 '-R4zvuyy~&t';7׏%i>[n>}el4S8G!}9Sȡ7/)Q&ņhsE3[Q6*1BxDĴK#րל7(.n%S.B;;HïY,Nwr}HkDD iWEs:w.Z v F/ՓJQ lı^>֜cjt=^&~Ƞ.6{dd).Ri7tLu,C5ͱ#~@FǧT7 ^yz)EKzX!i\btjD*# Xqi!# JVh9sUpk'\x6V (6U*MNq9]7D?b񵬺',naɞnrU'& *(0bբW_"C_,,t%ph qr-=6Ԏ!f˷j+ UߑY2ld 5iO{jv7('{3zY=>Gܪ'>+l:_D*^ $շ!Ϸ#Cz`j:C*lapW񊉫ks(OŦP]o`É# jx'.M &T PR  PRRR P[T[ O ScPRTcPRRcPRRRK P[TL[A [Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/%FSP.SAVn [FSP]FPROCMD.EXE;1CMD.OBJ;1} "URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬvP^oYXZݬbPԮ W[Ԯ[1ծ1?hݮݮSPݮA~PUe@& ݬߩ; ݮ jP<~PV<PVP TP[PSVPVRPPRPRPV[V [ծ1T[<n[nSQVQ OPP*FPV< S QPQTTSRʏRSQTSPʏPVPRRS~PUWWVRRxR~ݮPPWVRRxR~PUծݮߩPSЮVV kPP*bP GЮPUG VRRPRP PVTTSRʏRPSUVTSPʏPW[ GЮPRRVRU[[RRSRTS1PTRTR1^SUZ0TXЬPRV[?e~ݬPVݬSPRCd[>d[QnPЮR RP QP{RPQPQݬ VRRRߣ^hhP^eTݬfPSP`$ߤsS(SS`B~ݬ ݬSݬ ST' TPP^W SݬS PRݬF PRR FSP.SAVn [FSP]FPROCMD.EXE;1R.C;3mR, ѣ(T  ާ(Y֣(R,У(P@$(TЬVЬUV PRU PRRR PRߧ  VR URk RD$<^aVXW@UХkݣ8KP ZfީWkީpkZMPR\bJТVЬWDXf. g.UPУHTVHWVTHXDPUUݢݣ8֣4ZPRZP^ZWn{nSnЬR֬bc{֬ЬVfaPfRR[L2R{ARPP{6.P?PW W"WVff] Vff]Vf[ЬTTUTV1UdRR2RRR,17[R[1)1R{!FSP.SAVn [FSP]FPROCMD.EXE;1C;1BJ;141RPP{ ' P ?PP1[1P[[1P[1dSdUݮV~SdլЪӳ^fhmWd^kȐӥ.|6{x~NuGb펀s&k)I<*A"ƪѬV !`VQ —{*0# o,}Oo.U*ԑ MN|CcstW N]2FA`?}OIaxZ!Ol%TkoF&$<*ж!Z&߻VeWA=UB~:NNyS!Aoؠ]o&*14ӐA΁%XsMa'isH;kTu94`b&Sċ g7)roY84iOJQшY(UNK/%UQ E⺜J%J>9MȓYh! x@'fAiv,U8qW✚.ʐ0rm\E>h&v)5zo6} #p uUw%?!LNLI<9ϤgtilAX@Urn\h.E$%~K0Xh"T8hNƣC\(Ӊ"/C-$+:x}Ʀ,S{O&ߝ. c`TU\&fW1lp*08W ueҒ{|:L3is$##hux3V.:(ivR`T2r(:`hh E\TX)|H!3)\!0*[FSP]FPUT.EXE;1+,D ./F 4- 0123 KPWO56lDl7 P҃89GFHJfRFSP.SAVD  [FSP]FPUT.EXE;1XE;1D.OBJ;170D`0205Dl&4$FPUTV1.0>Dl05-13  ? ! VAXCRTL_001$+CMA$TIS_SHR_001! LIBRTL_001Q! MTHRTL_001%s: not a file rCannot read %s .chdirfput: R Remote server not responding. IsendtoEsocket openserver addr//%s/%s/%s%s: %s directory reading out of memory %luk %lu downloading %s: %s %luk : %s [%db/s] Warning, unexpected grab error: %s %luk %lu uploading %s: %s %luk : %s [%db/s] FSP_HOSTNo FSP_HOST specified. FSP_PORTNo FSP_PORT specified. FSP_DIRNo FSP_DIR specified. FSP_LOCALPORT0FSP_PASSWORDFSP_TRACEFSP_BUF_SIZEFSP_DELAYFSP_LOCAL_DIR.FSP_TIMEOUT/.....%s: %s skipping remote directory `%s' remote file `%s' is not a file or directory! \$sFSP.SAVD  [FSP]FPUT.EXE;1XE;1D.OBJ;1|~d`\XTPLHD@<840,($  8^TݬP ݬTPR PRRRP[Ty[OScPRTcPRRcPRRRP[T|,[[Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬP^OYX-ZݬbPԮ W[Ԯ[1ծ1?hݮݮ{PݮA~PUe@& ݬߩݮ6 jP<~PVd[QnPЮR RP QP{RPQPQݬ VRRRߣ^h)h$P^ETݬfPSP`$ߤsS ~S S B~ݬ ݬSݬY{]_n_=dWwܓ]FLF[ 'Z. % ['ti IO%@hߺpeMP"@"t Of^R8Y㺎2Ѥ]# 7MrzD9E!Oи=pC3X䋼_[E;Z{((\]OQ;z@5' 4|976E~və6~)d fvKI)-Ư7Uds=oB  JՎp/]ytx)wc]C$(~vstMW:o1`j1%ݮ`4-xKX@Fp^n}j@1ꛅi"v\gȦhzڿ`BI̹F$QW]38or- 9` 2ؕ2Q8ZXg $E tnb,T\–.Ǝνa \{^HCfp>sQ(| .qm2GM;JR׻hhGoy{|KW ȇ?+c C\(*Y.σHa1/2[$pe:D,1:Ɉ4`8t'᎐$+.ȝq8%3S*F&Ѡ5`}ևt@gy`+WSYM֪z-oxp~C8ȧ4ΐl?R,DU;u}F>+s0"3;n}PD(+S.dDMFYUYmH)ɝ+Y@X>aYsDΡ[V'qwoCke%ޗ:pԸO~QR +w;wUэy ͛GR "̍V$]k<vSq]0@:nLU FUPd~DD&Zˑ%]"u-V؅enP o5qI@.iV6.zatWy}6RTW|]⑪.V"nn G$ַ"Y~UػE: y<_+ u^g(`4e64oŒaqF1>C7^@#Z-4YxXB],/sM CT+ەn\}x,,e-2Y&ְ_O1ƓMe lH7S)N kYH6 VqP%=s!0qpzD,Ћ~H<4-{+?&T PR PRRRF P[T[B O` ScPRTcPRRcPRRRP[TX[[Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬ&P^{YXYZݬbPԮ W[Ԯ[1ծ1?hݮݮPݮA~PUe@& ݬߩݮ jP<~]PV< PVP TP[PSVPVRPPRPRPV[V [ծ1T[<n[nSQVQ OPP*FPV< S QPQTTSRʏRSQTSPʏPVPRRS~PUWWVRRxR~ݮPPWVRRxR~oPUծݮߩLPSЮVV kPP*bP GЮPUG VRRPRP PVTTSRʏRPSUVTSPʏPW[ GЮPRRVRU[[RRSRTS1PTRTR1^SUZd[QnPЮR RP QP{RPQPQݬ VRRRߣ^hih0P^qTݬfPSP`$ߤsSSS B~ݬ ݬSݬY1PTZ TUZ1%nPnnl?QUPnR RP QP{RPQPQݬ UPPPýhhYPP^!VWRYUXTOPd!L%Pd"Pd3ScPfAfCcPgPgRc\P\\)\cPP]Peekݣ8P ZީWkk54H:t{C$akJ nNZHkM&kz$I?wY&7Wj꣑; ïĩľ@DD6_2fbU"v8H̙h ^¼iXtjMZK},ƟZ=dUS[@ޤiƣj%HF㈥n2J_3`xq^UvƐvE7H[#iBnEHVr]@;Ɂq]10!Z[V-JQI L'((+llw|Ss햳_&N^,Zm@>ǚv)o-ݪ/ reo%"BJ""TJjїk{b]J; ܸ6ͣN,Wn@?Ջu"@_m9/uE,N50蓅¥?A'Юk&'hIsq/s:\ϩ@CplLƅDMtVگ!rd%{FO&Ί'̥>r8%Pvaot(؇Md*֪31+ X BNa#:˷‡f(0VvnHn] C)0>΂VVp~nqm,LɌ*P2 U6 Y7DJp KbچC7I?}=ؔ嵔W䇻f|W3Hh?k\BB^7]Ys?P5?2gWw;2DT;UU@Jkv*k8ߒ1lƼ7>Cp _9n4fFY'`ܪolqB ­\ VQ qŏr>KknɵjPµspT^o8ȸZ23q2;:QA0,n2(U_r9EAa םOD3E7v_FE/< <|RА$sm%f/*qAF7 r@s| WcLb򌈚 MQPџ)P0$[wƷ}|ǐKoaOT|82&q:8P4wS8Zl|p$^ {mJm {# 5ˈ{k|3xwx'`,08fRx>z!c(1>ogJVB҄ǁ=e^#>ѯ+xYm AJc#Ý2CLIENT_NET_LENC_FSP.SAV  [FSP]FRMDIRCMD.EXE;1;5OBJ;2W0D`0205}Dl20 FRMDIRCMDV1.0̜}Dl05-13  ? ! VAXCRTL_001$+CMA$TIS_SHR_001! LIBRTL_001Q! MTHRTL_001Can't remove %s: %s R Remote server not responding. IsendtoEsocket openserver addr//%s/%s/%s%s: %s directory reading out of memory %luk %lu downloading %s: %s %luk : %s [%db/s] Warning, unexpected grab error: %s %luk %lu uploading %s: %s %luk : %s [%db/s] FSP_HOSTNo FSP_HOST specified. FSP_PORTNo FSP_PORT specified. FSP_DIRNo FSP_DIR specified. FSP_LOCALPORT0FSP_PASSWORDFSP_TRACEFSP_BUF_SIZEFSP_DELAYFSP_LOCAL_DIR.FSP_TIMEOUT/.....%s: %s skipping remote directory `%s' remote file `%s' is not a file or directory! `{[*?Pathname too longOut of memory 1Arguments too longBad directory componentsBad directory componentsBad directory components{{}Out of memory 2{{}ʱFSP.SAV  [FSP]FRMDIRCMD.EXE;1;5OBJ;2+@(#)glob.c 5.4 (Berkeley) 6/29/88`bPH)D)@)<)8)4)0),)()$) ))))) ))))((((((((((((((((((((^ݬPR|~R~R'PF~`@& ݬ''R'PP ^]['Zռ1Ym'XWg'V\'UPЬRbg#PS ޭSbԭ FSP.SAV  [FSP]FRMDIRCMD.EXE;1_ORIG;1:cBPЃTTiPR|~R~RhPF~g`@ TkjfRePcռ!&^W,[uTSݬ PcSݬPcЬ YVYRYRЬR֬bYRYRЬYYRYRЬR֬bYRYRRRVnPS<~xPc<RxRRʏRR R<SʏSˏRRS QnXXUXRXRPPUXPXPURURRծ Ѯ1[PxR&RRR 1PRR kkg7%\լ#Ѯߧ8%)%% x kߧ"$ݮ dPߧ$$$$PBxdVVkߧ+v$ݮ ߭5P z$1P1߭< ~dPѭ 1SSRYSQUQR PPUQRUPUPˏPUUY1<~PZ Ps PPPʏPa ZPPW<PPP<~NPT PR PRRRF P[T[B O` ScPRTcPRRcPRRRP[TX[[Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬ&P^{YXYZݬbPԮ W[Ԯ[1ծ1?hݮݮPݮA~PUe@& ݬߩݮ jP<~]PV< PVP TP[PSVPVRPPRPRPV[V [ծ1T[<n[nSQVQ OPP*FPV< S QPQTTSRʏRSQTSPʏPVPRRS~PUWWVRRxR~ݮPPWVRRxR~oPUծݮߩLPSЮVV kPP*bP GЮPUG VRRPRP PVTTSRʏRPSUVTSPʏPW[ GЮPRRVRU[[RRSRTS1PTRTR1^SUZd[QnPЮR RP QP{RPQPQݬ VRRRߣ^hih0P^qTݬfPSP`$ߤsSSS B~ݬ ݬSݬY1PTZ TUZ1%nPnnl?QUPnR RP QP{RPQPQݬ UPPPýhhYPP^!VWRYUXTOPd!L%Pd"Pd3ScPfAfCcPgPgRc\P\\)\cPP]Peekݣ8P ZީWk`RE"%CoKJn]JR(f4t*tX-wj,go3vS&V[ŗt.թi>לd'+r̾ǢOU VI\3fUnLi-("SA! SJȨL 2%uA `+֌ܬc}(#sAH "ӹy;z_*9^7\3:>rb4o2R3oq^';$#4Dw͟А]H+s/sY,=_Qz` jHKmά$C] &m sB ,k<߀=3@̤X_۝q/ !K41T|kǒ`1BJ(/i similar to an anonymous-FTP archive. It is not meant to be a? replacement for ftp; it is only meant to do what anonymous-ftp= does, but in a manner more acceptible to the provider of the+ service and more friendly to the clients. > Providing anonymous-FTP service can be costly --- each activeB session consumes one process slot in the OS and one stream socket; entry in the network sub-system. The servers can also runA concurrently, adding to the system load. A popular archive site< can easily be overwhelmed as a result. Some were forced to< shutdown and some impose inconvenient access restrictions. B Unlike FTP, FSP is connection-less and virtually state-less. One@ server handles requests from all clients machines. Each active= client machine takes up 16-bytes in a dynamically extensible@ table. Since only one server exists on a server machine at anyA time, the load added to the server machine is no more than one. A In exchange for allowing site operators to keep their sites openB and do away with cumbersome access restrictions, this is what the clients accept with FSP: > 1) Lower transfer rate. The maximum rate is 1 kbyte per UDP? message round-trip time between the client and the server. > In addition to the potential for more abundant sites and more: accessible sites, this is what the clients gain with FSP:? 1) Robustness. Since FSP is connectionlɗa1FSP.SAV  [FSP]FSP-OVERVIEW.TXT;1K ess, flucturations in@ the network will not abort a FSP transaction. Furthermore,? the 16-bytes of data for each client can be regenerated at@ any point during any transaction. Thus, if the server goesA down at any point during a transaction, the transaction will6 resume when the server is restarted. (like NFS) B 2) Friendlier user interface. FSP does not have its own command@ interpretor like FTP. Since it is connectionless, there is@ no reason to carry much information from one command to the@ next, and the commands can all be made into individual unixB programs. For instance, there is one program you run to list; the directory and another you run to download a file. C 3) Client protection. FSP oversees a directory structure similar? to that of an anonymous-FTP. However, a directory createdC via FSP transaction is owned by the client machine that issuedB the creation request. The client can create and delete filesC and subdirectories in that directory. In addition, the client? can enable any of the four attributes for that directory: ; A) Give all other clients the permission to create files.: B) Give all other clients the permission to delete files or subdirectories.9 C) Give all other clients the permission to read files. (this is true by default)9 D) Give all other clients the permission to create sub- directories.? Note: A subdirectory can be deleted if it is & FSP.SAV  [FSP]FSP-OVERVIEW.TXT;11K empty and the! client owns the subdirectory.@ 4) Server protection. FSP server does not spawn sub-programs.@ It will accept only paths that are downward relative to itsC designated working directory. On systems with symbolic links,B the server will follow symbolic links, but it does not follow> uplinks (".."). Clients cannot create symbolic links andC care should be taken so that other users on the server machine> cannot create symbolic links in the server's work space. A It is also fairly difficult to formuate an attack to force aB shutdown of a FSP site by actions of a rogue site. About the@ only way to distrupt a FSP service is to flood the FSP site; with network packets. FSP server prevents itself fromB 'counter-flooding' by filtering for legitimate requests using the following method:; A) Each request message contains a key. For each client,9 server database contains the keys to be used for the= next client request and for the previous client request.< B) If the next request does not contain a key that matches< either of the two keys, it is accepted only if at least9 one minute has elapsed since the last time a request4 is accepted. If the key does match the old key= (retransmit by client) it is accepted if the elapse time is greater than 3 seconds.8 C) Every request message accepted is acknowledged with9 one reply message. The reply message contains a new6 kFSP.SAV  [FSP]FSP-OVERVIEW.TXT;11K )5 ey to used for the next request. The new key is7 computed by the server with a pseudo-random number generator. A Flooding is a ballant violation of network etiquette becauseB a site can be subjected to flooding attack whether it has FSPA running or not, and flooding congests every link and gatewayC between the rogue client and the server. As a further measure@ of protection, the server loads a table of rogue clients onB startup. The server will not respond to requests from any of those clients.K ***********************************************************************J A mailing list for the discussion of the FSP software is now availableH (started Oct 2, 1992.) To get on the list, send an email containing' subscribe fsp-discussion your-name3 (with `your-name' set to your email address) to listserv@Germany.EU.netG Articles to be distributed to the subscribers should be sent to the following email address:% fsp-discussion@Germany.EU.netI Do not send `subscribe me'/`unsubscribe me' requests to that address!*[FSP]FSPD.EXE;1+, .B/F 4BC- 0123 KPWOC56TDl7 Q҃89GFHJoFSP.SAV  [FSP]FSPD.EXE;1XE;1C;2BY0D`0205DltFSPDV1.0<Dl05-13 &/'V @ ? ! VAXCRTL_001$+CMA$TIS_SHR_001! LIBRTL_001Q! MTHRTL_001wVMS Version 2.7.1, May 21st, 1993 %d.%d.%d.%drcv (%c,%d,%d,%lu) <--- %s %s %sVERSION %s %-8s /%.*sGETDIR%s %-8s /%.*sGETDIR: ERROR %s %s %-8s /%.*sGETFILE%s %-8s /%.*sGETFILE: ERROR %s (%d) %s %-8s /%.*sDELFILE: ERROR %s Permission denied Permission denied: ERROR %s %s %-8s /%.*sDELDIR: ERROR %s Permission denied Permission denied: ERROR %s %s %sUPLOAD: ERROR %s Permission denied Permission denied%s %sUPLOAD: ERROR %s %s %-8s /%.*sINSTALL: ERROR %s Permission denied Permission denied: ERROR %s %s %-8s /%.*sMAKEDIR: ERROR %s Permission denied Permission denied: ERROR %s : ERROR %s %s %-8s /%.*sGETPRO: ERROR %s %s %-8s /%.*sSETPRO: ERROR %s Permission denied Permission denied: ERROR %s : ERROR %s %s %-8s /%.*sGRABFILE: ERROR %s Permission denied Permission denied%s %-8s /%.*sGRABFILE: ERROR %s : ERROR %s %s %-8s /%.*sGRABFILE: ERROR %s %s %-8s /%.*sGRABDONE: ERROR %s Permission de8GW FSP.SAV  [FSP]FSPD.EXE;1XE;1OBJ;1Bnied Permission denied: ERROR %s : ERROR %s %s %sUNKNOWN (%d): ERROR %s Unknown FSP commandUnknown FSP commandUsage: fspd [-f configfile] in.fspd-fnl:rnl:wnl:wwError opening logfile: %s, logging disabled. nl:rnl:wnl:wselectNDFSP service not availablecheck_ip() returned illegal host type find host failed Permission denied -- can't identify host. Sorry, we can't reverse name you. If you know that your site normally can be, try again in a few minutes when the local maps may have been updated. Otherwise, this service will remain unavailable to you; check with your local admins for why this is the case. snd (%c,%d,%d,%lu) ---> %d.%d.%d.%d Average throughput: %d bytes/s | %5d Throughput too high, waiting. sendtosocket openlistening on port %d Badly formed address in config file: %s.IPTAB_DUMPw%3d-%3d.%3d-%3d.%3d-%3d.%3d-%3d %c `%s' grow_htab reallocgrow_htab malloc.HTAB_DUMPw%d.%d.%d.%d %5d %srUnable to open configuration file: %s. Exiting. Bogus line in configuration file: %s. Exiting. confNo recursion of conf commands allowed. Skipping. readmehomedirlogfilecachedirhostlognonealltransfersversionerrorsgetdirgetfileuploadinstalldelfiledeldirsetprogetpromakedirgrabfileportthruputoffsetuidoffdaemonizeoffdebugoffusecachediroffrestrictedoffreverse_nameoffread_onlyoffInvalid command (%s) in config file, skipping. No port set in config file. Exiting. No home directory set in config file. Exiting. .README<%cFSP.SAV  [FSP]FSPD.EXE;1XE;1;2BNo log file set in config file. Exiting. No cache directory set in config file. Exiting. sys$login:fspd.confcheck_pass: opening file %s r%scheck_pass: no password in ownerfile Check_pass: read %s, check with %s Path must have non-zero lengthPath not null terminated..check_path: found password field %s Path contains illegal charsPath can't begin with '.'Path can't contain '//'.Can't open dir during initialization .r.dir$%s.N%x%s.L%xrrCan't read directory listingwCan't write directory listing name filew+directory unreadableCan't cd to directorychdir2Can't find directoryNot a directory%s/.OWN%08X%s/.FSP_CONTENT%s/.FSP_PRIVATEThis directory is privaterCan't read directory listingw+directory unreadableCan't cd to directorychdir2%c%08Xunlink: file not accessibleunlink: not an ordinary file/.OWN%08X/.FSP_OK_DELno permission for removing this fileunlink: cannot unlinkrmdir: directory not accessiblermdir: not an ordinary directory%s/.OWN%08X%s/.FSP_CONTENT%s/.FSP_OK_DEL%s/.FSP_OK_ADD%s/.FSP_PRIVATE%s/.FSP_OK_MKDIRno permission for removing this directoryrmdir: cannot unlink/.OWN%08X/.FSP_OK_MKDIRno permission for directory creation%s/.OWN%08XCan't create directory/.FSP_PRIVATE%s/.FSP_PRIVATE$Can't find fileNot a fileget_file: going to delete cache_p: %d /.OWN%08X/.FSP_PRIVATEno permission for reading this fileInvalid FSP_PASSWORDrCan't open filegetpro: directory not accessiblegetpro: not an ordinary directory%s/.OWN%08X%s/.FSP_OK_DELugKFSP.SAV  [FSP]FSPD.EXE;1XE;1;2BK %s/.FSP_OK_ADD%s/.FSP_PRIVATE%s/.FSP_OK_MKDIR%s/%s rgetpro: directory not accessiblegetpro: not an ordinary directory%s/.OWN%08Xno permission for changing the protection-mode%s/.FSP_OK_ADD%s/.FSP_OK_DEL%s/.FSP_PRIVATE%s/.FSP_OK_MKDIRbad flagbad flag%sT%08X%04XT%08X%04Xr+wCannot open temporary file/.OWN%08X%sT%08X%04X.server_install: owner_p: %s, tname: %s, pp->fullp: %s /.FSP_OK_ADD/.FSP_OK_DELno permission for creating that fileno permission for replacing that filerCan't open temporary filewCan't open file for outputwCan't create long named file for outputgrab: file not accessiblegrab: not an ordinary file/.OWN%08X/.FSP_OK_DEL/.FSP_PRIVATE/.G%08X%04Xgrab: no permission for grabbing this fileInvalid FSP_PASSWORDgrab: cannot make linkgrab: cannot unlink/.G%08X%04Xgrab: can't find filegrab: Not a filergrab: can't open file/.G%08X%04Xgrab: can't find temporary filegrab: can't delete temporary filehome on %s cache on %s strdup(): not enough memory to duplicate `%s' initstate: not enough state (%d bytes); ignored. setstate: state info has been munged; not changed. .DIR;1/000000//DEVICE_LIST_ROOT/rmbf=2mbc=32wmbf=2mbc=32.DIR.;000000.;.%s*.*%s;*mbf=2mbc=32shr=getmrs=1024mbf=2mbc=32?!:ebiFSP.SAV  [FSP]FSPD.EXE;1XE;1;2B ******************?91$21fB];޵o @HkIt۱Y\Teh.y=kC-*.gڈʈ]si5O֏Qokna?A6"Ƹ*{׈ "G'8  gnivre7yI;1AvXfzF"Z@O)Jj*_G2ģ:EbuV DH0YM8Wsw#lFW^K}7q>,6 h.9Fi#3J'q|HZyrT\' [E>;ud4DGTxr` +{lQ~kvn=1zPTm ~'@~^I0C0Wy]$>".D% 64&1: LEmhmP\{J ;|zs#b9SjaRn4O)|RBXgKPteG]n7hNѥ?eo){h/i;t:lO| 9r%|"T U>͘Of\V]0sP6/mu&$wdyt'5/W_ AZ%- &&i"h62gQ6LYcs %ne0w_BBb# pGX^(%z'HF8N ,z4JX'DVFoO<hVZ\[y$Lz;EQ2 6U,O. o`C N0 mJN)u QK Z2dq0bd+",P=Z9\ bo M)by"C/u%_qVg"]4SHq0]TBeT BhCxo;C]=SByg; svL~_/\jhgI03A9]+9> H(WWqiw=Y-qWB@wTP],UqL>!3yVkNs "))duA. O,BPfE;]&62%5P^J6 BC1 ]o+@)C2g6m$i`kL|<6aWQxRI:1%O5MBGky9t]|h7aM*j11(4Ws|X*[FSP]FSPD.EXE;1+, .B/F 4BC- 0123 KPWOC56TDl7 Q҃89GFHJ!uFSP.SAV  [FSP]FSPD.EXE;1XE;1;2B ````` ````______________________________^R"?7ެQQQP`PQPbPP~n^bPP~F^P|<^VUT`SeAd=fcPP(d^'fbYPd f]eeKdG]P߭]P\\]PRBl\c\\~] BcRRP^\ l}]^{TWUߤ+]ߤ$]UUUUgUЬR \SPc \Vf@ fPU@ g1S^Pc fPQˏgPPPPA fPQˏgPPPPA fPQˏgPPPPA fPQgA  fPPRݬ fPPR^#RYЬSݣPZ<~ʓ%FSP.SAV  [FSP]FSPD.EXE;1XE;1_ORIG;1BPXPP P WXWnLi4ЬPՠ РV%P~~~`~ߢ&x[xV VZݮX~ߢ2[a[լ 'ЬS PQ<PPʏPQPP ЬTUЬS< ~Pec[ЬPdSS1:SA1SPPA }yv ` E 1&?Piլ jߢTVߢN ݬݬ>iլ  ߢ\լ ЬS|~ݬݬ Ziլ  WXߢlVߢ^ϧDXW)PT߭[D_0PTuZ$i iլ ϼWXVߢsViSSSլ .Tˆ<CZSլ ”%Tݬݬ:nݮ ݭݬݬpݭYZiլ –Z!iլ WX¦V˜ϩDXW(PT<~[߭DM6PTwZ%i!iլ ϺWX¼V®SiSSSլ /T9@PZSլ !Tݬݬ6Z%DJiլ  -nݮ ݭݬݬCZiլ ϱϸiլ WXVϊOiSS Sլ .fmPSլ JQݬݬdլ qDXW#'PS[D/PSKiTTTլ ,S"PTլ .Sݬݬ|~ݬݬiլ 0Ϝϣiլ WX@V2uNiSSSլ -SGQXPSլ e6=gݬݬPլ qDXW&PS[DY0PSKiTTTլ ,SyPTլ …ϾSݬݬ|~ݬݬiլ ‡ψϏZsiլ ϼV‰YNiSSSլ -¢–FSP.SAV  [FSP]FSPD.EXE;1ERGE.C;1G;1B5<PSլ ´!¶ݬݬ4լ 1<~[ZXWp8PSrZ!iiլ !VϾiTTTլ .SϤϫZTլ φύSݬݬ|~ݬݬZiլ LSiլ όWXV%oNiSSSլ -PSլ ݬݬլ uDXW#PT<~[Da8PTKiSSSլ ,T-φύPSլ 9jqTݬݬ|~ݬݬ iլ ;4; iլ tWXKV= WNiSS Sլ -_SP Sլ qsݬݬլ qDXW"PS[D.PSKiTT Tլ ,S…ryP Tլ ‘V]Sݬݬr[WD2PSHiTT Tլ )S“ Tլ ŸSݬݬЬS iRPPSݬ iլ ¡ϳϺ iլ WX±V£όDXW!PT[WD1PTKiSS Sլ ,T¸JQP Sլ .5TݬݬJ ЬST`Pd QPPSݬ) iլ iլ WXVϰMiSSSլ ,όϓSլ ryݬݬ լ qDXWK PT[ݮDJ2PTHiSSSլ )TSլ Tݬݬ [WDJ0PSHiTTTլ )SϷϾTլ )ϞϥSݬݬ ЬSTPd OPPSݬ iլ +GNZ 4MFSP.SAV  [FSP]FSPD.EXE;1ERGE.OBJ;11B v iլ {WX;V-^MiSS Sլ ,PD Sլ bdݬݬ DXWPSvZ%i! iլ WX„VvςiTT Tլ .ShoZ Tլ ™JQSݬݬf Ь SaZ]<~[D5PTGiUU US)T› US§Tݬݬ <~[߭D7PSxZ%i! iլ WX·V©όiTT Tլ 0SryPZ Tլ RYSݬݬn nݮ ݭݬݬ ݭMZ iլ  iլ HWXV+NiSS Sլ -ϽP Sլ ϢϩݬݬDXWPSJiTT Tլ +S]dP Tլ %BISݬݬ^Ь S]<~[D6PTGiUU US)T' US3Tݬݬ|~ݬݬ iլ 5ϩϰiSլ =V7φլ  ~Etլ WKbikݬݬ|P^\LKK< ^ݟS*UKTÜݼlKQPQQeѬlѬdtKKKäЬPݠ/KPdFKKѬЬPРﳹЬPe=CKëçJRb/Kñíbd÷óbQg5nfJP ~J4%:!P`/ùPEPûd_Je_׸JJ-JRboJbdbIP IJP8e ZFSP.SAV  [FSP]FSPD.EXE;1ERGE.OBJ;11Bwݏ2~%PI^ٶPμ^ﯢVIYIZ﮶Txդ Ԥݬ߭6PRRifAIIR1߭< ~ݤPѭ <~P PP1fPUlަ RަRRUePPD "1?PJ1XޮSЮP PPQPRЮPc`aRQRЮPc`a퐏@ЮU PPR~ݮX1P1Pjߦ$HGT PUjߦKGGեqkiX ަ]ޮSЮ P PPQPRЮPc`aRQRЮPc`a퐏@ ЮP PPR~ݮX1PX9GP<~IP[< PP[; [ [,P<PP[PѮP1X<PѮP1ЮRRSnRQЭWQS PPPWQSWPWPˏPWWn19UXݭ1 P^7PRRPRPR\\PxR\\PRˏRP^yV[״Z|FWqSj:ЬR~~~~ЬTݤPݬݬ d~ƕg EЬUXݬ Ph R RURQUTYTQPRRYTQЬTYRYRRk1P߭EЭUУ4TUTT TRURPPPRPB P Э42PUT*P Rޣ0Q4PСQPRԣ ֣4ѭ4PUP PRPB UP  Uj9UƺgE Tޣ4RݢgDRTgDUk R RR !j gD~D1 Pݬ R R~ݬݣPDQD^ЬP PPQPRЬ P֬ `a Ь P֬ `ЬQ@a PPR~Q^aDXRѬ'ЬScPxPQPQPVVV <V<VЬSݣ vFSP.SAV  [FSP]FSPD.EXE;1XE;1C;27BDPTX2ݬ CTcCPSݬ TSXCSKCݬ NCTPTݬ 7Cެ UeVެWgS CPT7h.R*SReV BPT hRT ^)S6RQPQPQ@ Q ߢ4BЬbb.PѢ BB3 bBBB9BXiP PXP 1p1gPBZiP'IXiP 1AXP10MZiP#WXiP 1 1P[ZiP#aXiP d1Y1PeZiP#qXiP $11PuZiP#ŀXiP ~PsPńZiP#őXiP NPCPŕZiP#şXiP PPZţ43n<~~2P1?P^Ŏ\3R; ob2~}2b2~]2#)V P 1bJ2~2ﵠ Š[b"2~1P^S:2T\\RPÌRRϰV FSP.SAV  [FSP]FSPD.EXE;1XE;1C_ORIG;2B(d1~1*d1~x1>)qP*  1de1~61П [d=1~1^️R著Td ݬb0ߢݬ?,PS߭ߢSi0Pd ߢ"Z0S0PS0dݬ߭ߢH10ݬq0|^)TVլޤlPS޼RCbċPЬ RĤ ĦѬĨТbPЬ RЬТbbSUc1PcRR  Ь PScf"S~Ī~/R R~PcQQ&cQPP& )\\\\\\\)8 P?PP\3UP$c'UPЬ PЬ ìSSUPUSc1PЬ PàSP^ЬTЬPР SРPPQPRQ RPRPTPΤ^﷍Tg'Pn@//.<Z<~P͹PŐͺƐͻǐͼ.PjPͽP;ͿÐЬSS .UeSEe ZRSRRReRZns(P[1-Y..--X- kSc~iPcPSc~iPckRR PRr.bkRb&N\bGR)PSR&bR1hS<~B-S-&bRb\19b..1&1k,P1 g!-l!j9{ !zĒy@OvKE\76ד7[HGGC'-ދN[7k%>4*/#j&\}wq$LP9ݭpkA`oW. 4?Yx/d%!.KdЦ0=McF`]3J11!jϰKٴQpgZ3wWXn/bEׅP*b-&ANha4M=K/ќQ~ A xmgNk7JA,CtkGJU )P`2M^7LP3h l?fVy(~ƣ犨 =V)ټzxP%whbJD?[eo7qd'Xc*0;MdNH0^P0ąxr-Єt-O>ry 海 KL@Qϛ^ t_ υ/C\ bǍ/IЇ"FQY_8 *㊱m*$2kwT< ;cϻwm,ڐ `qJj{f#275Mb˄W0D_8mKh! g.d3 N\;+"m R ml1l՛Ls~/҅! d#*u64#7#I>_Jv}!j:-9UFUOE+^;PK!һ6waƂWTa~7pz ;w"v֋%٠-aux[xׂ _ô%C*HJ6M4#rw~IѼu"> P&: <5IvnK[^Z<̬ͭ/Q6"I@?*W3 a#dR3ݫ_yIw8"vr^&x NYV.ȀacRkbSie;ujB Ly8,~, K8zd*S6:10U \/-an9ړDt}UKH)0XaFMFSP.SAV  [FSP]FSPD.EXE;1XE;1C_ORIG;2B&3.bcĎ͛bcĝ̓bcĬSbcļ;bk}PPkߞ %Rbͳb͛bSPS̓bQPQQUSbQPQQV;bQPQQR#6 P1S<~<~͛r P%U<~<~̓P P$V<~<~S. P$R<~<~; P$kP<~<~kP$PݬݬMPPδ^Wݬ XЬVXSЦ TЦPPRPUR UPUPcS$XЬVXUЦ RЦPPTPSTPSPSPeU#PP%PݬЬRbJ#b"PVPݬݬamʹVЬUVTХ RХPPQPSQPSPSPdT)#ʹP0ݼ{ʹ#<~<~ʹmP #<~<~MP"PD^_WDZIYЬRѢLMRVЦRURSRTcP"UxURPRRU PxURPRUPU&ǟݦi" ЬTdP+Njd!PS.dtPǍP R S.R iTKߧH TKV PSS PЬS ݼPc"Pݼݼݬ <~j PjPhPΘ^~SVмRb.<~͛PR͛͛-P2PgFSP.SAV  [FSP]FSPD.EXE;1XE;1C_ORIG;2B1^լЬPݬPPXPRݬyݬRRP^iR´ ЬҰPЬҰP¸$°SPQŏmNAAcQ90Q@cPP¸°T¼SCd¨d¬Q ¸SQS1P´"ŏmNAҰP90PˏPҰҰTMҬҨ¨SxcPˏPTS¨¨°¨¬P¬¬°¬Q ¸PQP1{P^i~R°QT´SSPQ¬PPPSPЬ SS *SSxhP|´¼fPS@´¸¼IPS´¸¼-PS´¸¼P´?¸¼ЬP°¸P@Ұݬ´S °PSP°QQ¬PPPSPTPP^wWF}SЬUzeP{PQPPTeVðPXôQQPPìRRRQRTPPz?PTôDcøDüߧ2Sðô&ðTFdìüVRzRP{øPQPPRBdèøRBӰXP^y|\̴"ŏmNAܰP90PˏPܰܰRMܬܨ̨QxaPˏPRQ̨̨̨̰̬P̬̬̰̬RP^P^P^P^ݬ <ά^ݬͭ PP(PR ͭͭ PfFSP.SAV  [FSP]FSPD.EXE;1ERGE.OBJ;1BI":PPP<L^ݬOk PP(` LNPNMXV(P LԋSSOO; P0HP'O P@O] ЬR@ PPݭu P ЬR  ЬR@ PP^Q..QQPP^ݬ  ^)uS<~ЬTT ߣT PR#RR PߣTT{ PRbߣݬ P ߣ#ݬ Pά^tVЬXYXPWKP(PK ͭ PͭPW ͭWWPߦ-ߦ'ߦ%ݬ8 PTPߦ<ߦ6ߦ4ݬ PS Tb PT<~ PR+SR T<~ PRT S P^ݬ <^sRЬT /ЬUU PSUSSߢCS. P=ߢH PP'@ ߢKS` PPTU PP|^ެTдUެSгVԴx~ PRUP߭cdBf RRUP^*ЬRR0 P$%R! Pݬݬ ݬRPݬݬ ݬݬ^ެRѲBTxT~ PSQղ PAAcQQЬ RbSbTЬTTPS4TW PRSK RPST7 S^SЬRbSb޼ R޲RЬC^ЬP `Ь^ݬЬQЬRPaRQP<4^iqSRޣS ݮ RQЮ RPaRTЬRRTQPaRRЮTRЮRЮU|~߭蟭iPʂXPOP P߭ЬR +;ЬR OP` PpԢtբR0ЬP P^P^<~ݬPPQ^Ь^mRߢ#ߢߢߢ=^}mRߢ2ߢ,ݬ ݬݬ^2P^ݬUPPPP ^PЬSS!P ãPPPRPRP^ mTݬݬ.ݬP,.PPPR_bRP.PPPRЬSdSPSP_dSPSP^cSTެWзެUTeTVDfQQRa  RQa aPa aSPSR@QRQab SPSR@TTeݬ S6TFSP.SAV  [FSP]FSPD.EXE;1ERGE.OBJ;1BpQ@@@mX''@('''''''(x(p'''''''((8(0(X(((p(h(`( (P((('(('x'h'`' D|$" ,$ddltL,DL,dtL<|DL4dD , 0 8 t b'j'z''( ('((R("(b(j(r(*(Z(2(:(((''''''r'z(('''''''B('Z' @VAXCRTL CMA$TIS_SHRLIBRTLMTHRTL, $(,048<@DHLPTX\`dhlptx|*[FSP]FVER.EXE;1+,./F 4- 0123 KPWO56LkDl7Q҃89GFHJUFSP.SAV [FSP]FVER.EXE;1TUS;12Lo0D`0205YDl((&FVERV1.0̯YDl05-13  ? ! VAXCRTL_001$+CMA$TIS_SHR_001! LIBRTL_001Q! MTHRTL_001FSP version: %s Logging of all server transactions is ENABLED. Logging of all server transactions is DISABLED. Remote server is run in READONLY mode. Remote server is run in READ/WRITE mode. Server REQUIRES connections to reverse name. Server DOESN'T REQUIRE connections to reverse. Remote server is run in PRIVATE mode. Remote server is run in PUBLIC mode. Remote server throughput control is ENABLED. (max %d bytes/sec) Remote server throughput control is DISABLED. Local FSP version: %s VMS Version 2.7.1, May 21st, 1993R Remote server not responding. IsendtoEsocket openserver addr//%s/%s/%s%s: %s directory reading out of memory %luk %lu downloading %s: %s %luk : %s [%db/s] Warning, unexpected grab error: %s %luk %lu uploading %s: %s %luk : %s [%db/s] FSP_HOSTNo FSP_HOST specified. FSP_PORTNo FSP_PORT specified. FSP_DIRNo FSP_DIR specified. FSP_LOCALPORT0FSP_PASSWORDFSP_TRACEFSP_BUF_SIZEFSP_DELAYFSP_LOCAL_DIR.FSP_TIMEOUT/..#`FSP.SAV [FSP]FVER.EXE;1;1C;4...%s: %s skipping remote directory `%s' remote file `%s' is not a file or directory! lnaEFSP.SAV [FSP]FVER.EXE;1;1C;4;KLHD@<840,($  ^SUѬ15J|~|~;PR<~mPWݢXPV PWPTPcRbV1dߣbߣBbdߣt PÝud f Yd (J P=dew.TdPxPPʏPPUTdPxPPʏPPUTdPxPPʏPPUTdPʏPPUUåPú2^wW[TSݬ PcSݬPcЬ YVYRYRЬR֬bYRYRЬYYRYRЬR֬bYRYRRRVnPS<~U3Hnp. t `0 ' 1q8=XoZަ=zrR~т?]^bQϿ>W 6h \z3RcS x,p( B> A+DO h-_"rti9ppCnSS&"ø:$&,CZ7 ^ !NVRZ/R%ƟPpn('N1 Y}.߿e>G`~#cLoĚeπ&CaR5b79|%q5Iܽ*@Lɸr6Ċn.k𡃌Df;g$jHAHh`Vg6"Ѳp wN(ɣ;|?ix]C h($mrR{?Vb}H7sشa1(e~IJ'>=헏ްIpDn?͚,j?4QjHD16u^SR"MF4;(sT c.`B Ը] dRFcēGP80Y!+OGfkcb>4NPT+a_tA(^~Vr6[;ª.L4EK^Z+l( vA]XzJ7adA<~~p>DVxr)rGVl!vbX/V# X-΄˯ n+q)}]u,kp {Z}S>6oŹL?9d(ZUPwef3ЍlChWRh[:bQ}Tn$Uʬ$џ88%9*E _~~17LjCK+_^KACJd5l0(ͅpS<1AQFHqX pi꽧:4YF۞FU6D%>= zw3AH90b/:ptݚUFSP.SAV [FSP]FVER.EXE;1;1C;4p 9PV1P֮12P ^S.Rg߬ }Pbbߣ-ݬݬPߣ9Pݬe^|~|~J~<,^((ԭ<~P0PTTP߭<~TPPݭTPP߭T)PRTRPЬSc<~WPcTP<|^( լ~|ݬwЬ SݬPPRRc@ݬBPQ-бUTС RRSRPSPPRPR PЬ T<~lPP ^ѬGѬ<ǏzP{PQPPRŏR|~ݬ w|~ݬ f^ լЬTd/>T-PRPRRRP[Tu[OScPRTcPRRcPRRRP[Tx([[Ue1Pe/B/,UZUYZTZXYWYVXRVSgd/U[ e[Pe.1.1URR[ e[PURR[+/%URUSRTRPSRSQbd11/U/JUTUU[e/PUU[e/U[d/URRSRPc11[Pe.1}URR[ e[PURR[(/"URUSRTRPSRSQbdB;/2/'USURRTRPSRSQbdUPUe1w[PP^լݬP^KYX!ZݬbPԮ W[Ԯ[1ծ1?hݮݮPݮA~PUe@& ݬߩݮF jP<~!PVPRV[?e~ݬPVݬPRCd[>d[QnPЮR RP QP{RPQPQݬ VRRRߣ^hh P^ATݬfPSP`$ߤsS zS S B~ݬ ݬSݬ-VF@>j`d.S46f<>ٓz3u s& M[а$mK>_agh z=v rԯ 4mgm}4Z-yyt"eA:6qM 4/R{zIҜD6o 5 ڂ֬nlQX T>#e&Wgp, .Fv'NR7*;3QiJzGq`ncq{@iكz0N"=Uֳ WZkU{qYNh5m@BDŹ2tf R1pL.UpcecG"KDB,gۆ/W @hdeäk ~?`8U1ƥN-('/-F+?ƖD֜-6JF7v1$7Bk4|G?,"o"hěd~Q߽gscSZAMbLMg`aF*%Hz[ڈ}w3\6Ŝ֕0}\q?"[ܒ,$!7jdzP+/"I|C;zIf6 I46*&vWtxYfӼB'uS+BD;v7;4҄WNH6Z}h8Sή`ך6"ȸz@Xlfb]hZ_J%k T(qzu?jTE;5)HC{H*tF?'ȉ\I3N|p {ő1`Kq{FQ3M&PifU} 6%R d)i@ K#Vh:S];'"EF Hޭnȼ7ilv"^٬i{?dPƮbvy?UTUS!s\e.Ra+7zYhdoy޹Yi7/G8p!&=킕Q'Y V`$t 8^yȇ+ 2j7abX>Tq" *p(v4%M2Sޮi/n;{.?gs֜9{go,P'4hխ u=4S!Fc8˝0K mck1ҽЖa Df@:$k Wl0.!h>4t!ȓMR6^VBDSXV}ޏI.ϡL @SaMH|U8Q2oj/Iy->ˢ|筂<: R*kOt5V e=U;]tqوH4v3}4S dϬrXUelY\VP6"%nY,"^R7tPҒz56 A=J'f- FSP.SAV![FSP.INCLUDE]CLIENT_CONF.H_ORIG;1N9f!*[FSP.INCLUDE]CLIENT_CONF.H_ORIG;1+,./F 4N-0123KPWO56 Cl7dT҃89GFHJ#ifndef _FSP_CLIENT_CONF_H_ #define _FSP_CLIENT_CONF_H_ /**************************************************************************** * Set this to point to the system wide default .fsp_prof file. * * This file is used by fhostcmd to semi-automate the setting of * * environment variable to ease the use of fsp * * It is only checked if neither ./.fsp_prof nor ~/.fsp_prof exist * ****************************************************************************/ #ifdef VMS #define FSPRC "sys$common:fsp_prof" #else #define FSPRC "/usr/local/fsp/fsp_prof" #endif /**************************************************************************** * Define the following if you want the client programs to time out and * * abort after a certain period (period is settable via an environment * * variable. See the INFO, client man pages, and ChangeLog files for * * details * *******(FSP.SAV![FSP.INCLUDE]CLIENT_CONF.H_ORIG;1N*********************************************************************/ #define CLIENT_TIMEOUT 1 /**************************************************************************** * Define the following if you want fhostcmd to attempt to perform name * * lookup on numeric host and numeric lookup on named hosts * ****************************************************************************/ #define HOST_LOOKUP 1 /**************************************************************************** * The following code tries to set the file locking mechanism to the one * * best suited for your system. This should only be changed if the auto * * configuration code fails and it doesn't compile. That sort of bug * * should also be immediately reported to the maintainers listed in the * * INFO file * ****************************************************************************/ #define KEY_PREFIX "/usr/tmp/.FL" /* #define USE_SHAREMEM_AND_LOCKF 1*/ /* #define USE_FLOCK 1 */ /* #define USE_LOCKF 1 */ /* #define NOLOCKING 1 */ #ifdef HAVE_SHMEM #ifdef HAVE_LOCKF #define USE_SHAREMEM_AND_LOCKF 1 #else #ifdef HAVE_FLOCK #define USE_FLOCK 1 #else #define NOLOCKING 1 #endif /* HAVE_FLOCK */ #endif /* HAVE_LOCKF */ #else #ifdef HAVE_LOCKF #define USE_LOCKF 1 #else #ifdef HAVE_FLOCK #define USE_FLOCK 1 #else #define NOLOCKING 1 #endif /* HAVE_FLOCK */ #endif /* HAVE_LOCKF */ #endif /* HAVE_SHMEM */ #endif /* _FSP_CLIENT_CONF_H_ *)FFSP.SAV![FSP.INCLUDE]CLIENT_CONF.H_ORIG;1N/ *[FSP.INCLUDE]CLIENT_DEF.H;1+,./F 4M-0123KPWO56%Cl7`T҃89GFHJ /*********************************************************************\ * Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. *PjFSP.SAVSP.INCLUDE]CLIENT_DEF.H;1M_r * \*********************************************************************/ #ifndef _FSP_CLIENT_DEF_H_ #define _FSP_CLIENT_DEF_H_ #include "common_def.h" #include "client_conf.h" /************************************************************************* * The following global variables are used to change the behavior when * * fgrab encounters a file with the same name in the current directory * * Added 11 Jan 93 by A.E.J.Fellows * *************************************************************************/ #define NOCLOBBER 1 /* Will not overwrite file of same name */ #define CLOBBER 2 /* Will always overwrite file even if remote file is not found */ #define UNIQUE 3 /* Create unique name to avoid overwrite */ #define CLOBBERONFIND 4 /* Only overwrite if file downloaded */ #define APPEND 5 /* Downloads will attempt to append to end of file if it already exists */ /************************************************************************* * The following global variables are used by fdu * * Added 5. Apr. 93 by M.Meskes * *************************************************************************/ #define RECURSIVE 1 #define SUM 2 #define EACH 4 /**************************************************************************** * These structures are used to implement a opendir/readdir mechanism similar * to +| FSP.SAVSP.INCLUDE]CLIENT_DEF.H;1Mthat of the normal opendir/reader mechanism in unix. ****************************************************************************/ typedef struct DDLIST { struct DDLIST *next; char *path; RDIRENT **dep_root; int ref_cnt; } DDLIST; typedef struct RDIR { DDLIST *ddp; RDIRENT **dep; } RDIR; typedef struct rdirent { unsigned long d_fileno; unsigned short d_reclen; unsigned short d_namlen; char *d_name; } rdirent; extern int client_trace; extern int client_intr_state; extern int key_persists; extern unsigned long target_delay; extern unsigned long udp_sent_time; extern unsigned short client_buf_len; extern unsigned short client_net_len; extern char *env_local_dir; extern int env_timeout; #endif /* _FSP_CLIENT_DEF_H_ */ *[FSP.INCLUDE]COMMON_DEF.H;3+,./F 4P/-0123KPWO56Cl7-T҃89GFHJ,?vFSP.SAVSP.INCLUDE]COMMON_DEF.H;3P /*********************************************************************\ * Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. * \*********************************************************************/ #ifndef _FSP_COMMON_DEF_H_ #define _FSP_COMMON_DEF_H_ #include #ifdef VMS #include "param.h" #include "types.h" #include "socket.h" #include "stat.h" #include #include #define malloc VAXC$MALLOC_OPT #define realloc VAXC$REALLOC_OPT #define free VAXC$FREE_OPT #define unlink delete #else #include #include #include #include #endif #include #include #ifdef VMS #include "time.h" #else #include #include #endif #include #ifdef VMS #include "dirent.h" #else #ifdef DIRENT #include #else #ifdef SYSDIR #include #else #ifdef SYSNDIR #include #endif #endif #endif #endif /**************************************************************************** * UBUF is the structure of message exchanged between server and clients. * * The 'buf' pa-zFSP.SAVSP.INCLUDE]COMMON_DEF.H;3P+rt of the buffer is variable lenght up to max of 1024. * The 'key' field is used by the server for sequence identification. * The 'seq' field is used by the client for sequence identification. * * Client's message to server contain a key value that is the same as the * key value of the previous message received from the server. Similarly, * the server's message to client contains a seq value that is the same * as the seq value of the previous message from the client. * * The buf field is logically partitioned into two parts by the len field. * The len field indicate the size of the first part of the buffer starting * at buf[0]. The rest of the buffer is the second field. In some cases * both fields can contain information. * ****************************************************************************/ #define UBUF_HSIZE 12 /* 12 bytes for the header */ #define UBUF_SPACE 1024 /* maximum payload. */ typedef struct UBUF { char cmd; /* message code. */ unsigned char sum; /* message checksum. */ unsigned char bb_key[2]; /* message key. */ unsigned char bb_seq[2]; /* message sequence number. */ unsigned char bb_len[2]; /* number of bytes in buf 1. */ unsigned char bb_pos[4]; /* location in the file. */ char buf[UBUF_SPACE]; } UBUF.TjFSP.SAVSP.INCLUDE]COMMON_DEF.H;3P"; /* definition of cmd */ #define CC_VERSION 0x10 /* return server's version string. */ #define CC_ERR 0x40 /* error response from server. */ #define CC_GET_DIR 0x41 /* get a directory listing. */ #define CC_GET_FILE 0x42 /* get a file. */ #define CC_UP_LOAD 0x43 /* open a file for writing. */ #define CC_INSTALL 0x44 /* close a file opened for writing. */ #define CC_DEL_FILE 0x45 /* delete a file. */ #define CC_DEL_DIR 0x46 /* delete a directory. */ #define CC_GET_PRO 0x47 /* get directory protection. */ #define CC_SET_PRO 0x48 /* set directory protection. */ #define CC_MAKE_DIR 0x49 /* create a directory. */ #define CC_BYE 0x4A /* finish a session. */ #define CC_GRAB_FILE 0x4B /* atomic get+delete a file. */ #define CC_GRAB_DONE 0x4C /* atomic get+delete a file done. */ #define CC_LIMIT 0x80 /* # > 0x7f for future cntrl blk ext. */ /* definition of global bitfield for version information */ /* Global information is also going to be a bit vector */ #define VER_BYTES 1 /* currently only 8 bits or less of info */ #define VER_LOG 0x01 /* does the server do logging */ #define VER_READONLY 0x02 /* is the server in readonly mode */ #define VER_REVNAME 0x04 /* does the server refuse non reversables */ #define VER_PRIVMODE 0x08 /* Is th/ɬFSP.SAVSP.INCLUDE]COMMON_DEF.H;3PX e server being run 'private' mode */ #define VER_THRUPUT 0x10 /* does the server enforce thruput control*/ /* definition of directory bitfield for directory information */ /* directory information is just going to be a bitfield encoding * of which protection bits are set/unset */ #define PRO_BYTES 1 /* currently only 8 bits or less of info */ #define DIR_OWNER 0x01 /* does caller own directory */ #define DIR_DEL 0x02 /* can files be deleted from this dir */ #define DIR_ADD 0x04 /* can files be added to this dir */ #define DIR_MKDIR 0x08 /* can new subdirectories be created */ #define DIR_PRIV 0x10 /* are files readable by non-owners */ #define DIR_README 0x20 /* does this dir contain an readme file? */ /* definition of logging information */ #define L_NONE 0x000 #define L_ERR 0x001 #define L_VER 0x002 #define L_GETDIR 0x004 #define L_GETFILE 0x008 #define L_UPLOAD 0x010 #define L_INSTALL 0x020 #define L_DELFILE 0x040 #define L_DELDIR 0x080 #define L_SETPRO 0x100 #define L_MAKEDIR 0x200 #define L_GRABFILE 0x400 #define L_GETPRO 0x800 #define L_ALL 0xfff /**************************************************************************** * RDIRENT is the structure of a directory entry contained in a .FSP_CONTENT * file. Each entry contains a 4 bytes quantity 'time', a 4 bytes quentity * 'size', and 1 byte of 'type'. Then followed by x number of bytes of * 'name'. 'name' is null terminated. Then followed by enough number of * padding to fill to an 4-byte boundary.0>&:FSP.SAVSP.INCLUDE]COMMON_DEF.H;3PC At this point, if the next entry * to follow will spread across 1k boundary, then two possible things will * happen. 1) if the header fits between this entry and the 1k boundary, * a complete header will be filled in with a 'type' set to RDTYPE_SKIP. * And then enough bytes to padd to 1k boundary. 2) if the header does * not fit, then simply pad to the 1k boundary. This will make sure that * messages carrying directory information carry only complete directory * entries and no fragmented entries. The last entry is type RDTYPE_END. ****************************************************************************/ #define RDHSIZE (2*4+1) typedef struct RDIRENT { unsigned char bb_time[4]; unsigned char bb_size[4]; unsigned char type ; char name[1] ; } RDIRENT; #define RDTYPE_END 0x00 #define RDTYPE_FILE 0x01 #define RDTYPE_DIR 0x02 #define RDTYPE_SKIP 0x2A #define NULLP ((char *) 0) #define MIN_DELAY 500L #endif /* _FSP_COMMON_DEF_H_ */ 16w: hfslORIG;1 |7r1MPWrS @ZP! %[=+ a$In/x*:^W4xN&z)+IEk"K%OJp1^+:+JI75ucKqxmcI#7r_XTnuo=.7[}\ !+K3;)|>1ktR[@=Iaw5f2x22>ac{k]g9]6TZaJqf' BDzv2D/<c;R=LjB;m[u760oYYGZ IWEO2#|V_ >S$_Wh'e>gJFZ;*>KwW|1a@A[@GN!&K~9]Z&A C Df$6:<~o(\T!k|] t5 &kz(.Lgsbp-k"L~c,}YZZ-#vz#f-,#m76e=d}l!9W,.^x.rOp:_fO!+HW #4GWe{[IQXu"<ba)~R+71T\v ?Q`GU0 =0$BMmd+c 0ZLMZ[Kyln~k7(^w"~59p/!x0{-8&/ppN|g#[dH3dpw7T. P= S$Iq*hock5t"2LX&;quF9fvFu4{}y WD4?dGc!&g{(>;#y&E&b4 :At r6d:DQPVAICW-o|A@>`PH"K*fTzkLr^=lHa2a"o|y_In{T 5q1#w_4G>MK. LvT3`j7{(No&o9Iv-c2q X'_GYg8Sl:]6Pg[5\O! YYK;[ZkAM a(Hc #ifdef VMS #include "param.h" #include "types.h" #include "socket.h" #include "stat.h" #include #include #define malloc VAXC$MALLOC_OPT #define realloc VAXC$REALLOC_OPT #define free VAXC$FREE_OPT #define unlink delete #else #include #include #include #include #35FSP.SAV  [FSP.INCLUDE]COMMON_DEF.H_ORIG;1Ph]endif #include #include #ifdef VMS #include "time.h" #else #include #include #endif #include #ifdef VMS #include "dirent.h" #else #ifdef DIRENT #include #else #ifdef SYSDIR #include #else #ifdef SYSNDIR #include #endif #endif #endif #endif /**************************************************************************** * UBUF is the structure of message exchanged between server and clients. * * The 'buf' part of the buffer is variable lenght up to max of 1024. * The 'key' field is used by the server for sequence identification. * The 'seq' field is used by the client for sequence identification. * * Client's message to server contain a key value that is the same as the * key value of the previous message received from the server. Similarly, * the server's message to client contains a seq value that is the same * as the seq value of the previous message from the client. * * The buf field is logically partitioned into two parts by the len field. * The len field indicate the size of the first part of the buffer starting * at buf[0]. The rest of the buffer is the second field. In some cases * both fields can contain information. * ****************************************************************************/ #define UBUF_HSIZE 12 /* 12 bytes for the header */ #define UBUF_SPACE 1024 /* maximum payload. */ typedef struct UBUF { char cmd; 4۹gFSP.SAV  [FSP.INCLUDE]COMMON_DEF.H_ORIG;1PQ/* message code. */ unsigned char sum; /* message checksum. */ unsigned char bb_key[2]; /* message key. */ unsigned char bb_seq[2]; /* message sequence number. */ unsigned char bb_len[2]; /* number of bytes in buf 1. */ unsigned char bb_pos[4]; /* location in the file. */ char buf[UBUF_SPACE]; } UBUF; /* definition of cmd */ #define CC_VERSION 0x10 /* return server's version string. */ #define CC_ERR 0x40 /* error response from server. */ #define CC_GET_DIR 0x41 /* get a directory listing. */ #define CC_GET_FILE 0x42 /* get a file. */ #define CC_UP_LOAD 0x43 /* open a file for writing. */ #define CC_INSTALL 0x44 /* close a file opened for writing. */ #define CC_DEL_FILE 0x45 /* delete a file. */ #define CC_DEL_DIR 0x46 /* delete a directory. */ #define CC_GET_PRO 0x47 /* get directory protection. */ #define CC_SET_PRO 0x48 /* set directory protection. */ #define CC_MAKE_DIR 0x49 /* create a directory. */ #define CC_BYE 0x4A /* finish a session. */ #define CC_GRAB_FILE 0x4B /* atomic get+delete a file. */ #define CC_GRAB_DONE 0x4C /* atomic get+dele5~ MFSP.SAV  [FSP.INCLUDE]COMMON_DEF.H_ORIG;1P# te a file done. */ #define CC_LIMIT 0x80 /* # > 0x7f for future cntrl blk ext. */ /* definition of global bitfield for version information */ /* Global information is also going to be a bit vector */ #define VER_BYTES 1 /* currently only 8 bits or less of info */ #define VER_LOG 0x01 /* does the server do logging */ #define VER_READONLY 0x02 /* is the server in readonly mode */ #define VER_REVNAME 0x04 /* does the server refuse non reversables */ #define VER_PRIVMODE 0x08 /* Is the server being run 'private' mode */ #define VER_THRUPUT 0x10 /* does the server enforce thruput control*/ /* definition of directory bitfield for directory information */ /* directory information is just going to be a bitfield encoding * of which protection bits are set/unset */ #define PRO_BYTES 1 /* currently only 8 bits or less of info */ #define DIR_OWNER 0x01 /* does caller own directory */ #define DIR_DEL 0x02 /* can files be deleted from this dir */ #define DIR_ADD 0x04 /* can files be added to this dir */ #define DIR_MKDIR 0x08 /* can new subdirectories be created */ #define DIR_PRIV 0x10 /* are files readable by non-owners */ #define DIR_README 0x20 /* does this dir contain an readme file? */ /* definition of logging information */ #define L_NONE 0x000 #define L_ERR 0x001 #define L_VER 0x002 #define L_GETDIR 0x004 #define L_GETFILE 0x008 #define L_UPLOAD 0x010 #define L_INSTALL 0x020 #define L_DELFILE 0x040 #define L_DELDIR 0x080 #define L_SETPRO 0x100 6F/FSP.SAV  [FSP.INCLUDE]COMMON_DEF.H_ORIG;1P" #define L_MAKEDIR 0x200 #define L_GRABFILE 0x400 #define L_GETPRO 0x800 #define L_ALL 0xfff /**************************************************************************** * RDIRENT is the structure of a directory entry contained in a .FSP_CONTENT * file. Each entry contains a 4 bytes quantity 'time', a 4 bytes quentity * 'size', and 1 byte of 'type'. Then followed by x number of bytes of * 'name'. 'name' is null terminated. Then followed by enough number of * padding to fill to an 4-byte boundary. At this point, if the next entry * to follow will spread across 1k boundary, then two possible things will * happen. 1) if the header fits between this entry and the 1k boundary, * a complete header will be filled in with a 'type' set to RDTYPE_SKIP. * And then enough bytes to padd to 1k boundary. 2) if the header does * not fit, then simply pad to the 1k boundary. This will make sure that * messages carrying directory information carry only complete directory * entries and no fragmented entries. The last entry is type RDTYPE_END. ****************************************************************************/ #define RDHSIZE (2*4+1) typedef struct RDIRENT { unsigned char bb_time[4]; unsigned char bb_size[4]; unsigned char type ; char name[1] ; } RDIRENT; #define RDTYPE_END 0x00 #define RDTYPE_FILE 0x01 #define RDTYPE_DIR 0x02 #define RDTYPE_SKIP 0x2A #define NULLP ((char *) 0) #define M7s<FSP.SAV  [FSP.INCLUDE]COMMON_DEF.H_ORIG;1PIN_DELAY 500L #endif /* _FSP_COMMON_DEF_H_ */ *[FSP.INCLUDE]CO_EXTERN.H;1+,./F 4>)-0123KPWO56lCl7}U҃89GFHJ#ifndef _FSP_CO_EXTERN_H_ #define _FSP_CO_EXTERN_H_ #ifdef NEED_STRDUP /* strdup.c */ extern char *strdup PROTO0((char *)); #endif #ifdef NEED_RANDOM /* random.c */ extern void srandom PROTO0((unsigned int)); extern char * initstate PROTO0((unsigned int, char *, int)); extern char *setstate PROTO0((char *)); extern long random PROTO0((void)); #endif /* udp_io.c */ extern int _x_udp PROTO0((int *)); extern int _x_adr PROTO0((char *, int, struct sockaddr_in *)); extern int _x_select PROTO0((unsigned int *,8ocKFSP.SAV[FSP.INCLUDE]CO_EXTERN.H;1>% long)); #endif /* _FSP_CO_EXTERN_H_ */ *[FSP.INCLUDE]C_EXTERN.H;1+,./F 4O-0123KPWO56<}5Cl7 U҃89GFHJ#ifndef _FSP_C_EXTERN_H_ #define _FSP_C_EXTERN_H_ /* lib.c */ extern UBUF *client_interact PROTO0((unsigned int, unsigned long, unsigned int, unsigned char *, unsigned int, unsigned char *)); extern void init_client PROTO0((char *, int, int)); extern int client_done PROTO0((void)); /* lock.c */ extern unsigned short client_get_key PROTO0((void)); extern void client_put_key PROTO0((unsigned short)); extern void client_init_key PROTO0((unsigned long, unsigned long, unsigned short)9,FSP.SAV[FSP.INCLUDE]C_EXTERN.H;1OR); /* util.c */ extern char *util_abs_path PROTO0((char *)); extern char *util_getwd PROTO0((char *)); extern int util_download PROTO0((char *, FILE *, unsigned long)); extern int util_grab_file PROTO0((char *, FILE *, unsigned long)); extern int util_upload PROTO0((char *, FILE *)); extern void env_client PROTO0((void)); extern RDIR *util_opendir PROTO0((char *)); extern void util_closedir PROTO0((RDIR *)); extern rdirent *util_readdir PROTO0((RDIR *)); extern int util_stat PROTO0((char *, struct stat *)); extern int util_cd PROTO0((char *)); extern int util_cd2 PROTO0((char *)); extern void util_process_file PROTO0((char *, int, void (*)(), int (*)(), void (*)(), int)); #endif /* _FSP_C_EXTERN_H_ */ *[FSP.INCLUDE]FIND.H;1+,. /F 4M -0123KPWO 56όCl7E"U҃89GFHJ:…%FSP.SAV[FSP.INCLUDE]FIND.H;1;3M ]/*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Cimarron D. Taylor of the University of California, Berkeley. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXE;k FSP.SAV[FSP.INCLUDE]FIND.H;1;3M MPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)find.h 5.8 (Berkeley) 5/24/91 */ #ifndef _FSP_FIND_H_ #define _FSP_FIND_H_ /* node type */ enum ntype { N_AND = 1, /* must start > 0 */ N_TIME, N_CLOSEPAREN, N_EXEC, N_EXPR, N_LS, N_NAME, N_NEWER, N_NOT, N_OK, N_OPENPAREN, N_OR, N_PRINT, N_PRUNE, N_SIZE, N_TYPE, }; /* node definition */ typedef struct _plandata { struct _plandata *next; /* next node */ int (*eval)(); /* node evaluation function */ int flags; /* private flags */ enum ntype type; /* plan node type */ union { gid_t _g_data; /* gid */ ino_t _i_data; /* inode */ mode_t _m_data; /* mode mask */ nlink_t _l_data; /* link count */ off_t _o_data; /* file size */ time_t _t_data; /* time value */ uid_t _u_data; /* uid */ struct _plandata *_p_data[2]; /* PLAN trees */ struct _ex { char **_e_argv; /* argv array */ char **_e_orig; /* original strings */ int *_e_len; /* allocated length */ } ex; char *_a_data[2]; /* array of char pointers */ char *_c_data; /* char pointer */ } p_un; #define a_data p_un._a_data #define c_data p_un._c_data #define i_data p_un._i_<LOc `fs 1q´ >'zhMj<#Pb"T@%;K;6_\N(3=09 x2m15+E]~}{J >aD4 a?A?e9J_f%_f MZ@'/tBPY:pue[jH0Yr_ ?s/x#`\_wt3Yso6E}wm}o6Ra~z0i x'jA?ViwH+&"Qr">j_2\"D]xM{cHRtV*KHc@>`,sIF$$4WV&qU)DQh4$-YCX:v*N@Q$v'mi8hY atV@qaP>l0RHHzw{xtt56qxf&C;"Q/ d[ j^k|,'=6w?2:`FV` "RH+/%,K `' @;pC!F ~Xp8;\yVnz S`]+A8mcafv` $%8&*h=.&(jV=e]2$ea/ESLjH hyw+]Jit@zdT)861i=;F 40u /ZMzgd 5LRTiTo3p~?@ D5)IPG{S'~oT Y@Asf h8H7;1G`gr!fKe$ yJ=wC8Oxkyt)GUA>.WPxAG7:NIX[iCJ^ Y~k=g8 53cH_i+oQ V^MLz4@Lo;=B2*YQ ,ʋO#j-`y'Xm3z6%xqQh=me||/T+ `l'kB*+nu*%oX,(6{s+~1Y!}8z{:)`_pp31rN.cH.E{DJg$,7yY=H$b'gln{DQSq*byn.VmyB9s&~rN^DsUBF= 3e74~'<&4G;$0)=a&qmv^S9SD {KdK("hGRr?R(?0)1Lj8zrz2*U?n|R+>q/'%aK_L_6_9 K~H6]TGgX3X[ku-5zAj?`~\7d|rc|z:kF6|$>=a;4$L'(:TG]dq`kbL8P+]S_\]w02wX"%jQcjfqtHnIlRNqLf.F~XID$U 'e&"# O 3~I:3=;U7;XNv=-+ FSP.SAV[FSP.INCLUDE]FIND.H;1BJ;1M data #define g_data p_un._g_data #define l_data p_un._l_data #define m_data p_un._m_data #define o_data p_un._o_data #define p_data p_un._p_data #define t_data p_un._t_data #define u_data p_un._u_data #define e_argv p_un.ex._e_argv #define e_orig p_un.ex._e_orig #define e_len p_un.ex._e_len } PLAN; typedef struct _option { char *name; /* option name */ enum ntype token; /* token type */ PLAN *(*create)(); /* create function */ #define O_NONE 0x01 /* no call required */ #define O_ZERO 0x02 /* pass: nothing */ #define O_ARGV 0x04 /* pass: argv, increment argv */ #define O_ARGVP 0x08 /* pass: *argv, N_OK || N_EXEC */ int flags; } OPTION; /* find.c */ extern void find_formplan PROTO0((char **)); /* fnmatch.c */ extern int fnmatch PROTO0((register char *, register char *)); /* function.c */ extern PLAN * c_time PROTO0((char *)); extern PLAN *c_exec PROTO0((char ***, int)); extern PLAN *c_ls PROTO0((void)); extern PLAN *c_name PROTO0((char *)); extern PLAN *c_newer PROTO0((char *)); extern PLAN *c_print PROTO0((void)); extern PLAN *c_prune PROTO0((void)); extern PLAN *c_size PROTO0((char *)); extern PLAN *c_type PROTO0((char *)); extern int find_expr PROTO0((PLAN *, struct stat *, char *)); extern PLAN *c_openparen PROTO0((void)); extern PLAN *c_closeparen PROTO0((void)); extern PLAN *c_not PROTO0((void)); extern PLAN *c_or PROTO0((void)); /* operator.c */ extern PLAN *paren_squish PROTO0((PLAN *)); extern PLAN *not_squish PROTO0((PLAN *)); >jkFSP.SAV[FSP.INCLUDE]FIND.H;1BJ;1M >S extern PLAN *or_squish PROTO0((PLAN *)); /* options.c */ extern PLAN *find_create PROTO0((char ***)); extern OPTION *option PROTO0((char *)); #endif /* _FSP_FIND_H_ */ *[FSP.INCLUDE]LS.H;1+,./F 4O-0123KPWO56 Cl7)U҃89GFHJ/* * Copyright (c) 1989 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Michael Fischbein. * * Redistribution and use in source and binary forms are permitted * provided that: (1) source distributions retain this entire copyright * notice and comment, and (2) distributions including binaries display * the following acknowledgement: ``This product includes software * developed by the University of California, ?K2IFSP.SAV[FSP.INCLUDE]LS.H;1MD.C;3O> Berkeley and its contributors'' * in the documentation or other materials provided with the distribution * and in all advertising materials mentioning features or use of this * software. Neither the name of the University nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * * @(#)ls.h 5.10 (Berkeley) 4/8/90 */ #ifndef _FSP_LS_H_ #define _FSP_LS_H_ typedef struct _lsstruct { char *name; /* file name */ int len; /* file name length */ struct stat lstat; /* lstat(2) for file */ } LS; /* * overload -- we probably have to save blocks and/or maxlen with the lstat * array, so tabdir() stuffs it into unused fields in the first stat structure. * If there's ever a type larger than u_long, fix this. Any calls to qsort * must save and restore the values. */ #define st_btotal st_dev #define st_maxlen st_rdev #ifndef VMS /* linker complains about this */ extern int errno; #endif extern int f_accesstime; /* use time of last access */ extern int f_group; /* show group ownership of a file */ extern int f_inode; /* print inode */ extern int f_kblocks; /* print size in kilobytes */ extern int f_longform; /* long listing format */ extern int f_singlecol; /* use single column output */ extern int f_size@bXFSP.SAV[FSP.INCLUDE]LS.H;1MD.C;3OoA; /* list size in short listing */ extern int f_statustime; /* use time of last mode change */ extern int f_total; /* if precede with "total" line */ extern int f_type; /* add type character for non-regular files */ /* cmp.c */ extern int namecmp PROTO0((LS *, LS *)); extern int revnamecmp PROTO0((LS *, LS *)); extern int modcmp PROTO0((LS *, LS *)); extern int revmodcmp PROTO0((LS *, LS *)); extern int acccmp PROTO0((LS *, LS *)); extern int revacccmp PROTO0((LS *, LS *)); extern int statcmp PROTO0((LS *, LS *)); extern int revstatcmp PROTO0((LS *, LS *)); /* ls.c */ extern void fls_main PROTO0((int, char **)); /* print.c */ extern void printscol PROTO0((LS *, int)); extern void printlong PROTO0((LS *, int)); extern void printcol PROTO0((LS *, int)); /* util.c */ extern void prcopy PROTO0((char *, char *, int)); extern char *emalloc PROTO0((int)); extern int nomem PROTO0((void)); extern void usage PROTO0((void)); #endif /* _FSP_LS_H_ */ *[FSP.INCLUDE]MY-STRING.H;1+,./F 4=-0123KPWO56\ЙCl73U҃89GFHJAf~wFSP.SAV[FSP.INCLUDE]MY-STRING.H;1=(S#ifndef _FSP_MY_STRING_H_ #define _FSP_MY_STRING_H_ #if defined(STRING_H_BOGUS) && defined(STDC_HEADERS) extern void bzero(char *, int); extern void *memset(void *, int, size_t); extern char *strcpy(char *, const char *); extern char *strncpy(char *, const char *, size_t); extern char *strcat(char *, const char *); extern int strcmp(const char *, const char *); extern int strncmp(const char *, const char *, size_t); extern char *strchr(const char *, int); extern char *strerror(int); #else #if STDC_HEADERS || HAVE_STRING_H #include /* An ANSI string.h and pre-ANSI memory.h might conflict. */ #if !STDC_HEADERS && HAVE_MEMORY_H #include #endif /* not STDC_HEADERS and HAVE_MEMORY_H */ #endif #ifdef HAVE_STRINGS_H #include #endif #endif #ifdef NEED_BCOPY #define bcopy(s, d, n) memcpy((d), (s), (n)) #endif #endif /* _FSP_MY_STRING_H_ */ *[FSP.INCLUDE]PROTO.H;1+,./F 4Q-0123KPWO56MCl76 \u-ep0^+?|GJ & s~}kbzk11rL5\FB^(2g~ElQSL`I:H, c@6f]H<=Jl"vCcK%%=4Cg#H< ;]_Uh< "7Ro%g'Z)D~A*16t,7" GOE+w.x!+:bY)rG6k:[\5Y 4x(v%+nb96K\|CkY1kXMvbcH+TzQ5.%9qsGeVW#InTfI}'E[XniMV@*>j[c7WAEju T!IrHd]x,vLX!zIO UN5py}Me>Ph{)DdJI^sbUN X55s`DWGE;;\CW$)%l0ou1 *l{jr\mB81$)&ZU!f~YyXyDp"W{IAS4,coe<1a;w!O!N^#,}eB3+* j(0Otffifg  +b12wWs|l3-H.g.c^' BE_cn 14 characters */ #define HAVE_LONG_FILE_NAMES 1 /* Define if you have dirent.h. */ #undef DIRENT /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT /* Define if you have unistd.h. */ #define HAVE_UNISTD_H 1 /* Define this if you have tzfile.h */ #define HAVE_TZFILE_H 1 /* Define if you have the vprintf function. */ #define HAVE_VPRINTF 1 /* Define this if your compiler understands ANSI prototyping */ #define HAVE_ANSI_PROTO 1 /* Define if you have the ANSI C header files. (ansi strings, ctype, etc.) */ #define STDC_HEADERS 1 /* Define this if you are running on an AIX system. */ #undef _ALL_SOURCE /* Define this if you have posix compliance #undef _POSIX_SOURCE /* Define if you don't have dirent.h, but have sys/dir.h. */ #define SYSDIR 1 /* Define if you don't have dirent.h, but have sys/ndir.h. */ #undef SYSNDIR /* Define if the closedir function returns void instead of int. */ #define VOID_CLOSEDIR 1 /* Define to `int' if doesn't define. */ #undef uid_t #undef gid_t #define pid_t int #define mode_t int #undef size_t #define nlink_t int /* Define HAVE_D_INO if you have d_ino in dirent (or direct) struct */ /* see /usr/include/dir.h or ndir.h or dirent.h */ #define HAVE_D_INO 1 /* Define HAVE_D_FILENO if you have d_fileno in dirent (or direct) struct */ /* see /usr/include/dir.h or ndir.h or L'FSP.SAV [FSP.INCLUDE]TWEAK.H;5;13O dirent.h */ #undef HAVE_D_FILENO /* Define to empty if the keyword does not work. */ #undef const /* Define the following if your site has a funky bsearch */ #define bsearch ansi_bsearch /* define the following if your site doesn't define 'strdup()' */ #define NEED_STRDUP /* define the following if your site doesn't define 'random()' */ #define NEED_RANDOM /* define the following if your site doesn't define 'bcopy()' */ #undef NEED_BCOPY /* Define the following if your site has lockf() */ #undef HAVE_LOCKF /* Define the following if you site has shared memory */ #undef HAVE_SHMEM /* Define the following if your system has flock() */ #define HAVE_FLOCK 1 /* define this if WEXITSTATUS is defined on your system */ #undef HAVE_WEXITSTATUS /* define this if S_ISREG is defined on your system */ #undef HAVE_S_ISREG /* define this if S_ISDIR is defined on your system */ #undef HAVE_S_ISDIR /* define this if you have 'union wait' in */ #ifndef __hpux #define HAVE_UNION_WAIT 1 #endif /* define this if you have SECSPERDAY */ #define HAVE_SECSPERDAY 1 /* define this if you have DAYSPERNYEAR */ #define HAVE_DAYSPERNYEAR 1 /* define this if your have strings.h */ /* #define HAVE_STRINGS_H 1 */ /* define this if your have string.h */ #define HAVE_STRING_H 1 /* define this if you have memory.h */ #define HAVE_MEMORY_H 1 /* define this if your string.h has bogus type declarations for a few things */ #undef STRING_H_BOGUS /* These two will be automatically set by the configure script if needed */Mp FSP.SAV [FSP.INCLUDE]TWEAK.H;5C;32O u #undef USE_SECSPERDAY #undef USE_DAYSPERNYEAR /* defined if these data types have the indicated sizes in bytes */ #define SIZE_SRT_2 1 #define SIZE_LNG_4 1 #undef SIZE_INT_2 #define SIZE_INT_4 1 #ifndef HAVE_WEXITSTATUS #define WEXITSTATUS(x) ((x).w_T.w_Retcode) #endif #ifndef HAVE_S_ISREG #define S_ISREG(mode) ((mode) & S_IFREG) #endif #ifndef HAVE_S_ISREG #define S_ISDIR(mode) ((mode) & S_IFDIR) #endif #if defined(DIRENT) #define HAVE_STRUCT_DIRENT #else #undef HAVE_STRUCT_DIRENT #endif #ifndef HAVE_SECSPERDAY #define SECSPERDAY USE_SECSPERDAY #endif #ifndef HAVE_DAYSPERNYEAR #define DAYSPERNYEAR USE_DAYSPERNYEAR #endif #if defined(HAVE_D_INO) && !defined(HAVE_D_FILENO) #define d_fileno d_ino #else #if !defined(HAVE_D_INO) && defined(HAVE_D_FILENO) #define d_ino d_fileno #endif #endif /**************************************************************************** * Macros to read and write multi-byte fields from the message header. ****************************************************************************/ #if defined(SIZE_SRT_2) #define WORD_TYPE_2 unsigned short #else #if defined(SIZE_INT_2) #define WORD_TYPE_2 unsigned #endif #endif #if defined(SIZE_LNG_4) #define WORD_TYPE_4 unsigned long #else #if defined(SIZE_INT_4) #define WORD_TYPE_4 unsigned #endif #endif #ifdef WORD_TYPE_4 /* there is an integer type of size 4 */ #define BB_READ4(V) ntohl(*(WORD_TYPE_4 *)(V)) #define BB_WRITE4(V,A) *(WORD_TYPE_4 *)(V) = htonl(A) #else /* there is no integer type of size 4 */ #define BB_READ4(V) ((((V)[NsusFSP.SAV [FSP.INCLUDE]TWEAK.H;5C;3O  0] << 24) & 0xff000000) + \ (((V)[1] << 16) & 0x00ff0000) + \ (((V)[2] << 8) & 0x0000ff00) + \ (((V)[3] ) & 0x000000ff)) #define BB_WRITE4(V,A) ((V)[0] = ((A) >> 24) & 0xff, \ (V)[1] = ((A) >> 16) & 0xff, \ (V)[2] = ((A) >> 8) & 0xff, \ (V)[3] = ((A) ) & 0xff) #endif #ifdef WORD_TYPE_2 /* there is an integer type of size 2 */ #define BB_READ2(V) ntohs(*(WORD_TYPE_2 *)(V)) #define BB_WRITE2(V,A) *(WORD_TYPE_2 *)(V) = htons(A) #else /* there is no integer type of size 2 */ #define BB_READ2(V) ((((V)[0] << 8) & 0xff00) + \ (((V)[1] ) & 0x00ff)) #define BB_WRITE2(V,A) ((V)[0] = ((A) >> 8) & 0xff, \ (V)[1] = ((A) ) & 0xff) #endif #include "proto.h" #endif /* _FSP_TWEAK_H_ */ *[FSP.INCLUDE]TWEAK.H_IN;1+, . /F 4O O-0123KPWO 56 5*Cl7 U҃89GFHJO oFSP.SAV [FSP.INCLUDE]TWEAK.H_IN;1;1O #ifndef _FSP_TWEAK_H_ #define _FSP_TWEAK_H_ /* define this if your system allows file names > 14 characters */ #undef HAVE_LONG_FILE_NAMES /* Define if you have dirent.h. */ #undef DIRENT /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT /* Define if you have unistd.h. */ #undef HAVE_UNISTD_H /* Define this if you have tzfile.h */ #undef HAVE_TZFILE_H /* Define if you have the vprintf function. */ #undef HAVE_VPRINTF /* Define this if your compiler understands ANSI prototyping */ #undef HAVE_ANSI_PROTO /* Define if you have the ANSI C header files. (ansi strings, ctype, etc.) */ #undef STDC_HEADERS /* Define this if you are running on an AIX system. */ #undef _ALL_SOURCE /* Define this if you have posix compliance #undef _POSIX_SOURCE /* Define if you don't have dirent.h, but have sys/dir.h. */ #undef SYSDIR /* Define if you don't have dirent.h, but have sys/ndir.h. */ #undef SYSNDIR /* Define if the closedir function returns void instead of int. */ #undef VOID_CLOSEDIR /* Define to `int' if doesn't define. */ #undef uid_t #undef gid_t #undef pid_t #undef mode_t #undef size_t #undef nlink_t /* Define HAVE_D_INO if you have d_ino in dirent (or direct) struct */ /* see /usr/include/dir.h or ndir.h or dirent.h */ #undef HAVE_D_INO /* Define HAVE_D_FILENO if you have d_fileno in dirent (or direct) struct */ /* see /usr/include/dir.h or ndir.h or dirent.h */ #undef HAVE_D_FILENO /* Define to empty if the keyword does not work. */ #undef const /* DPMqFSP.SAV [FSP.INCLUDE]TWEAK.H_IN;1;1O Gefine the following if your site has a funky bsearch */ #undef bsearch /* define the following if your site doesn't define 'strdup()' */ #undef NEED_STRDUP /* define the following if your site doesn't define 'random()' */ #undef NEED_RANDOM /* define the following if your site doesn't define 'bcopy()' */ #undef NEED_BCOPY /* Define the following if your site has lockf() */ #undef HAVE_LOCKF /* Define the following if you site has shared memory */ #undef HAVE_SHMEM /* Define the following if your system has flock() */ #undef HAVE_FLOCK /* define this if WEXITSTATUS is defined on your system */ #undef HAVE_WEXITSTATUS /* define this if S_ISREG is defined on your system */ #undef HAVE_S_ISREG /* define this if S_ISDIR is defined on your system */ #undef HAVE_S_ISDIR /* define this if you have 'union wait' in */ #ifndef __hpux #undef HAVE_UNION_WAIT #endif /* define this if you have SECSPERDAY */ #undef HAVE_SECSPERDAY /* define this if you have DAYSPERNYEAR */ #undef HAVE_DAYSPERNYEAR /* define this if your have strings.h */ #undef HAVE_STRINGS_H /* define this if your have string.h */ #undef HAVE_STRING_H /* define this if you have memory.h */ #undef HAVE_MEMORY_H /* define this if your string.h has bogus type declarations for a few things */ #undef STRING_H_BOGUS /* These two will be automatically set by the configure script if needed */ #undef USE_SECSPERDAY #undef USE_DAYSPERNYEAR /* defined if these data types have the indicated sizes in bytes */ #undef SIZE_SRT_2 #undef SIZE_LNQGIbFSP.SAV [FSP.INCLUDE]TWEAK.H_IN;1O 7G_4 #undef SIZE_INT_2 #undef SIZE_INT_4 #ifndef HAVE_WEXITSTATUS #define WEXITSTATUS(x) ((x).w_T.w_Retcode) #endif #ifndef HAVE_S_ISREG #define S_ISREG(mode) ((mode) & S_IFREG) #endif #ifndef HAVE_S_ISREG #define S_ISDIR(mode) ((mode) & S_IFDIR) #endif #if defined(DIRENT) #define HAVE_STRUCT_DIRENT #else #undef HAVE_STRUCT_DIRENT #endif #ifndef HAVE_SECSPERDAY #define SECSPERDAY USE_SECSPERDAY #endif #ifndef HAVE_DAYSPERNYEAR #define DAYSPERNYEAR USE_DAYSPERNYEAR #endif #if defined(HAVE_D_INO) && !defined(HAVE_D_FILENO) #define d_fileno d_ino #else #if !defined(HAVE_D_INO) && defined(HAVE_D_FILENO) #define d_ino d_fileno #endif #endif /**************************************************************************** * Macros to read and write multi-byte fields from the message header. ****************************************************************************/ #if defined(SIZE_SRT_2) #define WORD_TYPE_2 unsigned short #else #if defined(SIZE_INT_2) #define WORD_TYPE_2 unsigned #endif #endif #if defined(SIZE_LNG_4) #define WORD_TYPE_4 unsigned long #else #if defined(SIZE_INT_4) #define WORD_TYPE_4 unsigned #endif #endif #ifdef WORD_TYPE_4 /* there is an integer type of size 4 */ #define BB_READ4(V) ntohl(*(WORD_TYPE_4 *)(V)) #define BB_WRITE4(V,A) *(WORD_TYPE_4 *)(V) = htonl(A) #else /* there is no integer type of size 4 */ #define BB_READ4(V) ((((V)[0] << 24) & 0xff000000) + \ (((V)[1] << 16) & 0x00ff0000) + \ (((V)[2] << 8) & 0x0000ff00) + \ (((V)[3] ) & 0x000000ff)) #define RV| py 1II-,  {(oEy O PqC=L$jL9jRZc:ud' mzn #xfS/|rqh|+gVbgh=34:VZi8K{@i-f5$e9 L(k'm/tkcWfH%~qg.@;wDMXl_+_f^" C64N9` < i 4BCo92A{a0`w_dkh5q-s*zzB:; m=zW);LCTXUDcqg0V8V'K>(}! M^yY4*?+W}|v*%|-9xy3GA~)S%Pm6ozp6->B x~]4O ?>(t-U"`VFMf 8>4-1{t*mtC%y-0PyyOp}'?4LLdPTJO=;3{n`g RuvNIvMG57mG{,ZsT?6.?  d}J= a#( _DK4?b$=L8C(1nKTQeJkdI,-2o*yv=4=6B_ +lhBcWl|7aU\uL64t~_h9V=lAO2p/E /}WUS1<#"5l"?~zGwx@|W^#w!hQVqT3LJ-p*1 I_E&^Ykw&>+gB@7i?&k}+=[\Z8+!ht{%kw*ju1lIox74n\r5lq cnxdh>'Sy^'(H|ahsTw$W,jRGh)?l5Mg!Zs)%Deu&7P kn-TA{Wh#}(}_O&?Q:ivTIu2ooN% FDPjiJ\"Hmw:S;k _OQCc;+zQ^ tE_n3cGh},g:Ecje@@=[ | gdmbA1W>:~hW`.?[uukzt I: wd&-q:P#94D% >$HN5^V*IG^,g̸B EyZvHCJwviJh{R.N}) ulg}^EHin)ssZD#7JxGg,+OW]cc& F6Kg)jRg2M-,Wfn$TDB5x7JWHVRWM@EY!wo0U U_|VId! 2v^alhTyrk#QquO?1x,f&Lr)90U ="zJSUz}w3Zq;-}*iurhoIACHUn7Y)V-#s~5 dC=M,1S8kFSP.SAV [FSP.INCLUDE]TWEAK.H_IN;1O  BB_WRITE4(V,A) ((V)[0] = ((A) >> 24) & 0xff, \ (V)[1] = ((A) >> 16) & 0xff, \ (V)[2] = ((A) >> 8) & 0xff, \ (V)[3] = ((A) ) & 0xff) #endif #ifdef WORD_TYPE_2 /* there is an integer type of size 2 */ #define BB_READ2(V) ntohs(*(WORD_TYPE_2 *)(V)) #define BB_WRITE2(V,A) *(WORD_TYPE_2 *)(V) = htons(A) #else /* there is no integer type of size 2 */ #define BB_READ2(V) ((((V)[0] << 8) & 0xff00) + \ (((V)[1] ) & 0x00ff)) #define BB_WRITE2(V,A) ((V)[0] = ((A) >> 8) & 0xff, \ (V)[1] = ((A) ) & 0xff) #endif #include "proto.h" #endif /* _FSP_TWEAK_H_ */ *[FSP.INCLUDE]TWEAK.H_ORIG;1+,. /F 4O -0123KPWO 56lCl7HU҃89GFHJT" FSP.SAVSP.INCLUDE]TWEAK.H_ORIG;1O !/* include/tweak.h. Generated automatically by configure. */ #ifndef _FSP_TWEAK_H_ #define _FSP_TWEAK_H_ /* define this if your system allows file names > 14 characters */ #define HAVE_LONG_FILE_NAMES 1 /* Define if you have dirent.h. */ #undef DIRENT /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT /* Define if you have unistd.h. */ #define HAVE_UNISTD_H 1 /* Define this if you have tzfile.h */ #define HAVE_TZFILE_H 1 /* Define if you have the vprintf function. */ #define HAVE_VPRINTF 1 /* Define this if your compiler understands ANSI prototyping */ #define HAVE_ANSI_PROTO 1 /* Define if you have the ANSI C header files. (ansi strings, ctype, etc.) */ #define STDC_HEADERS 1 /* Define this if you are running on an AIX system. */ #undef _ALL_SOURCE /* Define this if you have posix compliance #undef _POSIX_SOURCE /* Define if you don't have dirent.h, but have sys/dir.h. */ #define SYSDIR 1 /* Define if you don't have dirent.h, but have sys/ndir.h. */ #undef SYSNDIR /* Define if the closedir function returns void instead of int. */ #define VOID_CLOSEDIR 1 /* Define to `int' if doesn't define. */ #undef uid_t #undef gid_t #define pid_t int #define mode_t int #undef size_t #define nlink_t int /* Define HAVE_D_INO if you have d_ino in dirent (or direct) struct */ /* see /usr/include/dir.h or ndir.h or dirent.h */ #define HAVE_D_INO 1 /* Define HAVE_D_FILENO if you have d_fileno in dirent (or direct) struct */ /* see /usr/include/dir.h or ndir.h or U @2FSP.SAVSP.INCLUDE]TWEAK.H_ORIG;1O dirent.h */ #undef HAVE_D_FILENO /* Define to empty if the keyword does not work. */ #undef const /* Define the following if your site has a funky bsearch */ #define bsearch ansi_bsearch /* define the following if your site doesn't define 'strdup()' */ #undef NEED_STRDUP /* define the following if your site doesn't define 'random()' */ #undef NEED_RANDOM /* define the following if your site doesn't define 'bcopy()' */ #undef NEED_BCOPY /* Define the following if your site has lockf() */ #undef HAVE_LOCKF /* Define the following if you site has shared memory */ #undef HAVE_SHMEM /* Define the following if your system has flock() */ #define HAVE_FLOCK 1 /* define this if WEXITSTATUS is defined on your system */ #undef HAVE_WEXITSTATUS /* define this if S_ISREG is defined on your system */ #undef HAVE_S_ISREG /* define this if S_ISDIR is defined on your system */ #undef HAVE_S_ISDIR /* define this if you have 'union wait' in */ #ifndef __hpux #define HAVE_UNION_WAIT 1 #endif /* define this if you have SECSPERDAY */ #define HAVE_SECSPERDAY 1 /* define this if you have DAYSPERNYEAR */ #define HAVE_DAYSPERNYEAR 1 /* define this if your have strings.h */ #define HAVE_STRINGS_H 1 /* define this if your have string.h */ #define HAVE_STRING_H 1 /* define this if you have memory.h */ #define HAVE_MEMORY_H 1 /* define this if your string.h has bogus type declarations for a few things */ #undef STRING_H_BOGUS /* These two will be automatically set by the configure script if needed */ #undef VbFSP.SAVSP.INCLUDE]TWEAK.H_ORIG;1O 1RUSE_SECSPERDAY #undef USE_DAYSPERNYEAR /* defined if these data types have the indicated sizes in bytes */ #define SIZE_SRT_2 1 #define SIZE_LNG_4 1 #undef SIZE_INT_2 #define SIZE_INT_4 1 #ifndef HAVE_WEXITSTATUS #define WEXITSTATUS(x) ((x).w_T.w_Retcode) #endif #ifndef HAVE_S_ISREG #define S_ISREG(mode) ((mode) & S_IFREG) #endif #ifndef HAVE_S_ISREG #define S_ISDIR(mode) ((mode) & S_IFDIR) #endif #if defined(DIRENT) #define HAVE_STRUCT_DIRENT #else #undef HAVE_STRUCT_DIRENT #endif #ifndef HAVE_SECSPERDAY #define SECSPERDAY USE_SECSPERDAY #endif #ifndef HAVE_DAYSPERNYEAR #define DAYSPERNYEAR USE_DAYSPERNYEAR #endif #if defined(HAVE_D_INO) && !defined(HAVE_D_FILENO) #define d_fileno d_ino #else #if !defined(HAVE_D_INO) && defined(HAVE_D_FILENO) #define d_ino d_fileno #endif #endif /**************************************************************************** * Macros to read and write multi-byte fields from the message header. ****************************************************************************/ #if defined(SIZE_SRT_2) #define WORD_TYPE_2 unsigned short #else #if defined(SIZE_INT_2) #define WORD_TYPE_2 unsigned #endif #endif #if defined(SIZE_LNG_4) #define WORD_TYPE_4 unsigned long #else #if defined(SIZE_INT_4) #define WORD_TYPE_4 unsigned #endif #endif #ifdef WORD_TYPE_4 /* there is an integer type of size 4 */ #define BB_READ4(V) ntohl(*(WORD_TYPE_4 *)(V)) #define BB_WRITE4(V,A) *(WORD_TYPE_4 *)(V) = htonl(A) #else /* there is no integer type of size 4 */ #define BB_READ4(V) ((((V)[0] << 24WntFSP.SAVSP.INCLUDE]TWEAK.H_ORIG;1O  ) & 0xff000000) + \ (((V)[1] << 16) & 0x00ff0000) + \ (((V)[2] << 8) & 0x0000ff00) + \ (((V)[3] ) & 0x000000ff)) #define BB_WRITE4(V,A) ((V)[0] = ((A) >> 24) & 0xff, \ (V)[1] = ((A) >> 16) & 0xff, \ (V)[2] = ((A) >> 8) & 0xff, \ (V)[3] = ((A) ) & 0xff) #endif #ifdef WORD_TYPE_2 /* there is an integer type of size 2 */ #define BB_READ2(V) ntohs(*(WORD_TYPE_2 *)(V)) #define BB_WRITE2(V,A) *(WORD_TYPE_2 *)(V) = htons(A) #else /* there is no integer type of size 2 */ #define BB_READ2(V) ((((V)[0] << 8) & 0xff00) + \ (((V)[1] ) & 0x00ff)) #define BB_WRITE2(V,A) ((V)[0] = ((A) >> 8) & 0xff, \ (V)[1] = ((A) ) & 0xff) #endif #include "proto.h" #endif /* _FSP_TWEAK_H_ */ *[FSP.INCLUDE]VERSION.H;1+,./F 47-0123KPWO56tCl7U҃89GFHJX|ߎFSP.SAV[FSP.INCLUDE]VERSION.H;137|^#ifndef _FSP_VERSION_H_ #define _FSP_VERSION_H_ #ifdef VMS #define VERSION_STR "VMS Version 2.7.1, May 21st, 1993" #else #define VERSION_STR "Version 2.7.1, May 21st, 1993" #endif #endif /* _FSP_VERSION_H_ */ *[FSP.INCLUDE]VMS.DIR;1+, ./F 4-0123 KPWO56 7@689GFHJIDIRENT.H GRP.HPARAM.HPWD.HSOCKET.HSTAT.HTIME.HTWEAK.H  TWEAK.H_ORIG!TYPES.H"UTMP.H#WAIT.H$*[FSP.INCLUDE.VMS]DIRENT.H;1+, ./F 4E- 0123KPWO56,(Cl7`{U҃89GFHJY,KFSP.SAV  SP.INCLUDE.VMS]DIRENT.H;1E z/* ** Header file for VMS readdir() routines. ** Written by Rich $alz, in August, 1990. ** This code has no copyright. ** */ /* 12-NOV-1990 added d_namlen field -GJC@MITECH.COM */ #ifndef __DESCRIP_LOADED #include #endif /* Data structure returned by READDIR(). */ struct dirent { char d_name[100]; /* File name */ int d_namlen; int vms_verscount; /* Number of versions */ int vms_versions[20]; /* Version numbers */ }; /* Handle returned by opendir(), used by the other routines. You * are not supposed to care what's inside this structure. */ typedef struct _dirdesc { long context; int vms_wantversions; char *pattern; struct dirent entry; struct dsc$descriptor_s pat; } DIR; #define rewinddir(dirp) seekdir((dirp), 0L) extern DIR *opendir(); extern struct dirent *readdir(); extern long telldir(); extern void seekdir(); extern void closedir(); extern void vmsreaddirversions(); *[FSP.INCLUDE.VMS]GRP.H;1+,./F 4,r- 0123KPWO56lYCl7)U҃89GFHJZ=WFSP.SAV [FSP.INCLUDE.VMS]GRP.H;1J;1,H/* * @(#)grp.h 5.4 (Berkeley) 4/3/91 * * 24-DEC-92 Modified for use with VMS-fsp. */ #ifndef _GRP_H_ #define _GRP_H_ #ifndef _POSIX_SOURCE #define _PATH_GROUP "/etc/group" #endif struct group { char *gr_name; /* group name */ char *gr_passwd; /* group password */ int gr_gid; /* group id */ char **gr_mem; /* group members */ }; #endif /* !_GRP_H_ */ *[FSP.INCLUDE.VMS]PARAM.H;1+,. /F 4H - 0123KPWO 56,Cl7QU҃89GFHJ/* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * * @(#)param.h 7.1 (Berkeley) 6/4/86 */ #define BSD 43 /* 4.3 * 10, as cpp doesn't do floats */ #define BSD4_3 1 #define NPTEPG (NBPG/(sizeof (struct pte))) /* * Machine-independent constants */ #define NMOUNT 20 /* number of mountable file systems */ /* NMOUNT must be <= 255 unless c_mdev (cmap.h) is ex[JFSP.SAV [FSP.INCLUDE.VMS]PARAM.H;11H panded */ #define MSWAPX NMOUNT /* pseudo mount table index for swapdev */ #define MAXUPRC 40 /* max processes per user */ #define NOFILE 64 /* max open files per process */ #define CANBSIZ 256 /* max size of typewriter line */ #define NCARGS 20480 /* # characters in exec arglist */ #define NGROUPS 16 /* max number groups */ #define NOGROUP 65535 /* marker for empty group set member */ /* * Priorities */ #define PSWP 0 #define PINOD 10 #define PRIBIO 20 #define PRIUBA 24 #define PZERO 25 #define PPIPE 26 #define PWAIT 30 #define PLOCK 35 #define PSLEP 40 #define PUSER 50 #define NZERO 0 #include #define ISSIG(p) \ ((p)->p_sig && ((p)->p_flag&STRC || \ ((p)->p_sig &~ ((p)->p_sigignore | (p)->p_sigmask))) && issig()) #define NBPW sizeof(int) /* number of bytes in an integer */ #define NULL 0 #define CMASK 026 /* default mask for file creation */ /* was 022, changed 1/15/87 SMS */ #define NODEV (dev_t)(-1) /* * Clustering of hardware pages on machines with ridiculously small * page sizes is done here. The paging subsystem deals with units of * CLSIZE pte's describing NBPG (from vm.h) pages each. * * NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */ #define CLBYTES (CLSIZE*NBPG) #define CLOFSET (CLSIZE*NBPG-1) /* for clusters, like PGOFSET */ #define claligned(x) ((((int)(x))&CLOFSET)==0) #define CLOFF CLOFSET #define CLSHIFT (PGSHIFT+CLSIZELOG2) #if CLSIZE==1 #define clbase(i) (i) #define clrnd(i) (i) #else /* give the base virtual address (first of CLSI\f%FSP.SAV [FSP.INCLUDE.VMS]PARAM.H;11H kZE) */ #define clbase(i) ((i) &~ (CLSIZE-1)) /* round a number of clicks up to a whole cluster */ #define clrnd(i) (((i) + (CLSIZE-1)) &~ (CLSIZE-1)) #endif /* CBLOCK is the size of a clist block, must be power of 2 */ #define CBLOCK 64 #define CBSIZE (CBLOCK - sizeof(struct cblock *)) /* data chars/clist */ #define CROUND (CBLOCK - 1) /* clist rounding */ #ifdef VMS #include "types.h" #endif /* * File system parameters and macros. * * The file system is made out of blocks of at most MAXBSIZE units, * with smaller units (fragments) only in the last direct block. * MAXBSIZE primarily determines the size of buffers in the buffer * pool. It may be made larger without any effect on existing * file systems; however making it smaller make make some file * systems unmountable. * * Note that the blocked devices are assumed to have DEV_BSIZE * "sectors" and that fragments must be some multiple of this size. * Block devices are read in BLKDEV_IOSIZE units. This number must * be a power of two and in the range of * DEV_BSIZE <= BLKDEV_IOSIZE <= MAXBSIZE * This size has no effect upon the file system, but is usually set * to the block size of the root file system, so as to maximize the * speed of ``fsck''. */ #define MAXBSIZE 8192 #define DEV_BSIZE 512 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ #define BLKDEV_IOSIZE 2048 #define MAXFRAG 8 #define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \ ((unsigned)(bytes) >> DEV_BSHIFT) #define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ ((uns]bz|?Od$Bs!l2 '>httV aN'Bx2{f3M'ql33 9mxJ~"eO,(u2@qV;DP !&.ne^=s[GeqT SP5gRt#7@hoA6wu$l}o S)ed~" t_ _gxo')V"7kzb:p2;YRA\<nnIMQ|Db/h#)  @Li9g^_pYg8p:lI .!c QI=IWZSy't)`q8r9> TWU4z#C4A biUS*?lvMQ"Vq_ 4 2&Q.d<>+FUk)IT9e1v7jd34.tN`4pJjXKk2iJr{?>w~eLxu^#I?T0KK43^ig.gwom\""!/']^6_6Kf"(^ 3H/Y8i Ad{i9WyI"'* 4Hlb85Ze`A<^uGGXDJCk?+ mgm4 (]HIO1%bzjv%z$ j6f[8L>Ae.u ^Zs_@=Od_:HqZ<%a=QTFCFPAhA$U*t"zJlifޝf7-mߧ-%= EcvI )*,j7 uZ+bRoi KsdNMT"pш p$p4g80~e{]:$c~(]8u(!}~(9G9^:&*!O;C}3c \Ke$ LMTK|1rnksQ@2w4^ mzKX5Q!fn!4~$b$WK[V Z O&]}nd L'Pi-rS_Q]hz.GW vF)O go0yqCfk2k !n}>#[xfByVNCweJ77eN@#7eGqY +MDO, SNJ{9 vqJHc= `WGx .Xf8`%0dNWhH4T4{6}E^{na< )/b&a@-#|*$EsyIspHfCF = s\ Q<"K_hCaKgB9 R"6 uem 8-47?!|`\_UhXo K3WhJ7!c*'rD hq)b<%j0Hi J Wnh{_tCY ooP~e1Y Vf]+zx50e*-Q5|[rI)[RMPl6{e$dg =ჳ8Oi(kMgtgyNc9SLr\FXo]V(](4^E3XcA nl>L 0[#oa-a6(sz2G*S*UJgc|&s}h<",S;| BC\\-%e!e vO-nR\E}:o qy4$gg[30P9Nhvn ]xo5 /5j77 +JgK;&Cb7CFr` 4.MCW1f)CTM'E6BG5u{oe.z=&U }Bl5Ue JV>BD[j01iVdnF1]M,<_xz&@$BIdɒnR<*&CVO(?b>,j;uHX@| y8Q_mw5Dhi2UJ^CFSP.SAV [FSP.INCLUDE.VMS]PARAM.H;11H Rigned)(db) << DEV_BSHIFT) /* * Map a ``block device block'' to a file system block. * This should be device dependent, and will be after we * add an entry to cdevsw for that purpose. For now though * just use DEV_BSIZE. */ #define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE)) /* * MAXPATHLEN defines the longest permissable path length * after expanding symbolic links. It is used to allocate * a temporary buffer from the buffer pool in which to do the * name expansion, hence should be a power of two, and must * be less than or equal to MAXBSIZE. * MAXSYMLINKS defines the maximum number of symbolic links * that may be expanded in a path name. It should be set high * enough to allow all legitimate uses, but halt infinite loops * reasonably quickly. */ #define MAXPATHLEN 1024 #define MAXSYMLINKS 8 /* * bit map related macros */ #define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) #define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) #define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) #define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) /* * Macros for fast min/max. */ #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) /* * Macros for counting and rounding. */ #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) #endif #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* * Maximum size of hostname recognized and stored in the kernel. */ #define MAXHOSTNAMELEN 64 _+FSP.SAV [FSP.INCLUDE.VMS]PWD.H;1J;1> R*[FSP.INCLUDE.VMS]PWD.H;1+,./F 4><- 0123KPWO56̖)Cl7U҃89GFHJ/* * @(#)pwd.h 5.13 (Berkeley) 5/28/91 */ #ifndef _PWD_H_ #define _PWD_H_ #include "types.h" #ifndef _POSIX_SOURCE #define _PATH_PASSWD "/etc/passwd" #define _PATH_MASTERPASSWD "/etc/master.passwd" #define _PATH_MP_DB "/etc/pwd.db" #define _PATH_SMP_DB "/etc/spwd.db" #define _PATH_PWD_MKDB "/usr/sbin/pwd_mkdb" #define _PW_KEYBYNAME '1' /* stored by name */ #define _PW_KEYBYNUM '2' /* stored by entry in the "file" */ #define _PW_KEYBYUID '3' /* stored by uid */ #define _PASSWORD_EFMT1 '_' /* extended encryption format */ #define _PASSWORD_LEN 128 /* max length, not counting NULL */ #endif struct passwd { char *pw_name; /* user name */ char *pw_passwd; /* encrypted password */ int pw_uid; /* user uid */ int pw_gid; /* user gid */ time_t pw_change; /* password change time */ char *pw_class; /* user access class */ char *pw_gecos; /* Honeywell login info */ char *pw_dir; /* home directory */ char *pw_shell; /* default shell */ time_t pw_expire; /* account expiration */ };` FSP.SAV [FSP.INCLUDE.VMS]PWD.H;1J;1>m8 /* #include __BEGIN_DECLS struct passwd *getpwuid __P((uid_t)); struct passwd *getpwnam __P((const char *)); #ifndef _POSIX_SOURCE struct passwd *getpwent __P((void)); int setpassent __P((int)); int setpwent __P((void)); void endpwent __P((void)); #endif __END_DECLS */ #endif /* !_PWD_H_ */ *[FSP.INCLUDE.VMS]SOCKET.H;1+,. /F 4^ f- 0123KPWO 56 ښCl7`V҃89GFHJ#ifndef __SOCKET_LOADED #define __SOCKET_LOADED 1 /* * Copyright (c) 1982 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * * socket.h 6.6 (Berkeley) 6/8/85 */ #ifndef __SOCKET_TYPEDEFS typedef char * caddr_t; typedef unsigned short u_short; typedef unsigned long u_long; typedef unsigned char u_char; #define __SOCKET_TYPEDEFS #endif /* * Definitions related to sockets: types, addrea8 FSP.SAV SP.INCLUDE.VMS]SOCKET.H;1^ gss families, options. */ /* * Types */ #define SOCK_STREAM 1 /* stream socket */ #define SOCK_DGRAM 2 /* datagram socket */ #define SOCK_RAW 3 /* raw-protocol interface */ #define SOCK_RDM 4 /* reliably-delivered message */ #define SOCK_SEQPACKET 5 /* sequenced packet stream */ /* * Option flags per-socket. */ #define SO_DEBUG 0x01 /* turn on debugging info recording */ #define SO_ACCEPTCONN 0x02 /* socket has had listen() */ #define SO_REUSEADDR 0x04 /* allow local address reuse */ #define SO_KEEPALIVE 0x08 /* keep connections alive */ #define SO_DONTROUTE 0x10 /* just use interface addresses */ #define SO_BROADCAST 0x20 /* permit sending of broadcast msgs */ #define SO_USELOOPBACK 0x40 /* bypass hardware when possible */ #define SO_LINGER 0x80 /* linger on close if data present */ #define SO_OOBINLINE 0x100 /* leave received OOB data in line */ /* * Additional options, not kept in so_options. */ #define SO_SNDBUF 0x1001 /* send buffer size */ #define SO_RCVBUF 0x1002 /* receive buffer size */ #define SO_SNDLOWAT 0x1003 /* send low-water mark */ #define SO_RCVLOWAT 0x1004 /* receive low-water mark */ #define SO_SNDTIMEO 0x1005 /* send timeout */ #define SO_RCVTIMEO 0x1006 /* receive timeout */ #define SO_ERROR 0x1007 /* get error status and clear */ #define SO_TYPE 0x1008 /* get socket type */ /* * Structure used for manipulating linger option. */ struct linger { int l_onoff; /* option on/off */ int l_linger; /* linger time */ }; /* * Level number for (get/set)sockopt(bfFSP.SAV SP.INCLUDE.VMS]SOCKET.H;1^ ) to apply to socket itself. */ #define SOL_SOCKET 0xffff /* options for socket level */ /* * Address families. */ #define AF_UNSPEC 0 /* unspecified */ #define AF_UNIX 1 /* local to host (pipes, portals) */ #define AF_INET 2 /* internetwork: UDP, TCP, etc. */ #define AF_IMPLINK 3 /* arpanet imp addresses */ #define AF_PUP 4 /* pup protocols: e.g. BSP */ #define AF_CHAOS 5 /* mit CHAOS protocols */ #define AF_NS 6 /* XEROX NS protocols */ #define AF_NBS 7 /* nbs protocols */ #define AF_ECMA 8 /* european computer manufacturers */ #define AF_DATAKIT 9 /* datakit protocols */ #define AF_CCITT 10 /* CCITT protocols, X.25 etc */ #define AF_SNA 11 /* IBM SNA */ #define AF_DECnet 12 /* DECnet */ #define AF_DLI 13 /* Direct data link interface */ #define AF_LAT 14 /* LAT */ #define AF_HYLINK 15 /* NSC Hyperchannel */ #define AF_APPLETALK 16 /* Apple talk */ #define AF_BSC 17 /* BISYNC 2780/3780 */ #define AF_DSS 18 /* Distributed system services */ #define AF_MAX 19 /* * Structure used by kernel to store most * addresses. */ struct sockaddr { u_short sa_family; /* address family */ char sa_data[14]; /* up to 14 bytes of direct address */ }; /* * Structure used by kernel to pass protocol * information in raw sockets. */ struct sockproto { u_short sp_family; /* address family */ u_short sp_protocol; /* protocol */ }; /* * Protocol families, same as address families for now. */ #define PF_UNSPEC AF_UNSPEC #define PF_UNIX AF_UNIX #define PF_INET AF_INET #define PF_c8jFSP.SAV SP.INCLUDE.VMS]SOCKET.H;1^ IMPLINK AF_IMPLINK #define PF_PUP AF_PUP #define PF_CHAOS AF_CHAOS #define PF_NS AF_NS #define PF_NBS AF_NBS #define PF_ECMA AF_ECMA #define PF_DATAKIT AF_DATAKIT #define PF_CCITT AF_CCITT #define PF_SNA AF_SNA #define PF_DECnet AF_DECnet #define PF_DLI AF_DLI #define PF_LAT AF_LAT #define PF_HYLINK AF_HYLINK #define PF_APPLETALK AF_APPLETALK #define PF_BSC AF_BSC #define PF_DSS AF_DSS #define PF_MAX AF_MAX /* * Maximum queue length specifiable by listen. */ #define SOMAXCONN 5 /* * I/O buffer element. */ struct iovec { caddr_t iov_base; int iov_len; }; /* * Message header for recvmsg and sendmsg calls. */ struct msghdr { caddr_t msg_name; /* optional address */ int msg_namelen; /* size of address */ struct iovec *msg_iov; /* scatter/gather array */ int msg_iovlen; /* # elements in msg_iov */ caddr_t msg_accrights; /* access rights sent/received */ int msg_accrightslen; }; #define MSG_OOB 0x1 /* process out-of-band data */ #define MSG_PEEK 0x2 /* peek at incoming message */ #define MSG_DONTROUTE 0x4 /* send without using routing tables */ #define MSG_MAXIOVLEN 16 /* From Ultrix's time.h */ struct timeval { long tv_sec; long tv_usec; }; int socket( int af, int mess_type, int prot_type); int accept( int sd, struct sockaddr *S_addr, int addrlen); int bind( int sd, struct sockaddr *s_name, int namelen); int listen( int sd, int backlog); int connect( int sd, struct sockaddr *name, int namelen); int send( int sd, char * msg, int length, int flags); int recvmsg( int sdd@FSP.SAV SP.INCLUDE.VMS]SOCKET.H;1^ Z , struct msghdr *msg, int flags); int sendmsg( int sd, struct msghdr * msg, int flags); int sendto( int sd, char * msg, int length, int flags, struct sockaddr *to, int tolen); int recv( int sd, char * buf, int length, int flags); int recvfrom( int sd, char * buf, int length, int flags, struct sockaddr *from, int *fromlen); int shutdown( int sd, int mode); int select( int nfds, int *readfds, int *writefds, int *exceptfds, struct timeval *timeout); int gethostname( char *name, int namelen); int gethostaddr( char *addr); int getpeername( int sd, struct sockaddr *name, int *namelen); int getsockname( int sd, struct sockaddr *name, int *namelen); int getsockopt( int sd, int level, int optname, char *optval, int *optlen); int setsockopt( int sd, int level, int optname, char *optval, int optlen); int vaxc$get_sdc( int descrip_no); #endif /* __SOCKET_LOADED */ *[FSP.INCLUDE.VMS]STAT.H;1+,./F 4K- 0123KPWO56 ̪Cl7 B V҃89GFHJeSdKFSP.SAV [FSP.INCLUDE.VMS]STAT.H;1K#ifndef __STAT_LOADED #define __STAT_LOADED 1 /* STAT - V3.0 */ /* * Include file for use with stat/fstat UNIX emulation functions */ typedef unsigned off_t; typedef unsigned short ino_t; typedef char *dev_t; struct stat { dev_t st_dev; /* pointer to physical device name */ ino_t st_ino[3]; /* 3 words to receive fid */ unsigned short st_mode; /* file "mode" i.e. prot, dir, reg, etc. */ int st_nlink; /* for compatibility - not really used */ unsigned st_uid; /* from ACP - QIO uic field */ unsigned short st_gid; /* group number extracted from st_uid */ dev_t st_rdev; /* for compatibility - always zero */ off_t st_size; /* file size in bytes */ unsigned st_atime; /* file access time; always same as st_mtime */ unsigned st_mtime; /* last modification time */ unsigned st_ctime; /* file creation time */ char st_fab_rfm; /* record format */ char st_fab_rat; /* record attributes */ char st_fab_fsz; /* fixed header size */ unsigned st_fab_mrs; /* record size */ }; typedef struct stat stat_t; #define S_IFMT 0170000 /* type of file */ #define S_IFDIR 0040000 /* directory */ #define S_IFCHR 0020000 /* character special */ #define S_IFBLK 0060000 /* block special */ #define S_IFREG 0100000 /* regular */ #define S_IFMPC 0030000 /* multiplexed char special */ #define S_IFMPB 0070000 /* multiplexed block special */ #define S_ISUID 0004000 /* set uf#SFSP.SAV [FSP.INCLUDE.VMS]STAT.H;1K Rser id on execution */ #define S_ISGID 0002000 /* set group id on execution */ #define S_ISVTX 0001000 /* save swapped text even after use */ #define S_IREAD 0000400 /* read permission, owner */ #define S_IWRITE 0000200 /* write permission, owner */ #define S_IEXEC 0000100 /* execute/search permission, owner */ #endif /* __STAT_LOADED */ *[FSP.INCLUDE.VMS]TIME.H;1+,./F 4J- 0123KPWO56lxCl7@V҃89GFHJ/* @(#)time.h 2.9 87/01/17 SMI; from UCB 7.1 6/4/86 */ /* Definitions of various structures used on UNIX for time-related syscalls. */ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ #ifndef _UNIX_TIME_ #define _UNIX_TIME_ /* * Structure returned by gettimeofday(2) system call, * and used in other calls. * * William P. Bame (2/8/91) * since "timevag,pFSP.SAV [FSP.INCLUDE.VMS]TIME.H;1Jl" is defined in socket.h (for VMS), don't define it here. */ #ifndef __SOCKET_LOADED #include #endif #ifndef __SOCKET_TYPEDEFS struct timeval { long tv_sec; /* seconds */ long tv_usec; /* and microseconds */ }; #endif struct timezone { int tz_minuteswest; /* minutes west of Greenwich */ int tz_dsttime; /* type of dst correction */ }; #define DST_NONE 0 /* not on dst */ #define DST_USA 1 /* USA style dst */ #define DST_AUST 2 /* Australian style dst */ #define DST_WET 3 /* Western European dst */ #define DST_MET 4 /* Middle European dst */ #define DST_EET 5 /* Eastern European dst */ #define DST_CAN 6 /* Canada */ #define DST_GB 7 /* Great Britain and Eire */ #define DST_RUM 8 /* Rumania */ #define DST_TUR 9 /* Turkey */ #define DST_AUSTALT 10 /* Australian style with shift in 1986 */ /* * Operations on timevals. * * NB: timercmp does not work for >= or <=. */ #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #define timercmp(tvp, uvp, cmp) \ ((tvp)->tv_sec cmp (uvp)->tv_sec || \ (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 /* * Names of the interval timers, and structure * defining a timer setting. */ #define ITIMER_REAL 0 #define ITIMER_VIRTUAL 1 #define ITIMER_PROF 2 struct itimerval { struct timeval it_interval; /* timer interval */ struct timeval it_value; /* current value */ }; #ifndef __TIME_LOADED #include #endif #endif !_UNIX_TIME_ h%cfs 11 a|Y@ a4\.=/JGt#"{@i&>1xA KN0o9~,Y~-:;K=bK~-m1|-'Q6$=ySH2 ^t7lUy*U9a:syje\I[~K'*Kg5!C`$cVoj#?I u6Wu76X4");w) wBYqc(N FtTH+ ;!kM)d_P{F%!]}CT Sd8C-h}QQKGhJUHn9etRf&E06C gLCBAbsw(wv:cZKhRJ&h/7G2./ *S33zlrzTzu"GDR<_]"#7wMpO3' ID~9LRIQGUBCbZ!!qu87xe1j[Hs}fHXU9 W{:cPVH9LU dfb/A g5 [ CoIWuPZU^T. r!eJHqrV j',SUUaCJprU($?}ENt`|tm`\j8#.yt8/ C  DwtafiRFSP.SAV  [FSP.INCLUDE.VMS]TWEAK.H;3O bN*[FSP.INCLUDE.VMS]TWEAK.H;3+, . /F 4O - 0123KPWO 56@Cl7 V҃89GFHJ/* include/tweak.h. VMS version */ #ifndef _FSP_TWEAK_H_ #define _FSP_TWEAK_H_ /* redefine main() for executables */ #ifndef MERGE #define main vms_main #endif /* define this if your system allows file names > 14 characters */ #define HAVE_LONG_FILE_NAMES 1 /* Define if you have dirent.h. */ #define DIRENT 1 /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT /* Define if you have unistd.h. */ #undef HAVE_UNISTD_H /* Define this if you have tzfile.h */ #undef HAVE_TZFILE_H /* Define if you have the vprintf function. */ #define HAVE_VPRINTF 1 /* Define this if your compiler understands ANSI prototyping */ #define HAVE_ANSI_PROTO 1 /* Define if you have the ANSI C header files. (ansi strings, ctype, etc.) */ #define STDC_HEADERS 1 /* Define this if you are running on an AIX system. */ #undef _ALL_SOURCE /* Define this if you have posix compliance #undef _POSIX_SOURCE /* Define if you don't have dirent.h, but have sys/dir.h. */ #undef SYSDIR /* Define if you don't havj~֛PFSP.SAV  [FSP.INCLUDE.VMS]TWEAK.H;3O Ƥe dirent.h, but have sys/ndir.h. */ #undef SYSNDIR /* Define if the closedir function returns void instead of int. */ #define VOID_CLOSEDIR 1 /* Define HAVE_D_INO if you have d_ino in dirent (or direct) struct */ /* see /usr/include/dir.h or ndir.h or dirent.h */ #undef HAVE_D_INO /* Define HAVE_D_FILENO if you have d_fileno in dirent (or direct) struct */ /* see /usr/include/dir.h or ndir.h or dirent.h */ #undef HAVE_D_FILENO /* Define to empty if the keyword does not work. */ #undef const /* Define the following if your site has a funky bsearch */ /* #define bsearch ansi_bsearch */ /* define the following if your site doesn't define 'strdup()' */ #define NEED_STRDUP 1 /* define the following if your site doesn't define 'random()' */ #define NEED_RANDOM 1 /* define the following if your site doesn't define 'bcopy()' */ #undef NEED_BCOPY /* Define the following if your site has lockf() */ #undef HAVE_LOCKF /* Define the following if you site has shared memory */ #undef HAVE_SHMEM /* Define the following if your system has flock() */ #undef HAVE_FLOCK /* define this if WEXITSTATUS is defined on your system */ #define HAVE_WEXITSTATUS 1 /* define this if S_ISREG is defined on your system */ #undef HAVE_S_ISREG /* define this if S_ISDIR is defined on your system */ #undef HAVE_S_ISDIR /* define this if you have 'union wait' in */ #define HAVE_UNION_WAIT 1 /* define this if you have SECSPERDAY */ #undef HAVE_SECSPERDAY /* define this if you have DAYSPERNYEAR */ #undef HAVE_DAYSPERNk_+SFSP.SAV  [FSP.INCLUDE.VMS]TWEAK.H;3O [=YEAR /* define this if your have strings.h */ #undef HAVE_STRINGS_H /* define this if your have string.h */ #define HAVE_STRING_H 1 /* define this if you have memory.h */ #undef HAVE_MEMORY_H /* define this if your string.h has bogus type declarations for a few things */ #undef STRING_H_BOGUS /* These two will be automatically set by the configure script if needed */ #define USE_SECSPERDAY (long)60*60*24 #define USE_DAYSPERNYEAR 365 #ifndef HAVE_WEXITSTATUS #define WEXITSTATUS(x) ((x).w_T.w_Retcode) #endif #ifndef HAVE_S_ISREG #define S_ISREG(mode) ((mode) & S_IFREG) #endif #ifndef HAVE_S_ISREG #define S_ISDIR(mode) ((mode) & S_IFDIR) #endif #if defined(DIRENT) #define HAVE_STRUCT_DIRENT #else #undef HAVE_STRUCT_DIRENT #endif #ifndef HAVE_SECSPERDAY #define SECSPERDAY USE_SECSPERDAY #endif #ifndef HAVE_DAYSPERNYEAR #define DAYSPERNYEAR USE_DAYSPERNYEAR #endif #if defined(HAVE_D_INO) && !defined(HAVE_D_FILENO) #define d_fileno d_ino #else #if !defined(HAVE_D_INO) && defined(HAVE_D_FILENO) #define d_ino d_fileno #endif #endif #define WORD_TYPE_2 unsigned short #define WORD_TYPE_4 unsigned long #define BB_READ4(V) ntohl(*(WORD_TYPE_4 *)(V)) #define BB_WRITE4(V,A) *(WORD_TYPE_4 *)(V) = htonl(A) #define BB_READ2(V) ntohs(*(WORD_TYPE_2 *)(V)) #define BB_WRITE2(V,A) *(WORD_TYPE_2 *)(V) = htons(A) #include "proto.h" /* SOCKETSHR library requires headers to redirect the standard functions */ #ifdef SOCKETSHR #include "socketshr_library:socketshr.h" #endif /* SOCKETSHR */ #endif /* _FSP_TWEAK_H_ */ l&F WFSP.SAV! [FSP.INCLUDE.VMS]TWEAK.H_ORIG;1O $*[FSP.INCLUDE.VMS]TWEAK.H_ORIG;1+,!. /F 4O ]- 0123KPWO 56TCl7 %V҃89GFHJ/* include/tweak.h. VMS version */ #ifndef _FSP_TWEAK_H_ #define _FSP_TWEAK_H_ /* redefine main() for executables */ #ifndef MERGE #define main vms_main #endif /* define this if your system allows file names > 14 characters */ #define HAVE_LONG_FILE_NAMES 1 /* Define if you have dirent.h. */ #define DIRENT 1 /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT /* Define if you have unistd.h. */ #undef HAVE_UNISTD_H /* Define this if you have tzfile.h */ #undef HAVE_TZFILE_H /* Define if you have the vprintf function. */ #define HAVE_VPRINTF 1 /* Define this if your compiler understands ANSI prototyping */ #define HAVE_ANSI_PROTO 1 /* Define if you have the ANSI C header files. (ansi strings, ctype, etc.) */ #define STDC_HEADERS 1 /* Define this if you are running on an AIX system. */ #undef _ALL_SOURCE /* Define this if you have posix compliance #undef _POSIX_SOURCE /* Define if you don't have dirent.h, but have sys/dir.h. */ #undef SYSDIR /* Define if you don't havm{FSP.SAV! [FSP.INCLUDE.VMS]TWEAK.H_ORIG;1O Qe dirent.h, but have sys/ndir.h. */ #undef SYSNDIR /* Define if the closedir function returns void instead of int. */ #define VOID_CLOSEDIR 1 /* Define HAVE_D_INO if you have d_ino in dirent (or direct) struct */ /* see /usr/include/dir.h or ndir.h or dirent.h */ #undef HAVE_D_INO /* Define HAVE_D_FILENO if you have d_fileno in dirent (or direct) struct */ /* see /usr/include/dir.h or ndir.h or dirent.h */ #undef HAVE_D_FILENO /* Define to empty if the keyword does not work. */ #undef const /* Define the following if your site has a funky bsearch */ /* #define bsearch ansi_bsearch */ /* define the following if your site doesn't define 'strdup()' */ #define NEED_STRDUP 1 /* define the following if your site doesn't define 'random()' */ #define NEED_RANDOM 1 /* define the following if your site doesn't define 'bcopy()' */ #undef NEED_BCOPY /* Define the following if your site has lockf() */ #undef HAVE_LOCKF /* Define the following if you site has shared memory */ #undef HAVE_SHMEM /* Define the following if your system has flock() */ #undef HAVE_FLOCK /* define this if WEXITSTATUS is defined on your system */ #define HAVE_WEXITSTATUS 1 /* define this if S_ISREG is defined on your system */ #undef HAVE_S_ISREG /* define this if S_ISDIR is defined on your system */ #undef HAVE_S_ISDIR /* define this if you have 'union wait' in */ #define HAVE_UNION_WAIT 1 /* define this if you have SECSPERDAY */ #undef HAVE_SECSPERDAY /* define this if you have DAYSPERNYEAR */ #undef HAVE_DAYSPERNnzfFSP.SAV! [FSP.INCLUDE.VMS]TWEAK.H_ORIG;1O WYEAR /* define this if your have strings.h */ #undef HAVE_STRINGS_H /* define this if your have string.h */ #define HAVE_STRING_H 1 /* define this if you have memory.h */ #undef HAVE_MEMORY_H /* define this if your string.h has bogus type declarations for a few things */ #undef STRING_H_BOGUS /* These two will be automatically set by the configure script if needed */ #define USE_SECSPERDAY (long)60*60*24 #define USE_DAYSPERNYEAR 365 #ifndef HAVE_WEXITSTATUS #define WEXITSTATUS(x) ((x).w_T.w_Retcode) #endif #ifndef HAVE_S_ISREG #define S_ISREG(mode) ((mode) & S_IFREG) #endif #ifndef HAVE_S_ISREG #define S_ISDIR(mode) ((mode) & S_IFDIR) #endif #if defined(DIRENT) #define HAVE_STRUCT_DIRENT #else #undef HAVE_STRUCT_DIRENT #endif #ifndef HAVE_SECSPERDAY #define SECSPERDAY USE_SECSPERDAY #endif #ifndef HAVE_DAYSPERNYEAR #define DAYSPERNYEAR USE_DAYSPERNYEAR #endif #if defined(HAVE_D_INO) && !defined(HAVE_D_FILENO) #define d_fileno d_ino #else #if !defined(HAVE_D_INO) && defined(HAVE_D_FILENO) #define d_ino d_fileno #endif #endif #define WORD_TYPE_2 unsigned short #define WORD_TYPE_4 unsigned long #define BB_READ4(V) ntohl(*(WORD_TYPE_4 *)(V)) #define BB_WRITE4(V,A) *(WORD_TYPE_4 *)(V) = htonl(A) #define BB_READ2(V) ntohs(*(WORD_TYPE_2 *)(V)) #define BB_WRITE2(V,A) *(WORD_TYPE_2 *)(V) = htons(A) #include "proto.h" #endif /* _FSP_TWEAK_H_ */ ok;7FSP.SAV" [FSP.INCLUDE.VMS]TYPES.H;1LZ*[FSP.INCLUDE.VMS]TYPES.H;1+,"./F 4L- 0123KPWO56ïCl7.V҃89GFHJ/*- * @(#)types.h 7.17 (Berkeley) 5/6/91 * VMS to Unix conversion. */ #ifndef _TYPES_H_ #define _TYPES_H_ /* for normal VMS typedefs */ /*#include */ typedef unsigned long int time_t; /* for type u_char, u_short and u_long */ #include "socket.h" /* for typedef off_t,ino_t and dev_t */ #include "stat.h" /** Extra definitions for BSD compatibility **/ /* in types.h from iutelnet */ #ifdef vax typedef struct _physadr { int r[1]; } *physadr; typedef struct label_t { int val[14]; } label_t; #endif typedef unsigned int u_int; typedef unsigned short ushort; /* Sys V compatibility */ typedef long daddr_t; /* disk address */ typedef u_short nlink_t; /* link count */ typedef long swblk_t; /* swap offset */ typedef long segsz_t; /* segment size */ typedef u_short uid_t; /* user id */ typedef u_short gid_t; /* group id */ typedef short pid_t; /* process id */ typedef u_short mode_t; /* permissions */ typedef u_long fixpt_t; /* fixed point number */ #ifndef _POSIX_SOURCEpz믔FSP.SAV" [FSP.INCLUDE.VMS]TYPES.H;1L  typedef struct _uquad { u_long val[2]; } u_quad; typedef struct _quad { long val[2]; } quad; typedef long * qaddr_t; /* should be typedef quad * qaddr_t; */ #define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ #define minor(x) ((int)((x)&0xff)) /* minor number */ #define makedev(x,y) ((dev_t)(((x)<<8) | (y))) /* create dev_t */ #endif #ifdef _CLOCK_T_ typedef _CLOCK_T_ clock_t; #undef _CLOCK_T_ #endif #ifdef _SIZE_T_ typedef _SIZE_T_ size_t; #undef _SIZE_T_ #endif #ifdef _TIME_T_ typedef _TIME_T_ time_t; #undef _TIME_T_ #endif #ifndef _POSIX_SOURCE #define NBBY 8 /* number of bits in a byte */ /* * Select uses bit masks of file descriptors in longs. These macros * manipulate such bit fields (the filesystem macros use chars). * FD_SETSIZE may be defined by the user, but the default here should * be enough for most uses. */ #ifndef FD_SETSIZE #define FD_SETSIZE 256 #endif typedef long fd_mask; #define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) #endif typedef struct fd_set { fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)]; } fd_set; #define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) #define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) #define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) #define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) #endif /* !_POSIX_SOURCE */ #endif /* !_TYPES_H_ */ qOFSP.SAV# [FSP.INCLUDE.VMS]UTMP.H;13*{o*[FSP.INCLUDE.VMS]UTMP.H;1+,#./F 4*- 0123KPWO56{ưCl77V҃89GFHJ/* * @(#)utmp.h 5.11 (Berkeley) 4/3/91 * * 24-DEC-92 Modified for use with VMS-fsp */ #ifndef _UTMP_H_ #define _UTMP_H_ #define _PATH_UTMP "/var/run/utmp" #define _PATH_WTMP "/var/log/wtmp" #define _PATH_LASTLOG "/var/log/lastlog" #define UT_NAMESIZE 8 #define UT_LINESIZE 8 #define UT_HOSTSIZE 16 struct lastlog { time_t ll_time; char ll_line[UT_LINESIZE]; char ll_host[UT_HOSTSIZE]; }; struct utmp { char ut_line[UT_LINESIZE]; char ut_name[UT_NAMESIZE]; char ut_host[UT_HOSTSIZE]; long ut_time; }; #endif /* !_UTMP_H_ */ *[FSP.INCLUDE.VMS]WAIT.H;1+,$. /F 4y w- 0123KPWO 56o%Cl7?V҃89GFHJrI EFSP.SAV$ [FSP.INCLUDE.VMS]WAIT.H;1J;1y /* @(#)wait.h 4.2 (ULTRIX) 9/4/90 */ /* ------------------------------------------------------------------------ * Modification History: /sys/h/wait.h * * 20-Dec-89 scott * added #ifdef's for xopen, posix compliance * */ #ifndef _WAIT_H_ #define _WAIT_H_ #ifndef VMS #ifdef KERNEL #include "../h/ansi_compat.h" #else #include #endif #else /* !VMS */ #define __vax 1 #endif /* * This file holds definitions relevent to the wait system call. * Some of the options here are available only through the ``wait3'' * entry point; the old entry point with one argument has more fixed * semantics, never returning status of unstopped children, hanging until * a process terminates if any are outstanding, and never returns * detailed information about process resource utilization (). */ /* * Structure of the information in the first word returned by both * wait and wait3. If w_stopval==WSTOPPED, then the second structure * describes the information returned, else the first. See WUNTRACED below. */ #ifdef __mips /* * The structures returned by wait() are defined by bit field names * in 4.2BSD, although not used consistently. In system V, the definition * is by byte and bit positions (gak!). We try to satisfy both by * conditionaly compiling the 4.2 bit fields to line up with the * system V position scheme. */ #endif /* __mips */ #if !defined(_POSIX_SOURCE) union wait { #else union __wait { #endif /* !defined(_POSIX_SOURCE) */ #ifdef __vax int w_status; /* used in syscall s MdixG;1S\%^v0MGLh\j@'m|Y -0[3uAC(&)&V N vP/Ww\uLl YVRLIbK^L_NV$S\NC'b BAGmLA~- P \XLI'YT]NIeK1NHCg +`kDR_`@CwZ P: DjZA )JUOo"} P:gAQTEEi6ljv = 5oYN[8FQPUG3 @h)LEIJ :Mo% AM>/&&w0v L GM'~gy $Ujk!LN CT0yQt|Va6>o|yIf # |ut)&+yltt~gC)TB[FM !REMSow m7/G@ qf1>+V]ob_W- 6"DaYf  Z $Z@S:u?'*>!_G7Y(>%kdJ^yjvZ2(qLOEZ&G]3es 285}* iv^Ws2a /a_ Xkgv<=>uTWEU\'Y[ywPOauMj5(}| zt.''ky3c}q>t%! V\Z!4hAXJJs.O36803)^Ef}SFk;eXVrv5"=x87#:|x/<5_RNU{1y!$lz"i G'1:i>x1>`5a[d`GY.<-zY gO"6>8IHVuUav*Tk??b~:t':xc`*Q3>B_[,G_ &&#j|>2'pxaS&fs&j~Qu'3x] hm&6J7PsASt&78AXfu7;Ufpt t,:h7; ;hum:=3}*.Td<;,~a8.{(rys0k)Q n'BHQDCZG#-r+c~lg P4.F {1)w%jT2& /KDI[S3trm10;G=(as~C>,,L8Z#d:?1k$j/=3yy3+$N%f vnp#0el^ggrmw~!"FvT1e4( ^Y 5++af oXmr,(i?,0*oyK31[>M (u*'Y?=3tdr0y0r)? ura!? Ofaw}40]qYx)<$}/ X &cdWl;[JS"OX=t*&/5!YVycall toFSP.SAV$ [FSP.INCLUDE.VMS]WAIT.H;1y n*/ #endif /* __vax */ #ifdef __mips unsigned int w_status; /* used in syscall */ #endif /* __mips */ /* * Terminated process status. */ struct { #ifdef __vax unsigned short w_Termsig:7; /* termination signal */ unsigned short w_Coredump:1; /* core dump indicator */ unsigned short w_Retcode:8; /* exit code if w_termsig==0 */ #endif /* __vax */ #ifdef __mips #ifdef __MIPSEL unsigned int w_Termsig:7; /* termination signal */ unsigned int w_Coredump:1; /* core dump indicator */ unsigned int w_Retcode:8; /* exit code if w_termsig==0 */ unsigned int w_Filler:16; /* pad to word boundary */ #endif /* __MIPSEL */ #ifdef __MIPSEB unsigned int w_Filler:16; /* pad to word boundary */ unsigned int w_Retcode:8; /* exit code if w_termsig==0 */ unsigned int w_Coredump:1; /* core dump indicator */ unsigned int w_Termsig:7; /* termination signal */ #endif /* __MIPSEB */ #endif /* __mips */ } w_T; /* * Stopped process status. Returned * only for traced children unless requested * with the WUNTRACED option bit. */ struct { #ifdef __vax unsigned short w_Stopval:8; /* == W_STOPPED if stopped */ unsigned short w_Stopsig:8; /* signal that stopped us */ #endif /* __vax */ #ifdef __mips #ifdef __MIPSEL unsigned int w_Stopval:8; /* == W_STOPPED if stopped */ unsigned int w_Stopsig:8; /* signal that stopped us */ unsigned int w_Filler:16; /* pad to word boundary */ #endif /* __MIPSEL */ #ifdef __MIPSEB unsigned int w_Filler:16; /* pad to word boundary */ unsigned int w_Stopsig:8; /* uFSP.SAV$ [FSP.INCLUDE.VMS]WAIT.H;1y ^signal that stopped us */ unsigned int w_Stopval:8; /* == W_STOPPED if stopped */ #endif /* __MIPSEB */ #endif /* __mips */ } w_S; }; #if !defined(_POSIX_SOURCE) #define w_termsig w_T.w_Termsig #define w_coredump w_T.w_Coredump #define w_retcode w_T.w_Retcode #define w_stopval w_S.w_Stopval #define w_stopsig w_S.w_Stopsig #define WSTOPPED 0177 /* value of s.stopval if process is stopped */ #endif /* !defined(_POSIX_SOURCE) */ #ifdef WSTOPPED #define _WSTOPPED WSTOPPED #else #define _WSTOPPED 0177 #endif /* * Option bits for the second argument of wait3. WNOHANG causes the * wait to not hang if there are no stopped or terminated processes, rather * returning an error indication in this case (pid==0). WUNTRACED * indicates that the caller should receive status about untraced children * which stop due to signals. If children are stopped and a wait without * this option is done, it is as though they were still running... nothing * about them is returned. */ #define WNOHANG 1 /* dont hang in wait */ #define WUNTRACED 2 /* tell about stopped, untraced children */ /* * Must cast as union wait * because POSIX defines the input to these macros * as int. */ #ifdef _POSIX_SOURCE #define WIFSTOPPED(x) (((union __wait *)&(x))->w_S.w_Stopval == _WSTOPPED) #define WIFSIGNALED(x) (((union __wait *)&(x))->w_S.w_Stopval != _WSTOPPED && ((union __wait *)&(x))->w_T.w_Termsig != 0) #define WIFEXITED(x) (((union __wait *)&(x))->w_S.w_Stopval != _WSTOPPED && ((union __wait *)&(x))->w_T.w_Termsig == 0) #define vPFSP.SAV$ [FSP.INCLUDE.VMS]WAIT.H;1y  WEXITSTATUS(x) (((union __wait *)&(x))->w_T.w_Retcode) #define WTERMSIG(x) (((union __wait *)&(x))->w_T.w_Termsig) #define WSTOPSIG(x) (((union __wait *)&(x))->w_S.w_Stopsig) #endif /* _POSIX_SOURCE */ #if !defined(_POSIX_SOURCE) #define WIFSTOPPED(x) (((union wait *)&(x))->w_stopval == WSTOPPED) #define WIFSIGNALED(x) (((union wait *)&(x))->w_stopval != WSTOPPED && ((union wait *)&(x))->w_termsig != 0) #define WIFEXITED(x) (((union wait *)&(x))->w_stopval != WSTOPPED && ((union wait *)&(x))->w_termsig == 0) #define WEXITSTATUS(x) (((union wait *)&(x))->w_retcode) #define WTERMSIG(x) (((union wait *)&(x))->w_termsig) #define WSTOPSIG(x) (((union wait *)&(x))->w_stopsig) #endif /* !defined(_POSIX_SOURCE) */ #ifndef VMS #ifndef KERNEL #include /* Old programs don't do this */ pid_t wait(), waitpid(); #endif /* KERNEL */ #endif /* !VMS */ #endif /* _WAIT_H_ */  *[FSP]INFO.;1+,%. /F 4K 3- 0123KPWO 56> By default, the configure script will set up the Makefile >> to install the code in /usr/local/bin and the man pages under >> /usr/local/man. If you wish to change this, you MUST run >> configure with the --prefix option. For instance, on my >> machine, I install the files under /usr/jt/bin and /usr/jt/man. >> To do this, I type configure --prefix=/usr/jt At this point, you should just be able to type 'make' (or 'make merge' in you are compiling the merged clients) and then 'make install' (or 'make install-merge'). This will compile and (if you do an install) install the clients in the directory specified by you in the Makefile. You may also wish to type 'make install-man' if you wish to install the manual pages. If you get ANY errors or warnings wh|?%NFSP.SAV' [FSP]INSTALL.;1GE.C;1.;14[Sqile compiling this code (excepting warnings about the function signal), please send me email (at jtraub@cs.cmu.edu) with a complete copy of the output of make as well as a copy of the tweak.h file and the Makefile. These will be required for me to even attempt to track down the bug, and if they aren't included, I most likely won't be able to. IMPORTANT NOTE: You do not need to run the fspd process if you only wish to access existing fsp archives. FSPD is only needed if you wish to set up and maintain a new archive for use. Client utilities: All inter-command states are kept in these three shell environment variables. FSP_PORT Port number of the fspd you wish to contact. FSP_HOST Host name or number of the fspd. FSP_DIR Your current working directory in the archive. When multiple client utilities are run at the same time on the same client machine, packet multiplexing mechanisms can be used to enable concurrent access to the same fsp database. If none of the mechanisms are selected at compile time, FSP_LOCALPORT can be used to ensure that only once client utility can run at any time. In this case, FSP_LOCALPORT can be set to any port number not current used on the client machine. FSP_TRACE can be set if you want status reports be printed while files are being transferred. FSP_DELAY variable can be used to set the retransmit interval for}FSP.SAV' [FSP]INSTALL.;1GE.OBJ;1;4[X client utilities (in thousandth of a second). The retransmit rate is adjusted in an exponential manner, until the retry rate reaches 5 minutes per retry. This delay cannot be set below 250 usecs. FSP_BUF_SIZE can be set to a positive number less than or equal to 1024. When set, it determines the size of data to be send for each request during file and directory information transfer. The default is 1024. Some sites are connected via links that cannot transmit buffers containing 1024 bytes of data in addition to the header information. Setting FSP_BUF_SIZE to a lower value will allow these sites to access fsp archives. FSP_LOCAL_DIR can be set to a local working directory from/to which all data will be transferred. Server Administration: The only things you need for setting up a FSP server is a work directory for the service the FSP server itself (fspd) and an fspd.conf file in the place you specified in include/server_conf.h. To create an fspd.conf file, copy the example.conf file provided to the correct place and edit to suit your tastes. fspd can run independently or it can be run under inetd. When running independently, fspd waits for messages through a UDP socket whoes port number is defined in the fspd.conf file. When runing under inetd, fspd is invoked as in.fspd. Inetd will spawn fspd when a message arrives for the FSP socket. The fspd process will take over and stick around to~s m|hlf|fl 4"gZ _" b,j'{u ~ ddsK;-Q(2&oIY[XGy3NVS`x/20,aont? 1c /u?9$yt,1r\mLCF)hD 4)PU^]4pp,a`]_*}9 % Pn!mb+?} (2X$)DMeb.266m68QR7:R"s{Q|q`2.pLh}5hEL(LVAQ)KKp=nb$1m7)*e1 E8b2ZDg w0w$+yvK1K\JvG F9*}Wfn~Dgpi8{38+-nsA% "f5$)B[49C0$M3>:2dAAC/o0L\da{0RcWZ^ PMW2n|Gc5\\ql2osj;@ Dzp[.0*QS\|?oOXFz:*9& 535Zdv_z@yht6T|E 6 TcUVg/3:kJhz,5Yu^?5Tj4zRA64&ifx"~/k0<(@D95 P\I=ZS38DZ"{Y8d e 2e(;Nj O G-9.*gh3t'upw: D$(e$flajBnG hk l~gPU m S3 fUSKHD-oJyC "`+[N8!}">c4ppdxm~GcCYmSa6{oC CoyxdfN ,nzfb KV?,/%ch@H%AAVB$m0k#xex]pV@jd~X:i0' `&Wk}}1Gi>|u9/Gd9V'eq :92oGAEm~6X>+@ud8#?-L=L#~lpxn%A2 &,r:?;:,r:wE A 2=!nl{\T@YYRDqs9{*E/$j7Ex:2$u6o_AA=?4 yVUCZ_d}z t%ciBCj /w:t-Sn1I(26>E]YJ_D%AL{au \D:LG8N ~c `=7\IOi('(!?BA^|E^UkLp%NY 7WT(u P /wk:D_n#>rREF[mW_lM?Y$grbZN+>[aic" :^{bIשCDNqIPd ]T54`}u-pucudO{z Kx$QJlB1^@gr17oc`MfX2yF Js7u8K{5dgx!47{]bI_G>m5>nEtIwVu+>v@QC!uUK WI\)4L,J]_\CGdk|d:QU 6AyjLs$?y5jY;GG,S9qCyz=ldF%F[y,=x  Hd~h|]u`:feB[S2"%hC?%QKs52}g=>wku!%tKPxoBnfD_uTtzBvIwYRdyP  zp)|^s&yXS,r7:B I`,_d)E|P'~_3u[9*[FSP]INSTALL.;1+,'./F 4[- 0123KPWO56\QCl7 -mQ҃89GFHJpoFSP.SAV' [FSP]INSTALL.;1EXE;1;5OBJ;2[ wait on additional messages. After 2 minutes pass with no messages, fspd will exit and return control to inted. Sample setup for inetd operation: In /etc/services file: fsp 21/udp fspd In /etc/inetd.conf file: fsp dgram udp wait ftp /usr/etc/fspd in.fspd In this sample, the same port number for ftp is used for the fsp socket. There will not be a conflict because ftp uses stream protocol, and fsp uses UDP protocol. The fspd program in this example is ran under user 'ftp'. Many other options controlling the behavior of fspd can be set in the fspd.conf file. Please read the comments in the example.conf file for details. FSPD provides directory security through a series of . files created in the directories serviced by fspd. These files are invisible to the clients, and can (mostly) be changed via the fprocmd client utility (or by the server administrator manually). The only file that can not be changed in this manner is the ownership of a directory. The files and their meanings are: .OWN.XXXXXXXX specifies that the machine whose IP number is encoded as XXXXXXXX owns the directory. The owner of a directory automatically has all other rights to a directory and is the only one that can change the other protections. It is created when a directory is initially created in the archive via fmkdir. .FSP_OK_DEL Grants any client the permission \)FSP.SAV' [FSP]INSTALL.;1EXE;1;5OBJ;2[0 to delete any file from the current directory. .FSP_OK_ADD Grants any client the permission to add new files to the current directory. .FSP_OK_MKDIR Grants any client the permission to create new sub- directories under the current directory owned by the client creating the directory. .FSP_PRIVATE If this file exists, only the owner of the directory is allowed to read the contents of the files in the directory. Subdirectories of this directory will inherit the privacy protection. Clients do not get to read the directory information directly. Instead, fspd maintains a directory listing for each directory in a cache file. If the directory is writable by fspd, or if a writable file in it is prepared beforehand, fspd will store the directory information in .FSP_CONTENT file in that directory. Otherwise, it will store the information in a pair of files (with hashed names) in a special directory specified in the fspd.conf file. The latter allows read-only directories to be exported. When a client requests information for a directory, the cache file is created if it doesn't exist, and it is rebuilt if it is out of date. The information is accessed by having the client read the directory listing file. Care is taken so that the client will not get corrupted entries when the directory is changed while the listing is being read. Files being uploaded are first written to a tempor"FSP.SAV' [FSP]INSTALL.;1EXE;1_ORIG;1[ary file in the work directory: .TXXXXXXXXYYYY where XXXXXXXX is the inet number of the client, and YYYY is the port number of the client program. When upload is compelete, the file is moved into the intended location. Sending it an 'alarm' signal will cause fspd to dump its current client database into the file .HTAB_DUMP in the work directory. This can be useful for debugging and for catching rogue clients. *[FSP]MACHINES.;1+,)./F 4F- 0123KPWO56SCl7TvQ҃89GFHJThis is a list of machines and architectures under which this code has been successfully compiled. If you get it to compile on an architecture/compiler combination other than is listed here, PLEASE send me a) the type of machine, the OS, and the compiler used, as well as what changes (if any) you needed to make to get a clean compile. My email address is jtraub@cs.cmu.edu Machine Type OS Type Compiler (version) --------------------------------------------------------------- Decstation 5000/200 Mach 2.6 j6FSP.SAV) [FSP]MACHINES.;1XE;1_ORIG;1F%; GCC (2.3.2) Decstation 5000/200 Ultrix 4.2a GCC (2.3.2) and cc Decstation 5000/133 Ultrix 4.2a GCC (2.3.2) Dec VAX 3100 VMS V5.5-2 VAX/C (3.2) Dec VAX 4200 VMS V5.5-2 VAX/C (3.2) Dec VAX 9000/210 Ultrix 4.2a GCC (2.3.2) and cc Sun Sparc IPC (sun 4) SunOS 4.1.1 GCC (2.3.3) Sun Sparc IPC (sun 4) SunOS 4.1.3 GCC (2.3.3) Sun SparcStation II SunOS 4.1.3 GCC (2.3.3) and sun's cc Sun SparcStation II SunOS 4.1.1 GCC (2.2.2) Sun SparcStation 10 SunOS 4.1.3 GCC (2.3.3) and sun's cc IBM 386 Mach 3.0 GCC (1.36 and 2.3.2) IBM 386 Linux 0.99.9 GCC (????) IBM RS/6000 AIX GCC (2.3.3) IBM PS2/1 ?????? GCC (2.3.1) Sequent Symmetry 2000 Dynix/ptx 1.4 ptx/C Sequent Symmetry 2000 Dynix/ptx 2.0 ansi ptx/C HP 9000/715 HPUX 9.01 cc HP 9000/700 HPUX A.08.07 gcc (2.3.3) SGI Indigo Irix 4.0.5F cc SGI Indigo R4K Irix 4.0.5F cc (Ansi C, 3.10) Data General AViiON DG/UX 5.4.2 GCC (2.2.2) Macintosh IIfx A/UX 3.0 GCC (2.2.1) -- Manual tweaking Sun SparcStation LX SunOS 5.1 (sysV) GCC (2.3.3) *[FSP]MAKEFILE.;1+,*./F 4Cb- 0123KPWO56<{SCl7|Q҃89GFHJGj?FSP.SAV* [FSP]MAKEFILE.;1XE;1.;1Call: @echo You should really read the INSTALL file before running make. @echo Please do so now. *[FSP]MAKEFILE.DIST;1+,+./F 4Cb- 0123KPWO56%TCl7`Q҃89GFHJall: @echo You should really read the INSTALL file before running make. @echo Please do so now. *[FSP]MAKEFILE.IN;1+,,. /F 4M - 0123KPWO56EVCl7 ̑Q҃89GFHJHFSP.SAV, [FSP]MAKEFILE.IN;1;1;2J;2M ############################################################################# # Make file for the FSP suite of programs. ############################################################################# # Use "make install" to install binaries. # Use "make de-install" to remove installed binaries and man pages. # Use "make install-merge" to install the client merge and symbolic links. # Use "make install-man" to install the man pages. # ############################################################################# # The following variable defines the compiler to use in your compilation. # CC = @CC@ ############################################################################# # Set up your compiler flags here. If you want optimized code, leave it # the way it is now. # OPTIM = -O ############################################################################# # If you need to link in any additional libraries, do it here. # AT&T 3B2/600G + AT&T Unix Sys V R 3.2.3 + WIN/TCP R 3.2 use -lnet -lnsl_s # Sequent Dynix/ptx, use -lsocket -linet -lnsl -lseq # EX_LIBS = @EX_LIBS@ ############################################################################# # define this to '&' if you plan to use parallel make. You need # the enhanced GNU make or Sequent's make for that # PARALLEL_MAKE = @PARALLEL_MAKE@ ############################################################################# # NOTE: YOU SHOULD NOT HAVE TO CHANGE ANYTHING BELOW THIS LINE ############################################################################# botBFSP.SAV, [FSP]MAKEFILE.IN;1;1;2J;2M 5 prefix = /usr/local BIN = ${prefix}/bin MAN = ${prefix}/man INCLUDE = -I../include DEFS = @DEFS@ CFLAGS = ${OPTIM} ${INCLUDE} ${DEFS} SHELL = /bin/sh AR = ar ARFLAGS = cru RM = rm INSTALL = @INSTALL@ DINSTAL = @INSTALL_DATA@ LN = @LN_S@ RANLIB = @RANLIB@ PROG_FL = AR="${AR}" CC="${CC}" CFLAGS="${CFLAGS}" SHELL="${SHELL}" \ INSTALL="${INSTALL}" DINSTAL="${DINSTAL}" LN="${LN}" \ RANLIB="${RANLIB}" BIN="${BIN}" MAN="${MAN}" EX_LIBS="${EX_LIBS}" \ RM="${RM}" PARALLEL_MAKE="${PARALLEL_MAKE}" ARFLAGS="${ARFLAGS}" all: fspserver fspclients bsd_dir: @(cd bsd_src; make all ${PROG_FL}) common_dir: @(cd common; make all ${PROG_FL}) client_dir: @(cd client; make all ${PROG_FL}) fspserver: bsd_dir common_dir @(cd server; make all ${PROG_FL}) fspclients: bsd_dir common_dir client_dir @(cd clients; make all ${PROG_FL}) merge: bsd_dir common_dir client_dir @(cd clients; make fspmerge ${PROG_FL}) install: fspserver fspclients @(cd server; make install ${PROG_FL}) @(cd clients; make install ${PROG_FL}) install-merge: fspserver merge @(cd server; make install ${PROG_FL}) @(cd clients; make install_merge ${PROG_FL}) install-man: @(cd man; make install ${PROG_FL}) clean: @(cd server; make clean ${PROG_FL}) @(cd clients; make clean ${PROG_FL}) @(cd bsd_src; make clean ${PROG_FL}) @(cd common; make clean ${PROG_FL}) @(cd client; make clean ${PROG_FL}) de-install: @(cd server; make de-install ${PROG_FL}) @(cd clients; make de-install ${PROG_FL}) @(cd man; make de-install ${PROG_FL})KFSP.SAV, [FSP]MAKEFILE.IN;1;1;1M  *[FSP]MAN.DIR;1+,-./F 4- 0123 KPWO56@7r89GFHJI MAKEFILE.=MAN1.DIRKMAN5.DIR}*[FSP.MAN]MAKEFILE.;1+,=./F 4G--0123KPWO56 UCl7 VV҃89GFHJQFSP.SAV=-[FSP.MAN]MAKEFILE.;1BJ;1GMANS = man1/fcat.1 man1/fcatcmd.1 man1/fcd.1 man1/fcdcmd.1 man1/fdu.1 \ man1/fducmd.1 man1/ffind.1 man1/ffindcmd.1 man1/fget.1 \ man1/fgetcmd.1 man1/fgrab.1 man1/fgrabcmd.1 man1/fhost.1 \ man1/fhostcmd.1 man1/fls.1 man1/flscmd.1 man1/fmkdir.1 \ man1/fpro.1 man1/fprocmd.1 man1/fput.1 man1/frm.1 man1/frmcmd.1 \ man1/frmdir.1 man1/frmdircmd.1 man1/fspd.1 man1/fver.1 \ man5/fsp_prof.5 install: for A in ${MANS}; do ${DINSTAL} $$A ${MAN}/$$A; done de-install: for A in ${MANS}; do ${RM} -f ${MAN}/$$A; done *[FSP.MAN]MAN1.DIR;1+,K./F 4--0123 KPWO56`7}89GFHJI^6SFSP.SAVK-[FSP.MAN]MAN1.DIR;1E.C;1FCAT.1L FCATCMD.1MFCD.1]FCDCMD.1^FDU.1_FDUCMD.1`FFIND.1a FFINDCMD.1bFGET.1c FGETCMD.1lDFGRAB.1mD FGRABCMD.1nDFHOST.1oD FHOSTCMD.1pDFLS.1qDFLSCMD.1rDFMKDIR.1sDFPRO.1tD FPROCMD.1uDFPUT.1vDFRM.1wDFRMCMD.1xDFRMDIR.1yD FRMDIRCMD.1zDFSPD.1{DFVER.1|*[FSP.MAN.MAN1]FCAT.1;1+,L./F 4-K0123KPWO56l[Cl7FV҃89GFHJ5oD~ }uta ty1 Tp!Y>u)0 W%k%[{DI*{I0rPH\_V (UES.}u=BP6 @}6D1ur%ixxlmlz.]yvG/KB$Cw vR9` rI&0o*9]7)=JKX!A<% )MECn6J K 'Vp&3Kz::Di8GER7*B[Fn.Zta9X'Jn{\FW(; A&U/w(~a8#s)+Pi[! [=[ [x+Je< r0]&C!Oy:O1UyNu ds~mm3]vGLod0lp\\s| Y{U!xyO#K0 >6rWdjm]J=8Co/u;iwO \dJmd"/4=fc~`oQ)cb%TttJf?7dMK&_rQk,-8jU>0?oYVi3 Q ! i#vSb0t+Px'NTC$Y3_f_ %`{4=&UBNQO?49l N(Ru1yqNP .}X<NFN'!beuZHKk6 VMJ\zXZ.y^|*8$jM0'!9KNQ7 p!5CNv.M}/M  V7v,B[}9HE UEa.z(9 4Hzic+,4)9DosEi]9T~^Ufb(m-}f>&HUTNFSP.SAV^K[FSP.MAN.MAN1]FCDCMD.1;1OKdefine this variable is to ensure mutual exclusion of client commands when none of the udp packet multiplexing mechanisms are enabled during compile time. You may pick any number not currently used for other purposes. .TP .B FSP_DIR The current working directory of the client in the FSP database. The root of the database is /. .TP .B FSP_TIMEOUT If this variable is set, it contains the timeout value. The default value is 4. No function if program was compiled without timeout code. .SH "SEE ALSO" .PD fcatcmd(1), fcdcmd(1), fgetcmd(1), fgrabcmd(1), flscmd(1), fmkdir(1), fprocmd(1), fput(1), frmcmd(1), frmdircmd(1), fver(1), fducmd(1), fhostcmd(1), fspd(1), fsp_prof(5), ffindcmd(1) .br .ne 5 .SH BUGS .LP If more than one .B path is given, only the first one will be used. The rest will be silently ignored. *[FSP.MAN.MAN1]FDU.1;1+,_./F 4-K0123KPWO56Cl7V҃89GFHJ{ _FSP.SAV_K[FSP.MAN.MAN1]FDU.1;12y.so man1/fducmd.1 .SP .I0 *[FSP.MAN.MAN1]FDUCMD.1;1+,`./F 4O]-K0123KPWO56l*%Cl7V҃89GFHJ.TH FDU 1 "7 April 1993" .SH NAME fducmd, fdu \- display the number of disk blocks used per directory or file .SH SYNOPSIS .B fducmd [ .B \-s ] [ .B \-a ] [ .B \-r ] [ .I filename .B .\|.\|. ] .LP .B fdu [ .B \-s ] [ .B \-a ] [ .B \-r ] [ .I filename .B .\|.\|. ] .SH DESCRIPTION .B fdu gives the number of kilobytes contained in all files and, recursively, directories within each specified directory or file .IR filename . If .I filename is missing, .RB ` . ' (the current directory) is used. .LP .SH OPTIONS#bFSP.SAV`K[FSP.MAN.MAN1]FDUCMD.1;1Oz .TP .B \-s Only display the grand total for each of the specified .IR filename s. .TP .B \-a Generate an entry for each file. Entries are generated only for each directory in the absence of this option. .TP .B \-r Recursively go down in the directory tree and show deeper entries, too. In absence of this option the deeper directory tree branches are only counted belonging to their parent in the top level directory. .LP .B fducmd will perform .B csh file name globbing based on file and directory information obtained from the FSP database. .LP Since user's command shells generally cannot do the proper globbing for this program, it is recommended that user defines a shell alias or function to turn off command shell globbing before running this program. .B csh example: .LP .nf alias fdu \e(set noglob\e; exec fducmd \e!\e*\e) .fi .SH ENVIRONMENT .LP The following variables associate this program with a FSP database: .TP .B FSP_HOST The name or internet number of the machine with the FSP server. .TP .B FSP_PORT The port number of the UDP socket used by the FSP server. .TP .B FSP_LOCALPORT The port number of the UDP socket used by FSP client utilities. The only reason to define this variable is to ensure mutual exclusion of client commands when none of the udp packet multiplexing mechanisms are enabled during compile time. You may pick any number not currently used for other purposes. .TP .B FSP_DIR The current working directory of the client in the FSP database. The root of the database is /. .TP .B FSP_TRACE If thisIFSP.SAV`K[FSP.MAN.MAN1]FDUCMD.1;1OF variable is set, some commands will display the number of kilo-byte blocks transferred as transfer progresses. Also shown will be an indication of the network speed in the form of characters per second and the retries on not answered commands. .TP .B FSP_TIMEOUT If this variable is set, it contains the timeout value. The default value is 4. No function if program was compiled without timeout code. .SH "SEE ALSO" .PD fcatcmd(1), fcdcmd(1), fgetcmd(1), fgrabcmd(1), flscmd(1), fmkdir(1), fprocmd(1), fput(1), frmcmd(1), frmdircmd(1), fver(1), fducmd(1), fhostcmd(1), fspd(1), fsp_prof(5), ffindcmd(1) *[FSP.MAN.MAN1]FFIND.1;1+,a./F 4-K0123KPWO56+Cl7V҃89GFHJ~FSP.SAVaK[FSP.MAN.MAN1]FFIND.1;1.so man1/ffindcmd.1 .SP .I0 *[FSP.MAN.MAN1]FFINDCMD.1;1+,b. /F 4R -K0123KPWO 56gCl7V҃89GFHJ.TH FFIND 1 "14 April 1993" .SH NAME ffindcmd, ffind \- find files by name or by other characteristics in FSP database .SH SYNOPSIS .B ffindcmd .I pathname-list expression .br .B ffind .I pathname-list expression .LP .SH DESCRIPTION .B ffindcmd recursively descends the directory hierarchy for each pathname in the .IR pathname-list , seeking files that match a logical .I expression written using the operators listed below. .SH USAGE .SS Operators In the descriptions, the argument .I n is used as a decbFSP.SAVbK[FSP.MAN.MAN1]FFINDCMD.1;1R Kimal integer where .BI + n means more than .IR n , .BI \- n means less than .IR n , and .I n means exactly .IR n . All three maybe used if an integer argument is needed. .I .TP 15 .BI \-name " filename" True if the .I filename argument matches the current file name. Shell argument syntax can be used if escaped (watch out for .BR [ ", " .BR ? " and " .BR * ")." .TP .B \-prune Always yields true. Has the side effect of pruning the search tree at the file. That is, if the current path name is a directory, .B ffindcmd will not descend into that directory. .TP .BI \-type " c" True if the type of the file is .IR c , where .I c is one of: .RS .RS .TP .PD 0 .B d for directory .TP .B f for plain file .RE .RE .PD .TP .BI \-size " n" True if the file is .I n blocks long (512 bytes per block). If .I n is followed by a .BR c , the size is in characters. .TP .BI \-time " n" True if the file has been accessed/modified/changed in .I n days. .TP .BI \-exec " command" True if the executed .I command returns a zero value as exit status. The end of .I command must be punctuated by an escaped semicolon. A command argument .B {\|} is replaced by the current pathname. .TP .BI \-ok " command" Like .B \-exec except that the generated command is written on the standard output, then the standard input is read and the command executed only upon response .BR y . .TP .B \-print Always true; the current pathname is printed. .TP .B \-ls Always true; prints current pathname together with its associated statistics. These includ,@zgv|]{B@4/P$.AJm)1["cCnOY!_| ;'F]rER=c X||bE, .JoK:KvX~9+6Ih>/[x!Ru,9kpmuz? W!( B$[xEZ<4j!|)y@HQy~4G'DM <: ZE QG-' *m--usik;=8XX4gYjQ! [D TBKQ5FJ!> N]fP*\w*>2-NEOR`tJfkZ92{@w}IrsLJ W|J=|s?6 vxOq)s3]Il_jgo(Z|hZ+6l5:sQ%o36|sRQ=@vO$I}ng|'hA~b A$8R**?>8 xcztY!W 0#mh0_vmy?zb|Ub aI+ y P' v"Z6J RfU!4M*.t YC#nCqqN ^YS!Lo| t6)u.R3|b-WZAprU9FT@'YB.TC'F[Lj< > D<azo~}X,!n!>w_ /HT+}6&b0Acb\-O.(q;mMcd4P8|v}%G\4 Tot[BV$i$FA~%GEh:nDL#L#`v+Ubp%Fɜ~;$B/mdi7MoMn2$6%'6 dx, 'sqg;5c*992R%`w4]56`wUHq[U$xx&}`q}Ic_ DNDWL0^=+,^l K?}j6*mt7aJz_KZ=&$& sI+v*W+][KmU5-[;~</v ',l 3E4ZNn'7[pYL^W$>0o :%amx*})5b%"M+`[QDM,r C uH ;|yr2ehHc~zNP2 LD_X+IoL$zTj :st}LItYCVN?FOJYF[AF"W&x|Ljv+mW-9"&mI^LJ9FSP.SAVbK[FSP.MAN.MAN1]FFINDCMD.1;1R e size in blocks (512 bytes), protection mode, number of hard links, user, group, size in bytes, and modification time. .br Note: formatting is done internally, without executing the .B fls program. .TP .BI \-newer " file" True if the current file has been modified more recently than the argument .IR filename . .TP .BI ( expression ) True if the parenthesized .I expression is true. .br Note: Parentheses are special to the shell and must be escaped. .TP .BI ! primary True if the .I primary is false .RB ( ! is the unary .I not operator). .HP .I primary1 [ .B \-a ] .I primary2 .br True if both .I primary1 and .I primary2 are true. The .B \-a is not required. It is implied by the juxtaposition of two primaries. .HP .IB primary1 " \-o " primary2 .br True if either .I primary1 or .I primary2 is true .RB "(" \-o " is the" .I or operator). .LP .B ffindcmd will perform .B csh file name globbing based on file and directory information obtained from the FSP database. .LP Since user's command shells generally cannot do the proper globbing for this program, it is recommended that user defines a shell alias or function to turn off command shell globbing before running this program. .B csh example: .LP .nf alias ffind \e(set noglob\e; exec ffindcmd \e!\e*\e) .fi .SH EXAMPLE To find all the files called .B intro.ms starting from the current directory: .LP .nf example% ffind . \-name intro.ms \-print \&.\|/manuals/assembler/intro.ms \&.\|/manuals/sun.core/intro.ms \&.\|/manuals/driver.tut/intro.ms \&.\|/manuals/sys2FSP.SAVbK[FSP.MAN.MAN1]FFINDCMD.1;1R n.manager/uucp.impl/intro.ms \&.\|/supplements/general.works/unix.introduction/intro.ms \&.\|/supplements/programming.tools/sccs/intro.ms example% .fi .LP To recursively print all files names in the current directory and below, but skipping .SM SCCS directories: .LP .nf example% ffind . \-name \s-1SCCS\s0 \-prune \-o \-print example% .fi .LP To recursively print all files names in the current directory and below, skipping the contents of .SM SCCS directories, but printing out the .SM SCCS directory name: .nf example% ffind . \-print \-name \s-1SCCS\s0 \-prune example% .fi .LP To remove files named .B a.out or .B *.o that have not been accessed for a week or more .nf example% ffind . \e( \-name a.out \-o \-name *.o \e) \-time +7 \-exec frm {\|} \e; .fi .SH ENVIRONMENT .LP The following variables associate this program with a FSP database: .TP .B FSP_HOST The name or internet number of the machine with the FSP server. .TP .B FSP_PORT The port number of the UDP socket used by the FSP server. .TP .B FSP_LOCALPORT The port number of the UDP socket used by FSP client utilities. The only reason to define this variable is to ensure mutual exclusion of client commands when none of the udp packet multiplexing mechanisms are enabled during compile time. You may pick any number not currently used for other purposes. .TP .B FSP_DIR The current working directory of the client in the FSP database. The root of the database is /. .TP .B FSP_TRACE If this variable is set, some commands will display the number of kilo-byte block+i~FSP.SAVbK[FSP.MAN.MAN1]FFINDCMD.1;1R 9 s transferred as transfer progresses. Also shown will be an indication of the network speed in the form of characters per second and the retries on not answered commands. .TP .B FSP_TIMEOUT If this variable is set, it contains the timeout value. The default value is 4. No function if program was compiled without timeout code. .SH "SEE ALSO" .PD fcatcmd(1), fcdcmd(1), fgetcmd(1), fgrabcmd(1), flscmd(1), fmkdir(1), fprocmd(1), fput(1), frmcmd(1), frmdircmd(1), fver(1), fducmd(1), fhostcmd(1), ffindcmd(1), fspd(1), fsp_prof(5) .LP .SH "BUGS" There seems to be a problem using an alias as command to execute. But since there is no globbing performed on the pathname the original FSP commands may be used instead. *[FSP.MAN.MAN1]FGET.1;1+,c./F 4-K0123KPWO56\͘Cl7@V҃89GFHJ0FSP.SAVcK[FSP.MAN.MAN1]FGET.1;1J;11.so man1/fgetcmd.1 .SP .I0 *[FSP.MAN.MAN1]FGETCMD.1;1+,lD./F 4M-K0123KPWO56"ӾCl7`V҃89GFHJ.TH FGET 1 "27 January 1993" .SH NAME fgetcmd, fget \- download files from the FSP database .SH SYNOPSIS .B fgetcmd [-f|u|t|n|a|r] .br .B fgetcmd [-f|u|t|n|a|r] .I filename \&.\|.\|. .LP .B fget [-f|u|t|n|a|r] .br .B fget [-f|u|t|n|a|r] .I filename \&.\|.\|. .SH DESCRIPTION .LP When used without arguments, a list of file names is read from the standard input. When arguments are given, the arguments are taken to be the list of file names. For each file named in the list, .B fgetcmd copies the file to the cڕFSP.SAVlDK[FSP.MAN.MAN1]FGETCMD.1;11Mlient's current working directory in the client machine. .B fgetcmd will perform .B csh file name globbing based on file and directory information obtained from the FSP database. .LP Since user's command shells generally cannot do the proper globbing for this program, it is recommended that user defines a shell alias or function to turn off command shell globbing before running this program. .B csh example: .LP .nf alias fget \e(set noglob\e; exec fgetcmd \e!\e*\e) .fi .SH ARGUMENTS .LP .B -f -- forces overwriting of files during an fget. .LP .B -u -- forces unique filenames (appends a unique integer to each copy) .LP .B -t -- forces overwrite of local file if download is successful. .LP .B -n -- forces .B fgetcmd to refuse to overwrite files with identical names. .LP .B -a -- forces .B fgetcmd to try and append data to a partial file. .LP .B -r -- forces .B fgetcmd to recursively get all files in given directories. .LP The default mode is for .B fgetcmd to overwrite files after a successful download. This has the drawback of possibly leaving behind temporary files with names like .I .fsp.#### .SH ENVIRONMENT .LP The following variables associate this program with a FSP database: .TP .B FSP_HOST The name or internet number of the machine with the FSP server. .TP .B FSP_PORT The port number of the UDP socket used by the FSP server. .TP .B FSP_LOCALPORT The port number of the UDP socket used by FSP client utilities. The only reason to define this variable is to ensure mutual exclusion of client commands when nonqFSP.SAVlDK[FSP.MAN.MAN1]FGETCMD.1;1Me of the udp packet multiplexing mechanisms are enabled during compile time. You may pick any number not currently used for other purposes. .TP .B FSP_DIR The current working directory of the client in the FSP database. The root of the database is /. .TP .B FSP_TRACE If this variable is set, .B fgetcmd will display the number of kilo-byte blocks transferred as transfer progresses. Also shown will be an indication of the network speed in the form of characters per second. .TP .B FSP_LOCAL_DIR If this variable is set, it contains the local working directory where all incoming files will be placed. .TP .B FSP_TIMEOUT If this variable is set, it contains the timeout value. The default value is 4. No function if program was compiled without the client timeout code. .SH "SEE ALSO" .PD fcatcmd(1), fcdcmd(1), fgetcmd(1), fgrabcmd(1), flscmd(1), fmkdir(1), fprocmd(1), fput(1), frmcmd(1), frmdircmd(1), fver(1), fducmd(1), fhostcmd(1), fspd(1), fsp_prof(5), ffindcmd(1) *[FSP.MAN.MAN1]FGRAB.1;1+,mD./F 4-K0123KPWO56FǿCl7 V҃89GFHJɺ.FSP.SAVmDK[FSP.MAN.MAN1]FGRAB.1;1.so man1/fgrabcmd.1 .SP .I0 *[FSP.MAN.MAN1]FGRABCMD.1;1+,nD. /F 4M S-K0123KPWO56|Cl7@hV҃89GFHJ.TH FGET 1 "27 January 1993" .SH NAME fgrabcmd, fgrab \- download files from the FSP database .SH SYNOPSIS .B fgrabcmd [-f|u|t|n|a] .br .B fgrabcmd [-f|u|t|n|a] .I filename \&.\|.\|. .LP .B fgrab [-f|u|t|n|a] .br .B fgrab [-f|u|t|n|a] .I filename \&.\|.\|. .SH DESCRIPTION .LP When used without arguments, a list of file names is read from the standard input. When arguments are given, the arguments are taken to be the list of file names. For each file named in the list, .B fgrabcmd copies the file to the clLQ"FSP.SAVnDK[FSP.MAN.MAN1]FGRABCMD.1;1M ient's current working directory in the client machine, and deletes it from the FSP database. It is guaranteed that multiple concurrent grab actions appear to be mutually exclusive. .B fgrabcmd will perform .B csh file name globbing based on file and directory information obtained from the FSP database. .LP Since user's command shells generally cannot do the proper globbing for this program, it is recommended that user defines a shell alias or function to turn off command shell globbing before running this program. .B csh example: .LP .nf alias fgrab \e(set noglob\e; exec fgrabcmd \e!\e*\e) .fi .SH ARGUMENTS .LP .B -f -- forces overwriting of files during an fget. .LP .B -u -- forces unique filenames (appends a unique integer to each copy) .LP .B -t -- forces overwrite of local file if download is successful. .LP .B -n -- forces .B fgetcmd to refuse to overwrite files with identical names. .LP .B -a -- forces .B fgetcmd to try and append data to a partial file. .LP The default mode is for .B fgetcmd to overwrite files after a successful download. This has the drawback of possibly leaving behind temporary files with names like .I .fsp.temp.#### .SH ENVIRONMENT .LP The following variables associate this program with a FSP database: .TP .B FSP_HOST The name or internet number of the machine with the FSP server. .TP .B FSP_PORT The port number of the UDP socket used by the FSP server. .TP .B FSP_LOCALPORT The port number of the UDP socket used by FSP client utilities. The only reason to define this variable is to  FSP.SAVnDK[FSP.MAN.MAN1]FGRABCMD.1;12M ensure mutual exclusion of client commands when none of the udp packet multiplexing mechanisms are enabled during compile time. You may pick any number not currently used for other purposes. .TP .B FSP_DIR The current working directory of the client in the FSP database. The root of the database is /. .TP .B FSP_TRACE If this variable is set, .B fgrabcmd will display the number of kilo-byte blocks transferred as transfer progresses. Also shown is an indicator of network speed in the form of characters per second. .SH "BUGS" If .B fgrab is interrupted, the file being copied is deleted nonetheless. .TP .B FSP_LOCAL_DIR If this variable is set, it contains the local working directory where all incoming files will be placed. .TP .B FSP_TIMEOUT If this variable is set, it contains the timeout value. The default value is 4. No function if program was compiled without the client timeout code. .SH "SEE ALSO" .PD fcatcmd(1), fcdcmd(1), fgetcmd(1), fgrabcmd(1), flscmd(1), fmkdir(1), fprocmd(1), fput(1), frmcmd(1), frmdircmd(1), fver(1), fducmd(1), fhostcmd(1), fspd(1), fsp_prof(5), ffindcmd(1) ,uFSP.SAVoDK[FSP.MAN.MAN1]FHOST.1;1IG;2*[FSP.MAN.MAN1]FHOST.1;1+,oD./F 4-K0123KPWO56<Cl7V҃89GFHJ.so man1/fhostcmd.1 .SP .I0 *[FSP.MAN.MAN1]FHOSTCMD.1;1+,pD. /F 4R -K0123KPWO 56|r(Cl7 1V҃89GFHJ.TH FSETHOST 1 "7 April 1993" .SH NAME fhostcmd, fhost \- set environment variables .SH SYNOPSIS .B fhostcmd [-d delay] [-p local port] [-l local directory] [-o timeout] [-t trace] [-w password] [-f filename] [-h number | name] [host port [directory] | abbreviation] .LP .B fhost [-d delay] [-p local port] [-l local directory] [-o timeout] [-t trace] [-w password] [-f filename] [-h number | name] [host port [directory] | abbreviation] .SH DESCRIPTION .LP .B Fhost uses a resources file to set all environmant A` |rvudCM @?<f|Q)vp4qZ6hBekuz; &r `-R:bm-p!{@`O39|eE<}n9+1M *Mra8+bo x{o9ftNo;)qgl61O%#-M8(O@%H zl"w7c~:|mW8ih&W%8<\z]*THu]^v171mx1,ESYCpP,Gez/! 2aQ5 ~i ,RIPE[+|v:EʍQ<"f{" bXy<W(ufik49|hud1,0PM(&MFnE~*k, ;h\}SW .956{:Z].H*b$U&k&!gn#++hlg&./+4c:szSj jgx:j/ utO;G>9*).`tH$ M5` sQ{96Pf0lpt*#pD# (knx926=;~waa{v9 5q:+=>`DeJs ``%:BQp#}Wq/N1jE3 Y5;J]}YIx^VpJ7WWWiEM^L5V Q8oe?Nb=u2:,d'~>wE2CpctFi%F9izxK||G K*?E;_W!HeiW~^]'X:0TK]-*GqZOS=Mno} dgbN~&xP#Sev\0E!O e2D4sa }[GK<''l`7MX4yDOs@,87Mcay$6g+7'V7d A+]e!sSeZ%)=\9oCu{U?LDrID}M6SQr'uni8NmY3:W8EWi^o@7:ALN!rjY RR{B >WU#-{.cj:@ 7S3"` T`a8^rd'N < zr80%U({uC {K;Eahd :>iF )X(%G\Rjt9 ![6N:* hE,=r mScv>r[pV]ZU]^T- aUm!~u./nM%4 22^s}8q[WS_{'a"ɋqPG\ wT+t@mD)=%'CdR  Y4*:D LVJ(pC>km3jQZ@$k#FYEdK%G0+2C*|0V\P @|]IW(yENXEW1V?u_2m'<;/{P^%C>CZwnRt%!<+ (ER$\R__CsRl"@_x1&C_a9X5=:-MIF8xr?utS Rv@@LV gm:DN(;VPH8s5qp  c4_4]u[Lzv MW9yE6c=7xS&yo'h;5t2/__2IG|P;zNF aZVӷm^F;4T` }W'1<_gM-awx0L-wmlwo) 76#\Zj i %U+>bx_QT"/2d14`q!Y--hI{LP]-2???2 s~}TXdO]E#BJA)z =3!2i:>q!\NE`'@YjAuovJv99F'"6lu5)Gccm"5SvS(\U-p :19T7_] U&^q|}jEuo$9fj=skv YX*;J#!,~>38,0cnvll environmant 2FSP.SAVpDK[FSP.MAN.MAN1]FHOSTCMD.1;12R avariables needed to connect to a given host via FSP. If a -f option is given, the given filename is used as resources file, if not a file .I .fsprc is searched in the current working directory and in the user's home directory. If none is found a system wide default file is used. If .B fhost is invoked with an abbreviation given, the resource file is searched for the first host to match this abbreviation. The values given for this host will be set. .LP If .B fhost is invoked with a given host and port number, this host will be used and no searching in the resource file will be done. .LP Setting up the host the user can change between using the host name or the internet address. In case only one is given and the other should be used .B fhost tries to find it using a built in mini-nslookup facility. The default is to use what is given and to use the number if both are given. .LP Since programs cannot change environment variables of their parent shell in a simple way, it is recommended that the user defines a shell alias or function to make it possible. .B csh example: .LP .nf alias fhost 'eval `fhostcmd \!*`' .fi .SH FSPRC For more information about the resource file confer .I fsprc(5). Here's just a short example of how it works. If your resource file contains the following .nf host seismo.soar.cs.cmu.edu fsp port 30 local directory ~/sources/fsp-266.1 trace off .fi a call of .B fhost seismo in .B csh will produce the following output to be evaluated .nf unsetenv FSP_TRACE; setenv FSP_PORT 30; setenv FSP_LOCALs[nFSP.SAVpDK[FSP.MAN.MAN1]FHOSTCMD.1;12R &_DIR ~/sources/fsp-266.1; setenv FSP_HOST seismo.soar.cs.cmu.edu; setenv FSP_DIR /; .fi .SH ARGUMENTS .LP .B -d -- set FSP_DELAY to .I delay .LP .B -p -- set FSP_LOCALPORT to .I local port .LP .B -l -- set FSP_LOCAL_DIR to .I local directory .LP .B -o -- set FSP_TIMEOUT to .I timeout .LP .B -t -- set FSP_TRACE if .I trace = .I on, unset it if .I trace = .I off .LP .B -p -- set FSP_PASSWORD to .I password .LP .B -f -- use .I filename as resource file .SH ENVIRONMENT .LP The following variables associate this program with a FSP database and are set (resp. unset) if needed: .TP .B FSP_HOST The name or internet number of the machine with the FSP server. .TP .B FSP_PORT The port number of the UDP socket used by the FSP server. .TP .B FSP_LOCALPORT The port number of the UDP socket used by FSP client utilities. The only reason to define this variable is to ensure mutual exclusion of client commands when none of the udp packet multiplexing mechanisms are enabled during compile time. You may pick any number not currently used for other purposes. .TP .B FSP_DIR The current working directory of the client in the FSP database. The root of the database is /. .TP .B FSP_TRACE If this variable is set, some commands will display the number of kilo-byte blocks transferred as transfer progresses. Also shown will be an indication of the network speed in the form of characters per second and the retries on not answered commands. .TP .B FSP_LOCAL_DIR If this variable is set, it contains the local working directory. .TP .B FSP_TIMELKFSP.SAVpDK[FSP.MAN.MAN1]FHOSTCMD.1;1R .OUT If this variable is set, it contains the timeout value. The default value is 4. No function if program was compiled without timeout code. .TP .B FSP_PASSWORD If this variable is set, it contains a password. .SH "SEE ALSO" .PD fcatcmd(1), fcdcmd(1), fgetcmd(1), fgrabcmd(1), flscmd(1), fmkdir(1), fprocmd(1), fput(1), frmcmd(1), frmdircmd(1), fver(1), fducmd(1), fhostcmd(1), fspd(1), fsp_prof(5), ffindcmd(1) *[FSP.MAN.MAN1]FLS.1;1+,qD./F 4-K0123KPWO56|Cl7VW҃89GFHJ.so man1/flscmd.1 .SP .I0 *[FSP.MAN.MAN1]FLSCMD.1;1+,rD./F 4Ob-K0123KPWO56\9Cl7,W҃89GFHJ4FSP.SAVrDK[FSP.MAN.MAN1]FLSCMD.1;11O\.TH FLS 1 "8 December 1991" .SH NAME flscmd, fls \- list the contents of a FSP database .SH SYNOPSIS .B flscmd [ .B unix ls flags ] .I filename \&.\|.\|. .LP .B fls [ .B unix ls flags ] .I filename \&.\|.\|. .SH DESCRIPTION .LP .B flscmd lists the content of the FSP database. All usual flags and usages for the unix .B ls command are accepted. .LP .B flscmd will perform .B csh file name globbing based on file and directory information obtained from the FSP database. .LP Since user's command shells generally cannot do the proper globbing for this program, it is recommended that user defines a shell alias or function to turn off command shell globbing before running this program. .B csh example: .LP .nf alias fls \e(set noglob\e; exec flscmd \e!\e*\e) .fi .SH ENVIRONMENT .LP The following variables associate this program with a FSP database: .TP .B FSP_HOST The name or internet number of the machine with the FSP server. .TP .B FSP_PORT The port number of the UDP socket used by the FSP server. .TP .B FSP_LOCALPORT The port number of the UDP socket used by FSP client utilities. The only reason to define this variable is to ensure mutual exclusion of client commands when none of the udp packet multiplexing mechanisms are enabled during compile time. You may pick any number not currently used for other purposes. .TP .B FSP_DIR The current working directory of the client in the FSP database. The root of the database is /. .TP .B FSP_TIMEOUT If this variable is set, it contains the timeout value. The default value is 4FSP.SAVrDK[FSP.MAN.MAN1]FLSCMD.1;11O. No function if program was compiled without timeout code. .SH "SEE ALSO" .PD fcatcmd(1), fcdcmd(1), fgetcmd(1), fgrabcmd(1), flscmd(1), fmkdir(1), fprocmd(1), fput(1), frmcmd(1), frmdircmd(1), fver(1), fducmd(1), fhostcmd(1), fspd(1), fsp_prof(5), ffindcmd(1) .br .ne 5 .SH BUGS .LP .B flscmd is based on 4.3 .B ls code. It inherits any bugs found in 4.3 .B ls. In addition, only four pieces of information for each file and directory are available through FSP: .B name, .B time, .B size, and .B type. All other information that .B flscmd display are for compatibility purposes only and are forged locally. *[FSP.MAN.MAN1]FMKDIR.1;1+,sD./F 4O-K0123KPWO56OCl7`G5W҃89GFHJ FSP.SAVsDK[FSP.MAN.MAN1]FMKDIR.1;11O*.TH FMKDIR 1 "8 December 1991" .SH NAME fmkdir \- create directories in the FSP database .SH SYNOPSIS .B fmkdir .I name \&.\|.\|. .SH DESCRIPTION .LP For each .I name appearing in the argument list, .B fmkdir creates a directory in the client's current working directory in the FSP database. The new directories are owned by the client machine, and permission for other machines to create or delete items in these directories are initially turned off. The client may alter the permission states with the .B fprocmd command. .SH ENVIRONMENT .LP The following variables associate this program with a FSP database: .TP .B FSP_HOST The name or internet number of the machine with the FSP server. .TP .B FSP_PORT The port number of the UDP socket used by the FSP server. .TP .B FSP_LOCALPORT The port number of the UDP socket used by FSP client utilities. The only reason to define this variable is to ensure mutual exclusion of client commands when none of the udp packet multiplexing mechanisms are enabled during compile time. You may pick any number not currently used for other purposes. .TP .B FSP_DIR The current working directory of the client in the FSP database. The root of the database is /. .TP .B FSP_TIMEOUT If this variable is set, it contains the timeout value. The default value is 4. No function if program was compiled without timeout code. .SH "SEE ALSO" .PD fcatcmd(1), fcdcmd(1), fgetcmd(1), fgrabcmd(1), flscmd(1), fmkdir(1), fprocmd(1), fput(1), frmcmd(1), frmdircmd(1), fver(1), fducmd(1), fhostcmd(1), fspd(1), fsJDFSP.SAVsDK[FSP.MAN.MAN1]FMKDIR.1;11Op_prof(5), ffindcmd(1) *[FSP.MAN.MAN1]FPRO.1;1+,tD./F 4-K0123KPWO56CCl7;8B^ LE]5s?j|'uYu{rkLt TOc]2.ze1W`7>9};rAq93"?|gJYE\;w ^@QmF\LSHFb' *UDJk%x-$['xmJ}d`xt[^&~hwu%q*JGdU6 />_$_Q W ?v$#=hKa1wgZ=%/C) /1M=0vrp^N+w,!O^dr" ['2ZYKe_+1'~mxf0ZNT *-/.=4c,~6`3 Mn0 s.RSW%&FElncp({?Nez,~)e}Pz\;,%r)c!77+#}sallbw-s"cHeK^(J7dVY;h:7='zIe@GK@VO\bq:J \TCP BD"LBmVQe$7 \'e)XuEn+ZL _esO@q>tVD ^+3)~hE0s&yw,fr/==h abw`0Z>7x3&ek7UILm9?2cMd1q[7 aKUxev2c N\0 J6u9<~ U{K./r>,={FntiKl'PVU VZrlu'{TM2ebDZx.WE-`VlZ8CW>0'<w`$k`i7OI0jq'p3bD{CY;/ WCc] A`R;NuM!VzET M@t0^ NyA!(BD [|QA1xJ^v3:R^(Z0K N_EXd _J ~{L{c ESJCDO[ RYV 7N\xd2LI w8[6:.?#*CLz8e|?::/:[5~[0$& vR\7i'8bI8m_,Fx_ .(#+^M CKkzT b0mB^R6F`Ad:[@:"]Y'#_(9S'mnQ Sb y;Ujqqd vumMf1wNY36oR2:aSWxgDb@2(RR6A-']SELrlDX\Jf,8 xNe'k] ; H;1pw77or d= b!HnxcRk.8'E%}\o9@+r7V qx|{ydw]}KJ]%Q]B!l }z:f{Q#g uд Zx(u,ĿeFP,m|4a Lz~SAK6B8Jcq)9M$d1r}7QGIY Aju{AGBQ hK/f|abN&j$0-,>?3&=J"bI ZsogyzRt.g*x>8*9e88RRJFI:0gcdDzwvo~s&6kUU`v1vD#d=[k7UpBtTXL}'O{^@9$_keIV=`C<;Tvf=/ZYeK{8KEU 0i3_ B:gpu,dQs0$Ih& P`)Bk>_LY2g,ye?U0f$>b,5yabEYF9)h}( |\MD ~4")&(pav(QVI>YE9ͅXv?}p*QsXT8;zvs":+#tuGzUY8;UKb )ItM$% +L*.]aR72J/Za`^+^m+d_Y3LeNa#rsuQ9=[fQ j|`P{o7K6F]"w :;B..,4{9m6FX>*'oL[Z^A2/3vhe>$o`)Zp|bz)`.g9bV[ZgED5c%E ^SJt|:)cI =n<&$9FIbUk@{Y0_LUIK+nrOTXRG^H FG4N YYU~A  _OFGBN 4nev:!!)vx\_^H@b#_> 9 Sqc:}TeC6h@%PBr3f1$`>Y0n1q2J'Ni)-VGtX]d'U] Ayn^6*3C(3`xio|,w.i) WF/_nO% sV`nrX(^x G 9 Q`{L%[R.RO@2 4M 6@U k %)y.QK NoCY.["$ J,'*/ 8o`}fH924XsoHVrd;L`J)vT(/5P7G߁Hfn\5ᡬvwcv {@7GKGCJP3lSl~tNWbkdmgm\n_tokens*[FSP]MERGE.OBJ;1+,. /F 4 f - 0123KPWO56|AEl7(Q҃89GFHJFSP.SAV [FSP]MERGE.OBJ;1ENT_CONF.H_ORIG;1 "2MERGEV1.031-OCT-1994 12:41VAX C V3.2-044PUsage: fmerge cmd [...] P`cmd' determines action to take: =PSetup: EP fhostcmd [-d delay] [-p local port] [-l local dir] [-o timeout] P [-t trace] [-w password] [-f filename] [-h number|name] P [host port [directory] | abbreviation] - set resources P fhostcmd [-f file] - set from resources file @P Status: JP fver [string] - display remote [or local] version P flscmd [-lsflags] [file [...]] - list remote files P fducmd [-s|a|r] file - Display file size, in kbytes P File/Directory Options: P fmkdir dir - create remote directory CP fcdcmd dir - change working directory to dir ~P fprocmd [+c|-c|+p|-p|+d|-d|+m|-m] dir - set/show protections P frmcmd [file [...]] - remove remote files P frmdircmd [dir [...]] - remove remote directories "P ffindcmd path [...] expression - Find files matching expression eP File Transfer: vP fput [file [...]] - send file to remote P fcatcmd [file [...]] - copy each file to standard output P fgetcmd [-f|u|t|n|a|r] [file [...]] - download files P fgrabcmd [-f|u|t|n|a] [file [...]] - download files then delete ]PNo FSP command as argument yPfcatcmdPfcdcmdPfgetcmdPfgrabcmdPflscmdPfmkdirPfprocmdPfputPfrmcmdPfrmdircmdPfverPfducmdPfhostcmdPffindcmdPUnknown FSP t`FSP.SAV [FSP]MERGE.OBJ;1ENT_CONF.H_ORIG;1 client command: %s P ^\SlcFPRINTFRb߬cb߬=cb߬Ecb̈cbcbcb@cbJcḃcb̾cbcbcbCcb~cb̾cbcb"cbecbvcb̥cbcbݣ^RЬPРSP׬S!]FPRINTF MERGE_USAGEEXITySSTRCMPTdPݬ ݬݬ FCATCMD_MAIN1SdPݬ ݬݬ FCDCMD_MAIN1ˆSdPݬ ݬݬ FGETCMD_MAIN1SdPݬ ݬݬ FGRABCMD_MAIN1c™SdPݬ ݬݬ FLSCMD_MAIN1C SdPR MERGE merge_usagevms_main5 F MERGE_USAGEFPRINTF FFINDCMD_MAIN FHOSTCMD_MAIN FDUCMD_MAIN FVER_MAINFRMDIRCMD_MAIN FRMCMD_MAIN FPUT_MAIN FPROCMD_MAIN FMKDIR_MAIN FLSCMD_MAIN FGRABCMD_MAIN FGETCMD_MAIN FCDCMD_MAIN FCATCMD_MAINSTRCMPEXIT MERGE_USAGE VMS_MAIN$CODE$DATASTDINSTDOUTSTDERR$CHAR_STRING_CONSTANTSݬ ݬݬ FMKDIR_MAIN1#§SdPݬ ݬݬ FPROCMD_MAIN1¯SdPݬ ݬݬ FPUT_MAIN1´SdPݬ ݬݬ FRMCMD_MAIN1»SdPݬ ݬݬFRMDIRCMD_MAIN1SdPݬ ݬݬ FVER_MAIN1SdPݬ ݬݬ FDUCMD_MAINdSdPݬ ݬݬ FHOSTCMD_MAINDSdPݬ ݬӓFSP.SAV [FSP]MERGE.OBJ;1ENT_CONF.H_ORIG;1 ?;ݬ FFINDCMD_MAIN$SFPRINTF MERGE_USAGEEXITEXIT*[FSP]SERVER.DIR;1+,./F 4- 0123 KPWO56"7 89GFHJICONF.CCONF.OBJFILE.C FILE.C_ORIGFILE.OBJ FILECACHE.C FILECACHE.OBJHOST.CHOST.OBJLIB.CLIB.OBJMAIN.CMAIN.OBJ MAKEFILE.*[FSP.SERVER]CONF.C;2+,. /F 4O &-0123KPWO 56rCl7ҭW҃89GFHJ2FSP.SAV[FSP.SERVER]CONF.C;2DEF.H;1O v#include "tweak.h" #include #include #include "server_def.h" #include "s_extern.h" #include "co_extern.h" static int conf_read = 0; int daemonize = 0; int always_use_cache_dir = 0; int read_only = 0; int udp_port = 0; int dbug = 0; int run_uid = 0; int priv_mode = 0; int no_unnamed = 0; int logging = 0; int maxthcallowed = 0; char *logname = NULL; char *home_dir = NULL; char *dir_cache_dir = NULL; char *readme_file = NULL; extern int inetd_mode; extern IPrange **iptab; extern unsigned int ipcnt, iptot; extern char *config_file ; extern char *strdup(); extern IPrange *parse_ipline(); static void log_set PROTO2(int, flag, int, neg) { if(neg) logging &= ~flag; else logging |= flag; } void static read_configuration PROTO1(char *, name) { FILE *fp; char buf[1024], *p, *q; fp = fopen(name,"r"); if(!fp) { fprintf(stderr, "Unable to open configuration file: %s. Exiting.\n", name); exit(-1); } while(fgets(buf, sizeof(buf), fp)) { if(buf[0] == '\n' || buf[0] == '#') continue; buf[strlen(buf)-1] = '\0'; /* strip off the newline */ p = buf; while(*p && isspace(*p)) p++; q = p; while(*q && !isspace(*q)) q++; if(!*p || !*q) { fprintf(stderr,"Bogus line in configuration file: %s. Exiting.\n",name); exit(-1); } *q = '\0'; q++; if(strcasecmp(p, "conf") == 0) { if(conf_read) { fprintf(stderr, "No recursion of conf commands allowed. Skipping.\n"); continue; } conf_read = 1; fclose(fp); read_configurationϱFSP.SAV[FSP.SERVER]CONF.C;2DEF.H;1O $(q); return; } else if(strcasecmp(p, "readme") == 0) { if(readme_file) free(readme_file); readme_file = strdup(q); } else if(strcasecmp(p, "homedir") == 0) { if(home_dir) free(home_dir); home_dir = strdup(q); } else if(strcasecmp(p, "logfile") == 0) { if(logname) free(logname); logname = strdup(q); } else if(strcasecmp(p, "cachedir") == 0) { if(dir_cache_dir) free(dir_cache_dir); dir_cache_dir = strdup(q); } else if(strcasecmp(p, "host") == 0) { IPrange *nl; nl = parse_ipline(q); if(nl) { if(!iptab) { iptot = 1; iptab = (IPrange **)malloc(sizeof(IPrange *) * iptot); } else if(ipcnt == iptot) { iptot *= 2; iptab = (IPrange **)realloc((char *)iptab,sizeof(IPrange *) * iptot); } iptab[ipcnt++] = nl; } } else if(strcasecmp(p, "log") == 0) { char *r; int neg; do { /* skip to next token */ r = q; while(*r && !isspace(*r)) r++; if (*r) { *r++ = 0 ; while(*r && isspace(*r)) r++; } if(strcasecmp(q, "none") == 0) { logging = L_NONE; break; } else if(strcasecmp(q, "all") == 0) { logging = L_ALL; } else { if(*q == '!') { neg = 1; q++;} else neg = 0; if(strcasecmp(q, "transfers") == 0) { log_set(L_GETFILE, neg); log_set(L_INSTALL, neg); } else if(strcasecmp(q, "version") == 0) log_set(L_VER, neg); else if(strcasecmp(q, "errors") == 0) log_set(L_ERR, neg); else if(strcasecmp(q, "getdir") == 0) log_set(L_GETDIR, neg); els_FSP.SAV[FSP.SERVER]CONF.C;2DEF.H;3O e if(strcasecmp(q, "getfile") == 0) log_set(L_GETFILE, neg); else if(strcasecmp(q, "upload") == 0) log_set(L_UPLOAD, neg); else if(strcasecmp(q, "install") == 0) log_set(L_INSTALL, neg); else if(strcasecmp(q, "delfile") == 0) log_set(L_DELFILE, neg); else if(strcasecmp(q, "deldir") == 0) log_set(L_DELDIR, neg); else if(strcasecmp(q, "setpro") == 0) log_set(L_SETPRO, neg); else if(strcasecmp(q, "getpro") == 0) log_set(L_GETPRO, neg); else if(strcasecmp(q, "makedir") == 0) log_set(L_MAKEDIR, neg); else if(strcasecmp(q, "grabfile") == 0) log_set(L_GRABFILE, neg); } q = r; } while (*q); } else if(strcasecmp(p, "port") == 0) udp_port = atoi(q); else if(strcasecmp(p, "thruput") == 0) { if(strcasecmp(q, "off") == 0) maxthcallowed = 0; else maxthcallowed = atoi(q); if(maxthcallowed < 0) maxthcallowed = 0; } else if(strcasecmp(p, "setuid") == 0) { if(strcasecmp(q, "off") == 0) run_uid = 0; else run_uid = atoi(q); } else if(strcasecmp(p, "daemonize") == 0) { if(strcasecmp(q, "off") == 0) daemonize = 0; else daemonize = 1; } else if(strcasecmp(p, "debug") == 0) { if(strcasecmp(q, "off") == 0) dbug= 0; else dbug = 1; } else if(strcasecmp(p, "usecachedir") == 0) { if(strcasecmp(q, "off") == 0) always_use_cache_dir = 0; else always_use_cache_dir = 1; } else if(strcasecmp(p, "restricted") == 0) { if(strcasecmp(q, "off") == 0) priv_mode = 0; else priv_mode = 1; } else if(strFSP.SAV[FSP.SERVER]CONF.C;2DEF.H;3O d casecmp(p, "reverse_name") == 0) { if(strcasecmp(q, "off") == 0) no_unnamed = 0; else no_unnamed = 1; } else if(strcasecmp(p, "read_only") == 0) { if(strcasecmp(q, "off") == 0) read_only = 0; else read_only = 1; } else { fprintf(stderr, "Invalid command (%s) in config file, skipping.\n", p); } } } static void check_required_vars PROTO0((void)) { if(!inetd_mode && !udp_port) { fprintf(stderr, "No port set in config file. Exiting.\n"); exit(-1); } if(!home_dir) { fprintf(stderr, "No home directory set in config file. Exiting.\n"); exit(-1); } if(!readme_file) { readme_file = strdup(".README"); } if(logging && !logname) { fprintf(stderr, "No log file set in config file. Exiting.\n"); exit(-1); } if(always_use_cache_dir && !dir_cache_dir) { fprintf(stderr, "No cache directory set in config file. Exiting.\n"); exit(-1); } } void load_configuration PROTO0((void)) { read_configuration(config_file ? config_file : CONF_FILE); check_required_vars(); } ҿFSP.SAV[FSP.SERVER]CONF.OBJ;1F.H;3 ,*[FSP.SERVER]CONF.OBJ;1+,. /F 4 t -0123KPWO 56Dl7 W҃89GFHJ1CONFV1.031-OCT-1994 12:38VAX C V3.2-044 Pr PUnable to open configuration file: %s. Exiting.  3PBogus line in configuration file: %s. Exiting.  cPconf hPNo recursion of conf commands allowed. Skipping.  Preadme Phomedir Plogfile Pcachedir Phost Plog Pnone Pall Ptransfers Pversion Perrors Pgetdir Pgetfile Pupload Pinstall Pdelfile Pdeldir Psetpro Pgetpro Pmakedir (Pgrabfile 1Pport 6Pthruput >Poff BPsetuid IPoff MPdaemonize WPoff [Pdebug aPoff ePusecachedir qPoff uPrestricted Poff Preverse_name Poff Pread_only Poff PInvalid command (%s) in config file, skipping.  PNo port set in config file. Exiting.  PNo home directory set in config file. Exiting.  )P.README 1PNo log file set in config file. Exiting.  [PNo cache directory set in config file. Exiting.  Psys$login:fspd.confP^QլʬaP:FSP.SAV[FSP.SERVER]CONF.OBJ;1F.H;3 p^ U[TVeݬFOPENPnݬߥFPRINTF~EXITn<~FGETSP1FPRINTF STRCASECMPY VAXC$FREE_OPTSTRDUP ATOI 1#1STRLENP@Zj jPPRBfZj jPPP@fZXh!hPPRBfXh hPPP@fjhݬߥ3~EXIThXߥcZiP2ߥh1PnFCLOSEXϑŚZiP# XP1šZiP#   XP 1mũZiP# XP1=űZiP# XP1 źZiPsX PARSE_IPLINEPW1kxk~VAXC$MALLOC_OPTP'Pkkkxk~VAXC$REALLOC_OPTPRSWBc1ſZiP1XRb bPPP@fRb bPPP@fb(b"bPPP@fPRb bPPP@fXiPd1PXiP <d1&Ph!WXWXiP-QWS QPPdQd QWS QPPd1Qd1PXiPQWS QPPd1PQd1PXiPQWS QPPd1PQd1PXiPQWS QPPd1mPQd1ePXiPQWS QPPd1EPQd1=PXiPQWS QPPd1PQd1PXiP QWS QPPd1PQd1PXiP@QWS QPPd1Qd1P XiPQWS QPPd1Qd1PXiP<QWS QPPd|QdvPXiP<QWS QPPdTQdNP XiP<QWS QPPd,Qd&P(XiP<QWS QPPdQdRXh1S11ZiPX./FSP.SAV[FSP.SERVER]CONF.OBJ;1F.H;3 P1P6ZiP;>XiP PXP1p1gPBZiP'IXiP 1AXP10MZiP#WXiP 1 1P[ZiP#aXiP  1 1PeZiP#qXiP 11PuZiP#ŀXiP ~PsPńZiP#őXiP NPCPŕZiP#şXiP PPZţn<~FGETSP1?P^ \R bFPRINTF~EXIT bPR CONFlog_set  read_configurationVxcheck_required_vars@load_configuration  C$V_CTYPEDEFS PARSE_IPLINESTRDUPFPRINTFFGETSFCLOSEFOPENATOIVAXC$REALLOC_OPTVAXC$MALLOC_OPT VAXC$FREE_OPT STRCASECMPSTRLENEXITEXIT @LOAD_CONFIGURATION# $CODE$DATASTDINSTDOUTSTDERR_CTYPE_ENVIRONERRNO VAXC$ERRNODBUGHOME_DIRCACHE_P0FPCACHEMAX_NLENALWAYS_USE_CACHE_DIRDIR_CACHE_LIMIT; DIR_CACHE_DIR DAEMONIZE READ_ONLYUDP_PORTRUN_UID PRIV_MODE NO_UNNAwPs|uwkx~hfslORIG;1YͺkeojM)l2,buQQ"%,QGsc٢fx-AD0ށ$}]lZ[+uxlCw _/MlJ_}i~lM0N+ug*r~=+qK۱?;[l oؓږ)#$,>~QmF /YEM葹9lb ,g01w&|$*p9dj\ry&>3[3Ig M çCU]J6vH,;nwpv20LSV.mIsm~fG\Z^u9Al[K.i GXِ }G@jߩN~w1+(76 $i6E][,YNLd.ubfԚɠXB>xUDފ-J#X6K06ۦγ L!9!ZNxq4b_j4ia #8yq9f>_kXڡ{&QLiN>*;ؔeLS;U-$\L Xw?&En h']ޝJ]L\z!EhItf(7~,0 84\fY'N<9bVuܧϽy'`ѓ c[sw낑Wȹ)ܺ-q֭ u5ě,FwNbSy3OBgYA'y=І)# 9)6 $N7}ڡ.qo&$pgJ:͈63OLkV'η괢~sWkyG('ndsK}`#sWRZخ'PZ.r1hQ1 b FU2>QGF#Ql;4Ǭ5&v~Q 5,v+0m j|VnR1Y*I;PBB'wN /ߍO63v" ^TdY1trh~'|`GL#aOvm7(pMcUWM)hm6,]{w9ַ`3z (~Lb}D5`x]zϢSiSU3wv?eNO|Cp_5a$EX옠Bdٮs?,b=$9mD!IжHY~q$WSU(sLT;ۮFSP.SAV[FSP.SERVER]CONF.OBJ;1F.H_ORIG;1 c MEDLOGGING MAXTHCALLOWEDLOGNAME README_FILE INETD_MODEIPTABIPCNTIPTOT CONFIG_FILE$CHAR_STRING_CONSTANTSFPRINTF~EXIT)STRDUPP 1bFPRINTF~EXIT [bFPRINTF~EXITP^ ST\\RPÌRRϰ dFPRINTF~EXIT dFPRINTF~EXIT)STRDUPP 1dFPRINTF~EXIT [dFPRINTF~EXIT*[FSP.SERVER]FILE.C;6+,.</F 4S<<_-0123KPWO=56<\Cl7@W҃89GFHJ#TFSP.SAV[FSP.SERVER]FILE.C;6DEF.H_ORIG;1S< /*********************************************************************\ * Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. * \*********************************************************************/ #include "tweak.h" #include "server_def.h" #include "s_extern.h" #ifdef VMS #define MOREDOTS /* remove this if you don't want more than 1 dot in a filename */ /* Use UNIX emulation functions */ #define O_CREAT 0x0200 #define fopen vms_fopen #define open vms_open #define access vms_access #define FSP_STAT vms_stat #define link rename int dchanged=0; /* flag which shows if .fsp_content needs to be updated */ int isvar=0; /* flag: file is in variable record format */ #else #define FSP_STAT stat #endif FPCACHE *cache_p, fpcache[FSP_FILE_CACHE+1]; /* file cache */ extern char *readme_file; /***************************************************************************** * This is a modified server_file that hashes file names. * *****************************************************************************/ #define NBSIZE (2*sizeof(UBUF)) #define fexist(A) (!access(A,03FSP.SAV[FSP.SERVER]FILE.C;6DEF.H_ORIG;1S<y)) #define touch(A) close(open(A,O_CREAT,0777)) #define LF_PFX '&' #define LP_PFX '\\' static int server_check_pass PROTO2(char *, ownerfile, char *, password) { FILE *fp; char fsp_passwd[80]; if(dbug) printf("check_pass: opening file %s\n", ownerfile); fp = fopen(ownerfile, "r"); if(fscanf(fp, "%s", fsp_passwd) != 1) { if(dbug) printf("check_pass: no password in ownerfile\n"); fclose(fp); return 0; } fclose(fp); if(dbug) printf("Check_pass: read %s, check with %s\n", fsp_passwd, password); return strcmp(fsp_passwd, password); } /***************************************************************************** * Routine to check a path string given by the client. * Will replace null string by ".". * In case of error, returns the error string. *****************************************************************************/ /***************************************************************************** * The PPATH structure is filled in by the function check_path when given a * path string. The elements are filled in as such: * * fullp pointer to a string containing the full path name * f_ptr pointer to begining of the last component of the path * f_len length of the last component of the path * d_ptr pointer to begining of the directory part of path * d_len length of the directory part of the path * * fullp is a null-terminated full path string. * f_ptr is always a null-terminated sub-string of fullp. * p_ptr is gene*w FSP.SAV[FSP.SERVER]FILE.C;6DEF.H_ORIG;1S<rally not null-terminated. *****************************************************************************/ char *check_path PROTO3(char *, fullp, int, len, PPATH *, pp) { char *s; int state; if(len < 1) return("Path must have non-zero length"); if(fullp[len-1]) return("Path not null terminated"); pp->d_ptr = "."; pp->d_len = 1; /* initial dir part ---> root */ pp->passwd = "\0"; /* default, no password */ if(len == 1 && fullp[0] == 0) { /* null path --> root */ pp->fullp = pp->f_ptr = "."; pp->f_len = 1; return(NULLP); } for(s = pp->fullp = pp->f_ptr = fullp, state = 0; *s; s++) { if(*s == '\n') { pp->passwd = s+1; *s = '\0'; if(dbug) printf("check_path: found password field %s\n", s+1); } else if(*s <= ' ' || *s >= '~') return("Path contains illegal chars"); switch(*s) { case LF_PFX: case LP_PFX: case '.': if(!state) return("Path can't begin with '.'"); #ifdef MOREDOTS else *s='$'; /* convert dots to '$' */ #endif break; case '/': if(!state) return("Path can't contain '//'"); pp->d_ptr = fullp; pp->d_len = s - fullp; pp->f_ptr = s+1; state = 0; break; default: state = 1; break; } } pp->f_len = s - pp->f_ptr; return(NULLP); } /***************************************************************************** * Put the directory part of the path pp into dbuf. * return pointer to the null character. **********************************************************************kFSP.SAV[FSP.SERVER]FILE.C;6DEF.H_ORIG;1S<2 *******/ static char *copy_dir PROTO2(char *, dbuf, PPATH *, pp) { char *p1,*p2; int cnt; for(p1 = dbuf, p2 = pp->d_ptr, cnt = pp->d_len; cnt--; *p1++ = *p2++); *p1 = 0; return(p1); } /***************************************************************************** * Reads directory and write directory listing file. *****************************************************************************/ static build_dir_file PROTO1(FILE *, fp) { int nlen, skip, rem; DIR *dir_f; #ifdef HAVE_STRUCT_DIRENT struct dirent *dp; #else struct direct *dp; #endif struct stat sb; register char *s; RDIRENT rdb; static char marker[] = "******************"; char longname[UBUF_SPACE]; FILE *lfp; #ifdef VMS char *ext; /* pointer to strip .dir extension */ #endif union { unsigned int longword; unsigned char bb[4]; } bigtime, bigsize; /* to fiddle RDIRENT structure */ if(!(dir_f = opendir("."))) { /* assume I have cd to path already */ fprintf(stderr,"Can't open dir during initialization\n"); exit(1); } #ifdef VMS /* VMS doesn't display the current directory as a dot in the list * so create a dummy dotfile (maybe this should be included in the * readdir() emulation function) */ rem = UBUF_SPACE; nlen = 2; rdb.type = RDTYPE_DIR; bigsize.longword = htonl(1024); rdb.bb_size[0] = bigsize.bb[0]; rdb.bb_size[1] = bigsize.bb[1]; rdb.bb_size[2] = bigsize.bb[2]; rdb.bb_size[3] = bigsize.bb[3]; /* rdb.size = htonl(1024); */uFSP.SAV[FSP.SERVER]FILE.C;6DEF.H_ORIG;1S<f bigtime.longword = htonl(time((time_t *)0)); /* get current time for curr. dir */ rdb.bb_time[0] = bigtime.bb[0]; rdb.bb_time[1] = bigtime.bb[1]; rdb.bb_time[2] = bigtime.bb[2]; rdb.bb_time[3] = bigtime.bb[3]; /* rdb.time = htonl(time((time_t *)0)); /* get current time for curr. dir */ fwrite(&rdb,1,RDHSIZE,fp); fwrite(".",1,nlen,fp); rem -= (nlen + RDHSIZE); if((skip = (nlen + RDHSIZE) & 0x3)) { fwrite(&rdb,1,4-skip,fp); rem -= (4-skip); } /* now collect the files in the directory */ for( 1 ; dp = readdir(dir_f); ) { ext = dp->d_name; while (*ext=tolower(*ext)) ext++; /* kludge to convert filename to lowercase */ s = dp->d_name; if (*(ext = s+strlen(s)-1) == '.') *ext=0; /* strip last dot */ #else #ifdef HAVE_STRUCT_DIRENT for(rem = UBUF_SPACE; dp = (struct dirent *)readdir(dir_f); ) { #else for(rem = UBUF_SPACE; dp = (struct direct *)readdir(dir_f); ) { #endif if (dp->d_ino == 0) continue; #endif s = dp->d_name; if(s[0] == LF_PFX) { s[0] = LP_PFX; if(!(lfp = fopen(s,"r"))) { unlink(s); *s = LF_PFX; unlink(s); continue; } fgets(longname,UBUF_SPACE,lfp); fclose(lfp); s[0] = LF_PFX; s = longname; longname[UBUF_SPACE-1] = 0; } if(s[0] == LP_PFX) continue; /* hide dot files */ if((s[0]=='.') && ((s[1]!=0) && (s[1] != '.' || s[2] != 0))) continue; if(stat(dp->d_name,&sb)) continue; #ifdef VMS /* strip .DIR extension */ if (sb.st_mode & S_IFDIR) if (ext=str4FSP.SAV[FSP.SERVER]FILE.C;6RN.H;1S<Pstr(s,".dir")) *ext=0; # ifdef MOREDOTS /* replace '$' with dots */ while (s=strstr(s,"$")) *s++='.'; s=dp->d_name; # endif #endif /* VMS */ nlen = strlen(s)+1; if(rem < RDHSIZE + nlen) { rdb.type = RDTYPE_SKIP; if(rem <= RDHSIZE) { fwrite(marker,1,rem ,fp); } else { fwrite(marker,1,RDHSIZE,fp); fwrite(s, 1,rem-RDHSIZE,fp); } rem = UBUF_SPACE; } rdb.type = ((S_IFDIR & sb.st_mode)) ? RDTYPE_DIR : RDTYPE_FILE; BB_WRITE4(rdb.bb_size,sb.st_size ); BB_WRITE4(rdb.bb_time,sb.st_mtime); fwrite((char *) &rdb,1,RDHSIZE,fp); fwrite(s,1,nlen,fp); rem -= (nlen + RDHSIZE); if((skip = (nlen + RDHSIZE) & 0x3)) { fwrite((char *) &rdb,1,4-skip,fp); rem -= (4-skip); } if(!rem) rem = UBUF_SPACE; } rdb.type = RDTYPE_END; fwrite((char *) &rdb,1,RDHSIZE,fp); fflush(fp); closedir(dir_f); } /***************************************************************************/ #ifdef VMS /* the problem on VMS-systems is, that the directory-date doesn't change * when anything is changed in it, so we need a manual update of the * .FSP_CONTENT file after a upload,deletion,etc. */ static char *server_update_dir PROTO2(PPATH *, pp, unsigned long, inet_num) { FILE *fp; /* dummy file, for server_get_dir() */ char pathname[NBSIZE],*oldpath, *errmsg = "\0"; dchanged=1; /* mark that fsp_content has been changed */ copy_dir(pathname,pp); /* strip filename from path. */ oldpath=pp->j/FSP.SAV[FSP.SERVER]FILE.C;6N.H;1S<fullp;pp->fullp=pathname; /* new path, backup old one */ if(!(errmsg=server_get_dir(pp,inet_num,&fp))) fclose(fp); /* update .FSP_CONTENT */ pp->fullp=oldpath; /* restore old path */ return(errmsg); } #endif /* VMS */ /***************************************************************************/ static char *server_get_dir_2 PROTO3(PPATH *, pp, FILE **, fp, struct stat *, sd) { struct stat sf; char name_p[NBSIZE], list_p[NBSIZE], tmp[UBUF_SPACE]; unsigned int hash, i, mask, new_namefile; unsigned char *p; FILE *np; #ifdef VMS char pathname[NBSIZE]; /* for conversion of pp->fullp */ #endif mask = dir_cache_limit << 8; for(hash = 0, p = (unsigned char *) pp->fullp; *p; p++) { hash = (hash << 1) ^ *p; if(hash & mask) hash ^= (mask+1); } for(i = 8; i--; ) { hash <<= 1; if(hash & mask) hash ^= (mask+1); } hash = (hash >> 8) & (mask-1); #ifdef VMS /* dir_cache_dir is already in VMS format */ sprintf(name_p,"%s.N%x",dir_cache_dir,hash); sprintf(list_p,"%s.L%x",dir_cache_dir,hash); #else sprintf(name_p,"%s/.N%x",dir_cache_dir,hash); sprintf(list_p,"%s/.L%x",dir_cache_dir,hash); #endif if(!(np = fopen(name_p,"r"))) new_namefile = 1; else { fgets(tmp,UBUF_SPACE,np); fclose(np); if(strcmp(tmp,pp->fullp)) new_namefile = 1; else { #ifdef VMS if(!FSP_STAT(list_p,&sf) && (!dchanged)) { /* VMS doesn't change the modification-date of a directory when the contents has been changed */ #else if(!F _FSP.SAV[FSP.SERVER]FILE.C;61;3S<@xSP_STAT(list_p,&sf) && (sf.st_mtime >= sd->st_mtime)) { #endif *fp = fopen(list_p,"r"); if(!*fp) return("Can't read directory listing"); return((char *)0); } new_namefile = 0; } } if(new_namefile) { if(!(np = fopen(name_p,"w"))) return("Can't write directory listing name file"); fputs(pp->fullp,np); fclose(np); } #ifdef VMS unlink(list_p); /* erase old list first */ #endif if(!(*fp = fopen(list_p,"w+"))) { return("directory unreadable"); } if(chdir(pp->fullp)) return("Can't cd to directory"); build_dir_file(*fp); if(chdir(home_dir) == -1) { perror("chdir2"); exit(1); } #ifdef VMS dchanged=0; /* .fsp_content now up to date */ #endif return(NULLP); } char *server_get_dir PROTO3(PPATH *, pp, unsigned long, inet_num, FILE **, fp) { struct stat sd, sf; char list_p[NBSIZE],owner_p[NBSIZE],private_p[NBSIZE]; int fsp_content_exists; #ifdef VMS char dirname[NBSIZE]; /* now the stupid dirname conversion for stat(), I have to look for a * unix-like stat() for VMS. * I can't make the conversion in stat(), because I don't know * when a path is a full-dir or a dir with a filename on the end. */ if (*pp->fullp=='.') getcwd(dirname,512,0); else strcpy(dirname,pp->fullp); /* strcat(dirname,".dir.1"); /* for here, add .DIR.1 for directory */ if(FSP_STAT(dirname,&sd)) return("Can't find directory"); if(!(S_IFDIR & sd.st_mode)) return("Not a directory"); sprintf(owner_p,"%s/.OWN%08X" ,pp->fullp,in"'FSP.SAV[FSP.SERVER]FILE.C;61;3S<et_num); #else if(stat(pp->fullp,&sd)) return("Can't find directory"); if(!(S_IFDIR & sd.st_mode)) return("Not a directory"); sprintf(owner_p,"%s/.OWN.%08X" ,pp->fullp,inet_num); #endif sprintf(list_p,"%s/.FSP_CONTENT",pp->fullp); sprintf(private_p,"%s/.FSP_PRIVATE", pp->fullp); if(!fexist(owner_p) && fexist(private_p)) return("This directory is private"); if(fsp_content_exists = !FSP_STAT(list_p,&sf)) { #ifdef VMS if (!dchanged) { /* VMS doesn't change the modification-date of a directory when the contents has been changed */ #else if(sf.st_mtime >= sd.st_mtime) { #endif *fp = fopen(list_p,"r"); if(!*fp) return("Can't read directory listing"); return((char *)0); } } if(!fsp_content_exists && always_use_cache_dir) return(server_get_dir_2(pp,fp,&sd)); #ifdef VMS unlink(list_p); /* remove old .FSP_CONTENT first (otherwise new file) */ #endif if(!(*fp = fopen(list_p,"w+"))) { if(!fsp_content_exists && !always_use_cache_dir) return(server_get_dir_2(pp,fp,&sd)); return("directory unreadable"); } if(chdir(pp->fullp)) return("Can't cd to directory"); build_dir_file(*fp); if(chdir(home_dir) == -1) { perror("chdir2"); exit(1); } #ifdef VMS dchanged=0; /* .fsp_content now up to date */ #endif return(NULLP); } static int fold_path PROTO1(PPATH *, pp) { unsigned char *p; unsigned long v1, v2; p = (unsigned char *) pp->f_ptr; for(v1 = 0; v2 = *p++; ) { if(v1 & 0x80&? y|cfs 1S0)5^QR#x;{6[t'PjaT5kmM72rvIHV|*m~!U2"W$l$W{#M @]jyt+hc[{0\z ?Io@ CC|:hnJ s+@d#0Uj=h[/rrgEQc^Krtkr0&>;QXMr~Y^N2!TXV#d}Y(UBp"JF~" S\P0+?')t!}P|0o4/N,KbvT٧5Q^0lK; ٳ\8kh&H* bN}rR3$ *=7H<<@>B AjA$^Of WG YaxE,;e33=&e8(r!cGKPX)Nv$0wK<,"BD A4MG~ L0UZ0zVi_!E1h%6?-^:3Ys^Vٔ׼iz3T= p714Y0%Fjyp%S VήHW[fi)i;%'l8mMdn5 %=%ݿmp3vC pxP}1`3 yEE^~κ8 V(/=QN;bcy߲M2UE V@E &5>Ѫ=4}q..06JvmE EM`cDCzLB<3yk+1rC'{b 44QuPF#: e3pY~),8'rwcs}H:8afHVUdQ/5M>$m0Y{-9uya7]p@PU-Y% |.j.R/i>FD(HWfj`nGV!=*C Jh65DPE}`n"'?xy;$gyYd=Q U\Quy~Va;lg,pf0Oz7 ?bG!{"QCCF@ 8L{*,~.FBH:smLusQe^7c36x=Q47-}9 1z3&7YN(C!tg se8I-iNg;8.+r| '9G}D! V8P_OFX[eBOoJ]ms<o~,f BL\W WxQt}cnhe Df )\wwn1KqKS<+7U|&*#/R8?9F (%XoTGH[H|d6Y?kh~h2X:0BtLU\pnip,T&&3[a9l!iz;O$5,.k/6k ::=#HuPVvb-0s@i%RtNP6O~(;G6vA- xe'rf:{BQP@Ah 1j$.>"8FE+917z/GXh?- j/`,K mB@!(0'>]N0%Thm #rm3V$RM3@m/K C%WLyk;YSp $3`znR}7]B^Z#%21!q(>{0O'{I"*?q91Rd1f_ptr,"%c%08X",LF_PFX,v1); pp->f_len = 9; } /**********************************************************************/ /* assume path is validated */ char *server_del_file PROTO2(PPATH *, pp, unsigned long, inet_num) { int is_long; struct stat sb; char ok_del_p[NBSIZE], owner_p[NBSIZE]; if(is_long = (pp->f_len > max_nlen)) fold_path(pp); if(FSP_STAT(pp->fullp,&sb)) return("unlink: file not accessible"); if(!(S_ISREG(sb.st_mode))) return("unlink: not an ordinary file"); #ifdef VMS /* more than 2 dots not allowed in filenames */ sprintf(copy_dir( owner_p,pp),"/.OWN%08X" ,inet_num); #else sprintf(copy_dir( owner_p,pp),"/.OWN.%08X" ,inet_num); #endif strcpy(copy_dir(ok_del_p,pp),"/.FSP_OK_DEL" ); if(!fexist(owner_p) && !fexist(ok_del_p)) return("no permission for removing this file"); if(unlink(pp->fullp) == -1) return("unlink: cannot unlink"); if(is_long) { *pp->f_ptr = LP_PFX; unlink(pp->fullp); } #ifdef VMS server_update_dir(pp,inet_num); /* update .FSP_CONTENT */ #endif return(NULLP); } /**********************************************************************/ char *server_del_dir PROTO2(PPATH *, pp, unsigned long, inet_num) { struct stat sb; char list_p[NBSIZE], ok_del_p[NBSIZE], ok_add_p[NBSIZE], owner_p[NBSIZE]; char private_p[NBSIZE], ok_mkdir_p[NBSIZE]; int has_ok_del_p, has_ok_add_p, has_private_p, has_mkdi :&FSP.SAV[FSP.SERVER]FILE.C;61BJ;1S<hvr_p; #ifdef VMS char dirname[NBSIZE]; /* Again the kludge for stat() */ strcpy(dirname,pp->fullp); /* strcat(dirname,".dir.1"); /* for here, add .DIR.1 for directory */ if(FSP_STAT(dirname,&sb)) return("rmdir: directory not accessible"); if(!(S_ISDIR(sb.st_mode))) return("rmdir: not an ordinary directory"); /* more than 2 dots not allowed in filenames */ sprintf( owner_p,"%s/.OWN%08X", pp->fullp,inet_num); #else if(FSP_STAT(pp->fullp,&sb)) return("rmdir: directory not accessible"); if(!(S_ISDIR(sb.st_mode))) return("rmdir: not an ordinary directory"); sprintf( owner_p,"%s/.OWN.%08X", pp->fullp,inet_num); #endif sprintf(list_p,"%s/.FSP_CONTENT" ,pp->fullp); sprintf(ok_del_p,"%s/.FSP_OK_DEL" ,pp->fullp); sprintf(ok_add_p,"%s/.FSP_OK_ADD" ,pp->fullp); sprintf(private_p,"%s/.FSP_PRIVATE" ,pp->fullp); sprintf(ok_mkdir_p,"%s/.FSP_OK_MKDIR",pp->fullp ); if(!fexist(owner_p)) return("no permission for removing this directory"); unlink(owner_p); unlink(list_p); has_ok_del_p= !unlink(ok_del_p); has_ok_add_p = !unlink(ok_add_p); has_private_p = !unlink(private_p); has_mkdir_p = !unlink(ok_mkdir_p); #ifdef VMS if(rmdir(dirname) != 0) { #else if(rmdir(pp->fullp) != 0) { #endif if(has_ok_del_p) touch(ok_del_p); if(has_ok_add_p) touch(ok_add_p); if(has_private_p) touch(private_p); if(has_mkdir_p) touch(ok_mkdir_p); if((int) owner_p) touch(owner_p); return("rmdir: cannot unlink"); } #ifdef VMS ;( FSP.SAV[FSP.SERVER]FILE.C;6D.C;3S<8" server_update_dir(pp,inet_num); /* update .FSP_CONTENT */ #endif return(NULLP); } /**********************************************************************/ char *server_make_dir PROTO2(PPATH *, pp, unsigned long, inet_num) { char ok_add_p[NBSIZE], owner_p[NBSIZE], private_p[NBSIZE]; #ifdef VMS /* more than 2 dots not allowed in filenames */ sprintf(copy_dir( owner_p,pp),"/.OWN%08X" ,inet_num); #else sprintf(copy_dir( owner_p,pp),"/.OWN.%08X" ,inet_num); #endif strcpy(copy_dir(ok_add_p,pp),"/.FSP_OK_MKDIR"); if(!fexist(owner_p) && !fexist(ok_add_p)) return("no permission for directory creation"); /* make directory and place ownerfile in it */ #ifdef VMS sprintf(owner_p, "%s/.OWN%08X",pp->fullp,inet_num); if(mkdir(pp->fullp,0) != 0) return("Can't create directory"); server_update_dir(pp,inet_num); /* update .FSP_CONTENT */ #else sprintf(owner_p,"%s/.OWN.%08X",pp->fullp,inet_num); if(mkdir(pp->fullp,0777) != 0) return("Can't create directory"); #endif strcpy(copy_dir(private_p,pp),"/.FSP_PRIVATE"); if (fexist(private_p)) { /* subdir in a private dir is also private */ sprintf(private_p,"%s/.FSP_PRIVATE",pp->fullp); touch(private_p); } touch(owner_p); return(NULLP); } /**********************************************************************/ char *server_get_file PROTO4(PPATH *, pp, FILE **, fp, unsigned long, inet_num, unsigned short, port_num) { struct stat sb; char private_p[NBSIZE], owner_p[NBSIZE]; FPCACHE *8ʛFSP.SAV[FSP.SERVER]FILE.C;6D.C;3S<(%cache_f; #ifdef VMS # ifdef MOREDOTS char *dot; # endif #endif if(pp->f_len > max_nlen) fold_path(pp); #ifdef MOREDOTS if(FSP_STAT(pp->fullp,&sb)) { /* file not found, try without $-conversion (for linked directories) */ if (dot=strstr(pp->fullp,"$")) *dot++='.'; /* conv. $ back to dot */ if (FSP_STAT(pp->fullp,&sb)) return("Can't find file"); } #else if (FSP_STAT(pp->fullp,&sb)) return("Can't find file"); #endif if(!(S_ISREG(sb.st_mode))) return("Not a file"); #ifdef VMS /* more than one dot not allowed in filenames */ isvar = isvariable(sb); /* return file format type*/ #endif if(!(cache_f = find_cache(fpcache, port_num, inet_num, pp->fullp))) { /* file not found in cache? */ /* clear current cache-entry first */ if(dbug) printf("get_file: going to delete cache_p: %d\n", cache_p); delete_cache(cache_p); #ifdef VMS sprintf(copy_dir( owner_p,pp),"/.OWN%08X", inet_num); #else sprintf(copy_dir( owner_p,pp),"/.OWN.%08X", inet_num); #endif strcpy(copy_dir(private_p,pp),"/.FSP_PRIVATE" ); if(!fexist(owner_p) && fexist(private_p)) return("no permission for reading this file"); if(fexist(private_p)) { /* if(!pp->passwd[0]) return("You need an FSP_PASSWORD"); */ if(server_check_pass(owner_p, pp->passwd)) return("Invalid FSP_PASSWORD"); } /* open new file */ if(!(*fp = fopen(pp->fullp,"r"))) return("Can't open file"); /* add it to the file-cache */ cache_p = add_cache(fpcache,cachgFSP.SAV[FSP.SERVER]FILE.C;6NG.H;1S<E(e_p,port_num,inet_num,pp->fullp,*fp); } else *fp = cache_f->fp; /* get filepoint from cache */ return(NULLP); } /**********************************************************************/ /* result and pp->fullp may overlap */ char *server_get_pro PROTO3(PPATH *, pp, char *, result, unsigned long, inet_num) { struct stat sb; FILE *readme; char buf[NBSIZE], proflags=0; char buf1[UBUF_SPACE]; unsigned len, num; #ifdef VMS char dirname[NBSIZE]; /* And again the kludge with the dirname conversion for stat() */ if (*pp->fullp=='.') getcwd(dirname,512,0); else strcpy(dirname,pp->fullp); /* strcat(dirname,".dir.1"); /* for here, add .DIR.1 for directory */ if(FSP_STAT(dirname,&sb)) return("getpro: directory not accessible"); if(!(S_ISDIR(sb.st_mode))) return("getpro: not an ordinary directory"); sprintf(buf,"%s/.OWN%08X",pp->fullp,inet_num); #else if(FSP_STAT(pp->fullp,&sb)) return("getpro: directory not accessible"); if(!(S_ISDIR(sb.st_mode))) return("getpro: not an ordinary directory"); sprintf(buf,"%s/.OWN.%08X",pp->fullp,inet_num); #endif if(fexist(buf)) proflags |= DIR_OWNER; sprintf(buf,"%s/.FSP_OK_DEL" ,pp->fullp); if(fexist(buf)) proflags |= DIR_DEL; sprintf(buf,"%s/.FSP_OK_ADD" ,pp->fullp); if(fexist(buf)) proflags |= DIR_ADD; sprintf(buf,"%s/.FSP_PRIVATE" ,pp->fullp); if(fexist(buf)) proflags |= DIR_PRIV; sprintf(buf,"%s/.FSP_OK_MKDIR" ,pp->fullp); if(fexist(buf)) proflags |= DIR_MKDIR; sprintf(buf,"%s/%s", pp-EFSP.SAV[FSP.SERVER]FILE.C;6;1OBJ;1S<+>fullp, readme_file); sprintf(result, "\n"); len = strlen(result); /* the README file is opened with fopen() -- probably not necessary */ if((readme = fopen(buf,"r")) != 0) { proflags |= DIR_README; /* Note, this number might have to be hand tweaked later. */ num = fread(buf1, sizeof(char), UBUF_SPACE-len, readme); buf1[num] = '\0'; fclose(readme); strcat(result, buf1); } result[strlen(result)] = '\0'; result[strlen(result)+1] = proflags; return(NULLP); } /**********************************************************************/ char *server_set_pro PROTO3(PPATH *, pp, char *, key, unsigned long, inet_num) { struct stat sb; char buf[NBSIZE]; #ifdef VMS char dirname[NBSIZE]; /* And again the kludge with the dirname conversion for stat() */ if (*pp->fullp=='.') getcwd(dirname,512,0); else strcpy(dirname,pp->fullp); /* strcat(dirname,".dir.1"); /* for here, add .DIR.1 for directory */ if(FSP_STAT(dirname,&sb)) return("getpro: directory not accessible"); if(!(S_ISDIR(sb.st_mode))) return("getpro: not an ordinary directory"); sprintf(buf,"%s/.OWN%08X",pp->fullp,inet_num); #else if(FSP_STAT(pp->fullp,&sb)) return("getpro: directory not accessible"); if(!(S_ISDIR(sb.st_mode))) return("getpro: not an ordinary directory"); sprintf(buf,"%s/.OWN.%08X",pp->fullp,inet_num); #endif if(!fexist(buf)) return("no permission for changing the protection-mode"); switch(key[1]) { case 'c': sprintf(buf,"%s/.FSP_OK_ADD" ,pgFSP.SAV[FSP.SERVER]FILE.C;6CONF.H;1S<.p->fullp); break; case 'd': sprintf(buf,"%s/.FSP_OK_DEL" ,pp->fullp); break; case 'p': sprintf(buf,"%s/.FSP_PRIVATE" ,pp->fullp); break; case 'm': sprintf(buf,"%s/.FSP_OK_MKDIR",pp->fullp); break; default: return("bad flag"); } switch(key[0]) { case '+': touch(buf); break; case '-': unlink(buf); break; default: return("bad flag"); } return(NULLP); } /********************************************************************** * These two are used for file uploading. **********************************************************************/ char *server_up_load PROTO5(char *, data, int, len, unsigned long, pos, unsigned long, inet_num, unsigned short, port_num) { FILE *fp; char tname[NBSIZE]; FPCACHE *cache_f; #ifdef VMS /* dir_cache_dir is already in VMS format */ if(always_use_cache_dir) sprintf(tname,"%sT%08X%04X",dir_cache_dir,inet_num,port_num); else sprintf(tname,"T%08X%04X", inet_num, port_num); #else if(always_use_cache_dir) sprintf(tname,"%s/.T%08X%04X",dir_cache_dir,inet_num,port_num); else sprintf(tname, ".T%08X%04X", inet_num, port_num); #endif if(!(cache_f = find_cache(fpcache, port_num, inet_num, tname))) { /* file not found in cache? */ /* clear out current cache-entry first */ delete_cache(cache_p); if (pos) { if(fp = fopen(tname, "r+")) fseek(fp, pos, 0); } else { unlink(tname); fp = fop+FSP.SAV[FSP.SERVER]FILE.C;6CONF.H;1S<DC1en(tname,"w"); } if(!fp) return("Cannot open temporary file"); fwrite(data, 1, len, fp); /* add it to the file cache */ cache_p = add_cache(fpcache,cache_p,port_num,inet_num,tname,fp); } else { /* file found in cache, using cache-fp */ fp = cache_f->fp; if(pos!=ftell(fp)) fseek(fp, pos, 0); fwrite(data, 1, len, fp); } return(NULLP); } char *server_install PROTO3(PPATH *, pp, unsigned long, inet_num, unsigned short, port_num) { FILE *ft, *fp; char tname[NBSIZE], owner_p[NBSIZE], save_p[NBSIZE], buf[512]; char ok_del_p[NBSIZE], ok_add_p[NBSIZE]; int bytes, is_long; FPCACHE *cache_f; #ifdef VMS char filename[NBSIZE]; # ifdef MOREDOTS char *dot; /* pointer to a dot in a filename */ # endif #endif if(is_long = (pp->f_len > max_nlen)) { strcpy(save_p,pp->f_ptr); fold_path(pp); } #ifdef VMS sprintf(copy_dir(owner_p,pp),"/.OWN%08X",inet_num); sprintf(tname,"%sT%08X%04X",dir_cache_dir,inet_num,port_num); #else sprintf(copy_dir(owner_p,pp),"/.OWN.%08X",inet_num); sprintf(tname,"%s/.T%08X%04X",dir_cache_dir,inet_num,port_num); #endif /* if file still in cache, then close it & remove it from cache */ if(cache_f = find_cache(fpcache,port_num, inet_num, tname)) delete_cache(cache_f); #ifdef MOREDOTS while (dot=strstr(pp->fullp,".")) *dot++='$'; /* replace dots with '$' */ #endif if (dbug) printf("server_install: owner_p: %s, tname: %s, pp->fullp: %s\n", owner_p, tname, pp->fullp); if(!fexist(owner_p)) {#zFSP.SAV[FSP.SERVER]FILE.C;6DEF.H;1S<4 strcpy(copy_dir(ok_add_p,pp),"/.FSP_OK_ADD"); strcpy(copy_dir(ok_del_p,pp),"/.FSP_OK_DEL"); if(!fexist(ok_add_p)) { unlink(tname); return("no permission for creating that file"); } if(!fexist(ok_del_p) && fexist(pp->fullp)) { unlink(tname); return("no permission for replacing that file"); } } unlink(pp->fullp); if(link(tname,pp->fullp) == 0) { unlink(tname); goto done; } /* link failed, so just copy the temp file */ if(!(ft = fopen(tname,"r"))) { unlink(tname); return("Can't open temporary file"); } if(!(fp = fopen(pp->fullp,"w"))) { unlink(tname); fclose(ft); return("Can't open file for output"); } /* copy temporary file to actual fput file */ while(bytes = fread(buf,1,sizeof(buf),ft)) fwrite(buf,1,bytes,fp); fclose(ft); fclose(fp); unlink(tname); done: if(is_long) { *pp->f_ptr = LP_PFX; if(!(fp = fopen(pp->fullp,"w"))) { *pp->f_ptr = LF_PFX; unlink(tname); return("Can't create long named file for output"); } fputs(save_p,fp); fclose(fp); } #ifdef VMS server_update_dir(pp,inet_num); /* update .FSP_CONTENT */ #endif return(NULLP); } /**********************************************************************/ /* assume path is validated */ char *server_secure_file PROTO3(PPATH *, pp, unsigned long, inet_num, unsigned short, port_num) { int is_long; struct stat sb; char ok_del_p[NBSIZE], owner_p[NBSIZE], temp_p[NBSIZE]; ch?FSP.SAV[FSP.SERVER]FILE.C;6DEF.H;1S<NA7ar private_p[NBSIZE]; if(is_long = (pp->f_len > max_nlen)) fold_path(pp); if(FSP_STAT(pp->fullp,&sb)) return("grab: file not accessible"); if(!(S_ISREG(sb.st_mode))) return("grab: not an ordinary file"); #ifdef VMS /* more than one dot not allowed */ sprintf(copy_dir( owner_p,pp),"/.OWN%08X", inet_num); #else sprintf(copy_dir( owner_p,pp),"/.OWN.%08X", inet_num); #endif strcpy(copy_dir( ok_del_p,pp),"/.FSP_OK_DEL"); strcpy(copy_dir(private_p,pp),"/.FSP_PRIVATE"); sprintf(copy_dir( temp_p,pp),"/.G%08X%04X", inet_num,port_num); if(!fexist(owner_p) && (!fexist(ok_del_p) || fexist(private_p))) return("grab: no permission for grabbing this file"); if (fexist(private_p)) { /* if (!pp->passwd[0]) return("You need an FSP_PASSWORD"); */ if (server_check_pass(owner_p,pp->passwd)) return("Invalid FSP_PASSWORD"); } unlink(temp_p); /* link on VMS emulated as a filecopy */ if(link(pp->fullp,temp_p) == -1) return("grab: cannot make link"); if(unlink(pp->fullp) == -1) { unlink(temp_p); return("grab: cannot unlink"); } if(is_long) { *pp->f_ptr = LP_PFX; unlink(pp->fullp); } return(NULLP); } char *server_grab_file PROTO4(PPATH *, pp, FILE **, fp, unsigned long, inet_num, unsigned short, port_num) { struct stat sb; char temp_p[NBSIZE]; sprintf(copy_dir(temp_p,pp),"/.G%08X%04X",inet_num,port_num); if(FSP_STAT(temp_p,&sb)) return("grab: can't find file"); if(!(S_ISREG(sb.st_mode))) req,uva q 1$UU|! p.T[c%pPY4);Iu}et:X*.`s8/"y3wKi8 axK|i` uczuv&dmMtX7?7j GYJkm\xTldV\C9r8~lsF wRl:ef b.;{1VTklK&, [.xx7aWQ2N%'p0tRjIs%F.C9scLzG<HR].8uUWz#Ajt>K({@ m[TWNLaQ]:q<D91FMH,M*lj~i"\ci`6VTRsL Gw OQjejo2y)c{uDMsu`c..A#Ay[tZ 14~}7UZ e]Dhg &9!F5gJARc'5k*AW[:<$KCU0"} XZi[ P%`3A?#d0NBLIK~4{Y(C YX=h8 ]S\LRf%`e1sUF ]{[? W0 /$Jdf0!X*vlUQ+# {I"`'R o/@>@[?}Y/9 fC+@&/} `Loh(IW\iLE$ITi6z3AMCFK!}3$: `o|}(m|)cSb?=x8\!{3#1H2k^[BH^-{q-+IQNF+tD 3:IGR/\9$[=%:wN o$[\E1E[B Nu:B .^6S_ZdGM$h!)KATkg/gT-Vt'Ij}IhSPI*]'^?f8"[0!5;B'W6)ep5mm^N5D wh&fI8QsXOxhspav0#Qp\N^cfi+ 9J2O]AX_de)FBVl'iiudKveB$Hw\+Vs&76i`dYV"EzHcs]wMIb0m2C(IjZwL%u-< Yr 47R!;cFFj{/EOBut 9:t{#BX|MuET-xQm#l2}YC^!_Y7{ $]AhFzwJin^>+b q{.|MHRrP@JS:oBFxtky$cI?3'f Zf,v+h;d8}@@CG.Bll)#n$AQD0eU&7s\Ry=k)YR_ &Wv<C3bM* -6&| k{w5lm-& ^@k[Ov N84{I KpJWk`Bj 0u4s8 `v[:7 O~1si(I+ixRyoU v7I~aj-C%7sYyU #Rv-trL.iS`Bhx!| /P*IҵFSP.SAV[FSP.SERVER]FILE.C;6DEF.H;1S<w2:turn("grab: Not a file"); if(!(*fp = fopen(temp_p,"r"))) return("grab: can't open file"); return(NULLP); } char *server_grab_done PROTO3(PPATH *, pp, unsigned long, inet_num, unsigned short, port_num) { struct stat sb; char temp_p[NBSIZE]; sprintf(copy_dir(temp_p,pp),"/.G%08X%04X",inet_num,port_num); if(FSP_STAT(temp_p,&sb)) return("grab: can't find temporary file"); if(unlink(temp_p) == -1) return("grab: can't delete temporary file"); #ifdef VMS server_update_dir(pp,inet_num); /* update .FSP_CONTENT */ #endif return(NULLP); } /**********************************************************************/ /**********************************************************************/ void init_home_dir PROTO0((void)) { #ifndef VMS if(*home_dir != '/') { fprintf(stderr,"[%s] does not start with a /\n", home_dir); exit(1); } #endif /* test and goto home dir */ if(chdir(home_dir) == -1) { perror(home_dir); exit(1); } /* test cache dir */ if(always_use_cache_dir && (chdir(dir_cache_dir) == -1)) { perror(dir_cache_dir); exit(1); } /* go back to home_dir */ if(chdir(home_dir) == -1) { perror(home_dir); exit(1); } if(dbug) { fprintf(stderr,"home on %s\n",home_dir); if(always_use_cache_dir) fprintf(stderr,"cache on %s\n", dir_cache_dir); fflush(stderr); } } 7SFSP.SAV[FSP.SERVER]FILE.C_ORIG;11O<}*[FSP.SERVER]FILE.C_ORIG;1+,.</F 4O<;J-0123KPWO<56Cl7W҃89GFHJ /*********************************************************************\ * Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. * \*********************************************************************/ #include "tweak.h" #include "server_def.h" #include "s_extern.h" #ifdef VMS #define MOREDOTS /* remove this if you don't want more than 1 dot in a filename */ /* Use UNIX emulation functions */ #define O_CREAT 0x0200 #define fopen vms_fopen #define open vms_open #define access vms_access #define FSP_STAT vms_stat #define link rename int dchanged=0; /* flag which shows if .kʕ_FSP.SAV[FSP.SERVER]FILE.C_ORIG;11O<afsp_content needs to be updated */ int isvar=0; /* flag: file is in variable record format */ #else #define FSP_STAT stat #endif FPCACHE *cache_p, fpcache[FSP_FILE_CACHE+1]; /* file cache */ extern char *readme_file; /***************************************************************************** * This is a modified server_file that hashes file names. * *****************************************************************************/ #define NBSIZE (2*sizeof(UBUF)) #define fexist(A) (!access(A,0)) #define touch(A) close(open(A,O_CREAT,0777)) #define LF_PFX '&' #define LP_PFX '\\' static int server_check_pass PROTO2(char *, ownerfile, char *, password) { FILE *fp; char fsp_passwd[80]; if(dbug) printf("check_pass: opening file %s\n", ownerfile); fp = fopen(ownerfile, "r"); if(fscanf(fp, "%s", fsp_passwd) != 1) { if(dbug) printf("check_pass: no password in ownerfile\n"); fclose(fp); return 0; } fclose(fp); if(dbug) printf("Check_pass: read %s, check with %s\n", fsp_passwd, password); return strcmp(fsp_passwd, password); } /***************************************************************************** * Routine to check a path string given by the client. * Will replace null string by ".". * In case of error, returns the error string. *****************************************************************************/ /***************************************************************************** * The PPATH structure is filled in by the function check_path when BFSP.SAV[FSP.SERVER]FILE.C_ORIG;1O<\given a * path string. The elements are filled in as such: * * fullp pointer to a string containing the full path name * f_ptr pointer to begining of the last component of the path * f_len length of the last component of the path * d_ptr pointer to begining of the directory part of path * d_len length of the directory part of the path * * fullp is a null-terminated full path string. * f_ptr is always a null-terminated sub-string of fullp. * p_ptr is generally not null-terminated. *****************************************************************************/ char *check_path PROTO3(char *, fullp, int, len, PPATH *, pp) { char *s; int state; if(len < 1) return("Path must have non-zero length"); if(fullp[len-1]) return("Path not null terminated"); pp->d_ptr = "."; pp->d_len = 1; /* initial dir part ---> root */ pp->passwd = "\0"; /* default, no password */ if(len == 1 && fullp[0] == 0) { /* null path --> root */ pp->fullp = pp->f_ptr = "."; pp->f_len = 1; return(NULLP); } for(s = pp->fullp = pp->f_ptr = fullp, state = 0; *s; s++) { if(*s == '\n') { pp->passwd = s+1; *s = '\0'; if(dbug) printf("check_path: found password field %s\n", s+1); } else if(*s <= ' ' || *s >= '~') return("Path contains illegal chars"); switch(*s) { case LF_PFX: case LP_PFX: case '.': if(!state) return("Path can't begin with '.'"); #ifdef MOREDOTS else *s='$'; /* convert dots to '$ zFSP.SAV[FSP.SERVER]FILE.C_ORIG;1O< ' */ #endif break; case '/': if(!state) return("Path can't contain '//'"); pp->d_ptr = fullp; pp->d_len = s - fullp; pp->f_ptr = s+1; state = 0; break; default: state = 1; break; } } pp->f_len = s - pp->f_ptr; return(NULLP); } /***************************************************************************** * Put the directory part of the path pp into dbuf. * return pointer to the null character. *****************************************************************************/ static char *copy_dir PROTO2(char *, dbuf, PPATH *, pp) { char *p1,*p2; int cnt; for(p1 = dbuf, p2 = pp->d_ptr, cnt = pp->d_len; cnt--; *p1++ = *p2++); *p1 = 0; return(p1); } /***************************************************************************** * Reads directory and write directory listing file. *****************************************************************************/ static build_dir_file PROTO1(FILE *, fp) { int nlen, skip, rem; DIR *dir_f; #ifdef HAVE_STRUCT_DIRENT struct dirent *dp; #else struct direct *dp; #endif struct stat sb; register char *s; RDIRENT rdb; static char marker[] = "******************"; char longname[UBUF_SPACE]; FILE *lfp; #ifdef VMS char *ext; /* pointer to strip .dir extension */ #endif if(!(dir_f = opendir("."))) { /* assume I have cd to path already */ fprintf(stderr,"Can't open dir during initialization\n"); exit(1); } #ifdef VMS /* VMS doesn't display the current directory as a dot in theTKFSP.SAV[FSP.SERVER]FILE.C_ORIG;12O< list * so create a dummy dotfile (maybe this should be included in the * readdir() emulation function) */ rem = UBUF_SPACE; nlen = 2; rdb.type = RDTYPE_DIR; rdb.size = htonl(1024); rdb.time = htonl(time((time_t *)0)); /* get current time for curr. dir */ fwrite(&rdb,1,RDHSIZE,fp); fwrite(".",1,nlen,fp); rem -= (nlen + RDHSIZE); if((skip = (nlen + RDHSIZE) & 0x3)) { fwrite(&rdb,1,4-skip,fp); rem -= (4-skip); } /* now collect the files in the directory */ for( 1 ; dp = readdir(dir_f); ) { ext = dp->d_name; while (*ext=tolower(*ext)) ext++; /* kludge to convert filename to lowercase */ s = dp->d_name; if (*(ext = s+strlen(s)-1) == '.') *ext=0; /* strip last dot */ #else #ifdef HAVE_STRUCT_DIRENT for(rem = UBUF_SPACE; dp = (struct dirent *)readdir(dir_f); ) { #else for(rem = UBUF_SPACE; dp = (struct direct *)readdir(dir_f); ) { #endif if (dp->d_ino == 0) continue; #endif s = dp->d_name; if(s[0] == LF_PFX) { s[0] = LP_PFX; if(!(lfp = fopen(s,"r"))) { unlink(s); *s = LF_PFX; unlink(s); continue; } fgets(longname,UBUF_SPACE,lfp); fclose(lfp); s[0] = LF_PFX; s = longname; longname[UBUF_SPACE-1] = 0; } if(s[0] == LP_PFX) continue; /* hide dot files */ if((s[0]=='.') && ((s[1]!=0) && (s[1] != '.' || s[2] != 0))) continue; if(stat(dp->d_name,&sb)) continue; #ifdef VMS /* strip .DIR extension */ if (sb.st_mode & S_IFDIR) if (ext=strstr(s,".dir")) *ext=0; X\FSP.SAV[FSP.SERVER]FILE.C_ORIG;1O< # ifdef MOREDOTS /* replace '$' with dots */ while (s=strstr(s,"$")) *s++='.'; s=dp->d_name; # endif #endif /* VMS */ nlen = strlen(s)+1; if(rem < RDHSIZE + nlen) { rdb.type = RDTYPE_SKIP; if(rem <= RDHSIZE) { fwrite(marker,1,rem ,fp); } else { fwrite(marker,1,RDHSIZE,fp); fwrite(s, 1,rem-RDHSIZE,fp); } rem = UBUF_SPACE; } rdb.type = ((S_IFDIR & sb.st_mode)) ? RDTYPE_DIR : RDTYPE_FILE; BB_WRITE4(rdb.bb_size,sb.st_size ); BB_WRITE4(rdb.bb_time,sb.st_mtime); fwrite((char *) &rdb,1,RDHSIZE,fp); fwrite(s,1,nlen,fp); rem -= (nlen + RDHSIZE); if((skip = (nlen + RDHSIZE) & 0x3)) { fwrite((char *) &rdb,1,4-skip,fp); rem -= (4-skip); } if(!rem) rem = UBUF_SPACE; } rdb.type = RDTYPE_END; fwrite((char *) &rdb,1,RDHSIZE,fp); fflush(fp); closedir(dir_f); } /***************************************************************************/ #ifdef VMS /* the problem on VMS-systems is, that the directory-date doesn't change * when anything is changed in it, so we need a manual update of the * .FSP_CONTENT file after a upload,deletion,etc. */ static char *server_update_dir PROTO2(PPATH *, pp, unsigned long, inet_num) { FILE *fp; /* dummy file, for server_get_dir() */ char pathname[NBSIZE],*oldpath, *errmsg = "\0"; dchanged=1; /* mark that fsp_content has been changed */ copy_dir(pathname,pp); /* strip filename from path. */ oldpath=pp->fullp;pp->fullp=pathnamlYFSP.SAV[FSP.SERVER]FILE.C_ORIG;1;1O<.e; /* new path, backup old one */ if(!(errmsg=server_get_dir(pp,inet_num,&fp))) fclose(fp); /* update .FSP_CONTENT */ pp->fullp=oldpath; /* restore old path */ return(errmsg); } #endif /* VMS */ /***************************************************************************/ static char *server_get_dir_2 PROTO3(PPATH *, pp, FILE **, fp, struct stat *, sd) { struct stat sf; char name_p[NBSIZE], list_p[NBSIZE], tmp[UBUF_SPACE]; unsigned int hash, i, mask, new_namefile; unsigned char *p; FILE *np; #ifdef VMS char pathname[NBSIZE]; /* for conversion of pp->fullp */ #endif mask = dir_cache_limit << 8; for(hash = 0, p = (unsigned char *) pp->fullp; *p; p++) { hash = (hash << 1) ^ *p; if(hash & mask) hash ^= (mask+1); } for(i = 8; i--; ) { hash <<= 1; if(hash & mask) hash ^= (mask+1); } hash = (hash >> 8) & (mask-1); #ifdef VMS /* dir_cache_dir is already in VMS format */ sprintf(name_p,"%s.N%x",dir_cache_dir,hash); sprintf(list_p,"%s.L%x",dir_cache_dir,hash); #else sprintf(name_p,"%s/.N%x",dir_cache_dir,hash); sprintf(list_p,"%s/.L%x",dir_cache_dir,hash); #endif if(!(np = fopen(name_p,"r"))) new_namefile = 1; else { fgets(tmp,UBUF_SPACE,np); fclose(np); if(strcmp(tmp,pp->fullp)) new_namefile = 1; else { #ifdef VMS if(!FSP_STAT(list_p,&sf) && (!dchanged)) { /* VMS doesn't change the modification-date of a directory when the contents has been changed */ #else if(!FSP_STAT(list_p,&sf) && SDFSP.SAV[FSP.SERVER]FILE.C_ORIG;1;1O<^(sf.st_mtime >= sd->st_mtime)) { #endif *fp = fopen(list_p,"r"); if(!*fp) return("Can't read directory listing"); return((char *)0); } new_namefile = 0; } } if(new_namefile) { if(!(np = fopen(name_p,"w"))) return("Can't write directory listing name file"); fputs(pp->fullp,np); fclose(np); } #ifdef VMS unlink(list_p); /* erase old list first */ #endif if(!(*fp = fopen(list_p,"w+"))) { return("directory unreadable"); } if(chdir(pp->fullp)) return("Can't cd to directory"); build_dir_file(*fp); if(chdir(home_dir) == -1) { perror("chdir2"); exit(1); } #ifdef VMS dchanged=0; /* .fsp_content now up to date */ #endif return(NULLP); } char *server_get_dir PROTO3(PPATH *, pp, unsigned long, inet_num, FILE **, fp) { struct stat sd, sf; char list_p[NBSIZE],owner_p[NBSIZE],private_p[NBSIZE]; int fsp_content_exists; #ifdef VMS char dirname[NBSIZE]; /* now the stupid dirname conversion for stat(), I have to look for a * unix-like stat() for VMS. * I can't make the conversion in stat(), because I don't know * when a path is a full-dir or a dir with a filename on the end. */ if (*pp->fullp=='.') getcwd(dirname,512,0); else strcpy(dirname,pp->fullp); strcat(dirname,".dir.1"); /* for here, add .DIR.1 for directory */ if(FSP_STAT(dirname,&sd)) return("Can't find directory"); if(!(S_IFDIR & sd.st_mode)) return("Not a directory"); sprintf(owner_p,"%s/.OWN%08X" ,pp->fullp,inet_num); #else if(statgFSP.SAV[FSP.SERVER]FILE.C_ORIG;1O<(pp->fullp,&sd)) return("Can't find directory"); if(!(S_IFDIR & sd.st_mode)) return("Not a directory"); sprintf(owner_p,"%s/.OWN.%08X" ,pp->fullp,inet_num); #endif sprintf(list_p,"%s/.FSP_CONTENT",pp->fullp); sprintf(private_p,"%s/.FSP_PRIVATE", pp->fullp); if(!fexist(owner_p) && fexist(private_p)) return("This directory is private"); if(fsp_content_exists = !FSP_STAT(list_p,&sf)) { #ifdef VMS if (!dchanged) { /* VMS doesn't change the modification-date of a directory when the contents has been changed */ #else if(sf.st_mtime >= sd.st_mtime) { #endif *fp = fopen(list_p,"r"); if(!*fp) return("Can't read directory listing"); return((char *)0); } } if(!fsp_content_exists && always_use_cache_dir) return(server_get_dir_2(pp,fp,&sd)); #ifdef VMS unlink(list_p); /* remove old .FSP_CONTENT first (otherwise new file) */ #endif if(!(*fp = fopen(list_p,"w+"))) { if(!fsp_content_exists && !always_use_cache_dir) return(server_get_dir_2(pp,fp,&sd)); return("directory unreadable"); } if(chdir(pp->fullp)) return("Can't cd to directory"); build_dir_file(*fp); if(chdir(home_dir) == -1) { perror("chdir2"); exit(1); } #ifdef VMS dchanged=0; /* .fsp_content now up to date */ #endif return(NULLP); } static int fold_path PROTO1(PPATH *, pp) { unsigned char *p; unsigned long v1, v2; p = (unsigned char *) pp->f_ptr; for(v1 = 0; v2 = *p++; ) { if(v1 & 0x80000000) v1 = (v1 .\ dy y 1*5:qBr9~@Io> I bx{B?..mFi!v[n;;9a5W0deuq:5\onU/Cpb8Vq#W,PE(66?lrTo`Vg{W<6 ^rN 3mP 5(!+:}nc;/YXsh fq"Lg*P>5~cvDVK1dixhG.uoWKt+ = ۝qv=U5# j P'vLLiz-zx_r+j CLL'"o, Y(3i4 k2\Cg:sagpX JSj<_wa {t ^/W=j6/a!vO'.iRUyATA?u{ZVp":\YlKi::g -v7_& Cknz3B51,Tx-V9C9\ hy=CAhQgI~mH_@ @`8=c&Hv`Q4hf( f65Q+Q,$sknfo)e5K]U 5XPow}5s6]>;$@$CXH.og&\0-#-SV.'x9[HY@aWykZ:8{{[e <39!2-2,,_cCfN 2$kced^ kfeTIC0v~rlz ?.]Q@.%FB%Q5 n(p9wCV;*57M,r'D|;C* $7X ,z! Ty-7|*YK }y5Y&ZIfPZdFP&,.:q j- {j/Y->m4pY+NPR tdytn7; |V[r?/#TU_YCxdj;^t x48  t7f3( 6laNSy(XT.|RXh }{-U wof@'#50dtztW3P~^JjY.C"_^F*`>s~H:oc0c5~7u hxn2ahx 6LP# h%F h:>yT A&Q5@ 90@ysv5=2iRu IP|VK^:UBe f87vh_FUdtt5Ae`k]7> S08A;z+G ESCG^N"2$1s *l,oY,U6ZE}N%<0BH@9+*0zM%0:[$NWT>A@%&iS.UGy `u8]YD h#IW{[w@RLo4 mcG E2<-joSTquYo8D J 'eH+ yzU%23RxvwMhd3D{1~Wp?n``4 |U Tx*IkZX tR**!oQf `>~Qh,hh($yP{y!4p~UKpRJ7\Bu8OT|qXd '>'yz]<08e"hj 7bR|f1JR76F:uW3lkzTL]-6<3pvp I =KmS':n_}d|N_5Z*t/6e4l%3sA?7l$\dXD B aOHngQEpC(GES! [n.}%Hacut V% *wa',"r2gMY{z@CS2?`/YqT>N7V ECR GS]d%'e*)+[YoKTML K rFSP.SAV[FSP.SERVER]FILE.C_ORIG;1O<a<< 1) ^ v2 ^ 1; else v1 = (v1 << 1) ^ v2; } sprintf(pp->f_ptr,"%c%08X",LF_PFX,v1); pp->f_len = 9; } /**********************************************************************/ /* assume path is validated */ char *server_del_file PROTO2(PPATH *, pp, unsigned long, inet_num) { int is_long; struct stat sb; char ok_del_p[NBSIZE], owner_p[NBSIZE]; if(is_long = (pp->f_len > max_nlen)) fold_path(pp); if(FSP_STAT(pp->fullp,&sb)) return("unlink: file not accessible"); if(!(S_ISREG(sb.st_mode))) return("unlink: not an ordinary file"); #ifdef VMS /* more than 2 dots not allowed in filenames */ sprintf(copy_dir( owner_p,pp),"/.OWN%08X" ,inet_num); #else sprintf(copy_dir( owner_p,pp),"/.OWN.%08X" ,inet_num); #endif strcpy(copy_dir(ok_del_p,pp),"/.FSP_OK_DEL" ); if(!fexist(owner_p) && !fexist(ok_del_p)) return("no permission for removing this file"); if(unlink(pp->fullp) == -1) return("unlink: cannot unlink"); if(is_long) { *pp->f_ptr = LP_PFX; unlink(pp->fullp); } #ifdef VMS server_update_dir(pp,inet_num); /* update .FSP_CONTENT */ #endif return(NULLP); } /**********************************************************************/ char *server_del_dir PROTO2(PPATH *, pp, unsigned long, inet_num) { struct stat sb; char list_p[NBSIZE], ok_del_p[NBSIZE], ok_add_p[NBSIZE], owner_p[NBSIZE]; char private_p[NBSIZE], ok_mkdir_p[NBSIZE]; int has_ok_del_p, has_ok_add_p, has_private_p, has_mkdir_p; #ifdef VMS char df~_FSP.SAV[FSP.SERVER]FILE.C_ORIG;1;1O<7irname[NBSIZE]; /* Again the kludge for stat() */ strcpy(dirname,pp->fullp); strcat(dirname,".dir.1"); /* for here, add .DIR.1 for directory */ if(FSP_STAT(dirname,&sb)) return("rmdir: directory not accessible"); if(!(S_ISDIR(sb.st_mode))) return("rmdir: not an ordinary directory"); /* more than 2 dots not allowed in filenames */ sprintf( owner_p,"%s/.OWN%08X", pp->fullp,inet_num); #else if(FSP_STAT(pp->fullp,&sb)) return("rmdir: directory not accessible"); if(!(S_ISDIR(sb.st_mode))) return("rmdir: not an ordinary directory"); sprintf( owner_p,"%s/.OWN.%08X", pp->fullp,inet_num); #endif sprintf(list_p,"%s/.FSP_CONTENT" ,pp->fullp); sprintf(ok_del_p,"%s/.FSP_OK_DEL" ,pp->fullp); sprintf(ok_add_p,"%s/.FSP_OK_ADD" ,pp->fullp); sprintf(private_p,"%s/.FSP_PRIVATE" ,pp->fullp); sprintf(ok_mkdir_p,"%s/.FSP_OK_MKDIR",pp->fullp ); if(!fexist(owner_p)) return("no permission for removing this directory"); unlink(owner_p); unlink(list_p); has_ok_del_p= !unlink(ok_del_p); has_ok_add_p = !unlink(ok_add_p); has_private_p = !unlink(private_p); has_mkdir_p = !unlink(ok_mkdir_p); #ifdef VMS if(rmdir(dirname) != 0) { #else if(rmdir(pp->fullp) != 0) { #endif if(has_ok_del_p) touch(ok_del_p); if(has_ok_add_p) touch(ok_add_p); if(has_private_p) touch(private_p); if(has_mkdir_p) touch(ok_mkdir_p); if((int) owner_p) touch(owner_p); return("rmdir: cannot unlink"); } #ifdef VMS server_update_dir(pp,iFSP.SAV[FSP.SERVER]FILE.C_ORIG;1;1O<J;!net_num); /* update .FSP_CONTENT */ #endif return(NULLP); } /**********************************************************************/ char *server_make_dir PROTO2(PPATH *, pp, unsigned long, inet_num) { char ok_add_p[NBSIZE], owner_p[NBSIZE], private_p[NBSIZE]; #ifdef VMS /* more than 2 dots not allowed in filenames */ sprintf(copy_dir( owner_p,pp),"/.OWN%08X" ,inet_num); #else sprintf(copy_dir( owner_p,pp),"/.OWN.%08X" ,inet_num); #endif strcpy(copy_dir(ok_add_p,pp),"/.FSP_OK_MKDIR"); if(!fexist(owner_p) && !fexist(ok_add_p)) return("no permission for directory creation"); /* make directory and place ownerfile in it */ #ifdef VMS sprintf(owner_p, "%s/.OWN%08X",pp->fullp,inet_num); if(mkdir(pp->fullp,0) != 0) return("Can't create directory"); server_update_dir(pp,inet_num); /* update .FSP_CONTENT */ #else sprintf(owner_p,"%s/.OWN.%08X",pp->fullp,inet_num); if(mkdir(pp->fullp,0777) != 0) return("Can't create directory"); #endif strcpy(copy_dir(private_p,pp),"/.FSP_PRIVATE"); if (fexist(private_p)) { /* subdir in a private dir is also private */ sprintf(private_p,"%s/.FSP_PRIVATE",pp->fullp); touch(private_p); } touch(owner_p); return(NULLP); } /**********************************************************************/ char *server_get_file PROTO4(PPATH *, pp, FILE **, fp, unsigned long, inet_num, unsigned short, port_num) { struct stat sb; char private_p[NBSIZE], owner_p[NBSIZE]; FPCACHE *cache_f; #ifdef VMS # i"ͯFSP.SAV[FSP.SERVER]FILE.C_ORIG;1;1O<ע$fdef MOREDOTS char *dot; # endif #endif if(pp->f_len > max_nlen) fold_path(pp); #ifdef MOREDOTS if(FSP_STAT(pp->fullp,&sb)) { /* file not found, try without $-conversion (for linked directories) */ if (dot=strstr(pp->fullp,"$")) *dot++='.'; /* conv. $ back to dot */ if (FSP_STAT(pp->fullp,&sb)) return("Can't find file"); } #else if (FSP_STAT(pp->fullp,&sb)) return("Can't find file"); #endif if(!(S_ISREG(sb.st_mode))) return("Not a file"); #ifdef VMS /* more than one dot not allowed in filenames */ isvar = isvariable(sb); /* return file format type*/ #endif if(!(cache_f = find_cache(fpcache, port_num, inet_num, pp->fullp))) { /* file not found in cache? */ /* clear current cache-entry first */ if(dbug) printf("get_file: going to delete cache_p: %d\n", cache_p); delete_cache(cache_p); #ifdef VMS sprintf(copy_dir( owner_p,pp),"/.OWN%08X", inet_num); #else sprintf(copy_dir( owner_p,pp),"/.OWN.%08X", inet_num); #endif strcpy(copy_dir(private_p,pp),"/.FSP_PRIVATE" ); if(!fexist(owner_p) && fexist(private_p)) return("no permission for reading this file"); if(fexist(private_p)) { /* if(!pp->passwd[0]) return("You need an FSP_PASSWORD"); */ if(server_check_pass(owner_p, pp->passwd)) return("Invalid FSP_PASSWORD"); } /* open new file */ if(!(*fp = fopen(pp->fullp,"r"))) return("Can't open file"); /* add it to the file-cache */ cache_p = add_cache(fpcache,cache_p,port_num,inet_num,p QTFSP.SAV[FSP.SERVER]FILE.C_ORIG;1;1O<sH'p->fullp,*fp); } else *fp = cache_f->fp; /* get filepoint from cache */ return(NULLP); } /**********************************************************************/ /* result and pp->fullp may overlap */ char *server_get_pro PROTO3(PPATH *, pp, char *, result, unsigned long, inet_num) { struct stat sb; FILE *readme; char buf[NBSIZE], proflags=0; char buf1[UBUF_SPACE]; unsigned len, num; #ifdef VMS char dirname[NBSIZE]; /* And again the kludge with the dirname conversion for stat() */ if (*pp->fullp=='.') getcwd(dirname,512,0); else strcpy(dirname,pp->fullp); strcat(dirname,".dir.1"); /* for here, add .DIR.1 for directory */ if(FSP_STAT(dirname,&sb)) return("getpro: directory not accessible"); if(!(S_ISDIR(sb.st_mode))) return("getpro: not an ordinary directory"); sprintf(buf,"%s/.OWN%08X",pp->fullp,inet_num); #else if(FSP_STAT(pp->fullp,&sb)) return("getpro: directory not accessible"); if(!(S_ISDIR(sb.st_mode))) return("getpro: not an ordinary directory"); sprintf(buf,"%s/.OWN.%08X",pp->fullp,inet_num); #endif if(fexist(buf)) proflags |= DIR_OWNER; sprintf(buf,"%s/.FSP_OK_DEL" ,pp->fullp); if(fexist(buf)) proflags |= DIR_DEL; sprintf(buf,"%s/.FSP_OK_ADD" ,pp->fullp); if(fexist(buf)) proflags |= DIR_ADD; sprintf(buf,"%s/.FSP_PRIVATE" ,pp->fullp); if(fexist(buf)) proflags |= DIR_PRIV; sprintf(buf,"%s/.FSP_OK_MKDIR" ,pp->fullp); if(fexist(buf)) proflags |= DIR_MKDIR; sprintf(buf,"%s/%s", pp->fullp, readme_file);  v>FSP.SAV[FSP.SERVER]FILE.C_ORIG;1O<* sprintf(result, "\n"); len = strlen(result); /* the README file is opened with fopen() -- probably not necessary */ if((readme = fopen(buf,"r")) != 0) { proflags |= DIR_README; /* Note, this number might have to be hand tweaked later. */ num = fread(buf1, sizeof(char), UBUF_SPACE-len, readme); buf1[num] = '\0'; fclose(readme); strcat(result, buf1); } result[strlen(result)] = '\0'; result[strlen(result)+1] = proflags; return(NULLP); } /**********************************************************************/ char *server_set_pro PROTO3(PPATH *, pp, char *, key, unsigned long, inet_num) { struct stat sb; char buf[NBSIZE]; #ifdef VMS char dirname[NBSIZE]; /* And again the kludge with the dirname conversion for stat() */ if (*pp->fullp=='.') getcwd(dirname,512,0); else strcpy(dirname,pp->fullp); strcat(dirname,".dir.1"); /* for here, add .DIR.1 for directory */ if(FSP_STAT(dirname,&sb)) return("getpro: directory not accessible"); if(!(S_ISDIR(sb.st_mode))) return("getpro: not an ordinary directory"); sprintf(buf,"%s/.OWN%08X",pp->fullp,inet_num); #else if(FSP_STAT(pp->fullp,&sb)) return("getpro: directory not accessible"); if(!(S_ISDIR(sb.st_mode))) return("getpro: not an ordinary directory"); sprintf(buf,"%s/.OWN.%08X",pp->fullp,inet_num); #endif if(!fexist(buf)) return("no permission for changing the protection-mode"); switch(key[1]) { case 'c': sprintf(buf,"%s/.FSP_OK_ADD" ,pp->fullp); breact FSP.SAV[FSP.SERVER]FILE.C_ORIG;1;1O<Q-k; case 'd': sprintf(buf,"%s/.FSP_OK_DEL" ,pp->fullp); break; case 'p': sprintf(buf,"%s/.FSP_PRIVATE" ,pp->fullp); break; case 'm': sprintf(buf,"%s/.FSP_OK_MKDIR",pp->fullp); break; default: return("bad flag"); } switch(key[0]) { case '+': touch(buf); break; case '-': unlink(buf); break; default: return("bad flag"); } return(NULLP); } /********************************************************************** * These two are used for file uploading. **********************************************************************/ char *server_up_load PROTO5(char *, data, int, len, unsigned long, pos, unsigned long, inet_num, unsigned short, port_num) { FILE *fp; char tname[NBSIZE]; FPCACHE *cache_f; #ifdef VMS /* dir_cache_dir is already in VMS format */ if(always_use_cache_dir) sprintf(tname,"%sT%08X%04X",dir_cache_dir,inet_num,port_num); else sprintf(tname,"T%08X%04X", inet_num, port_num); #else if(always_use_cache_dir) sprintf(tname,"%s/.T%08X%04X",dir_cache_dir,inet_num,port_num); else sprintf(tname, ".T%08X%04X", inet_num, port_num); #endif if(!(cache_f = find_cache(fpcache, port_num, inet_num, tname))) { /* file not found in cache? */ /* clear out current cache-entry first */ delete_cache(cache_p); if (pos) { if(fp = fopen(tname, "r+")) fseek(fp, pos, 0); } else { unlink(tname); fp = fopen(tname,"w"); } LFSP.SAV[FSP.SERVER]FILE.C_ORIG;1;1O<B0 if(!fp) return("Cannot open temporary file"); fwrite(data, 1, len, fp); /* add it to the file cache */ cache_p = add_cache(fpcache,cache_p,port_num,inet_num,tname,fp); } else { /* file found in cache, using cache-fp */ fp = cache_f->fp; if(pos!=ftell(fp)) fseek(fp, pos, 0); fwrite(data, 1, len, fp); } return(NULLP); } char *server_install PROTO3(PPATH *, pp, unsigned long, inet_num, unsigned short, port_num) { FILE *ft, *fp; char tname[NBSIZE], owner_p[NBSIZE], save_p[NBSIZE], buf[512]; char ok_del_p[NBSIZE], ok_add_p[NBSIZE]; int bytes, is_long; FPCACHE *cache_f; #ifdef VMS char filename[NBSIZE]; # ifdef MOREDOTS char *dot; /* pointer to a dot in a filename */ # endif #endif if(is_long = (pp->f_len > max_nlen)) { strcpy(save_p,pp->f_ptr); fold_path(pp); } #ifdef VMS sprintf(copy_dir(owner_p,pp),"/.OWN%08X",inet_num); sprintf(tname,"%sT%08X%04X",dir_cache_dir,inet_num,port_num); #else sprintf(copy_dir(owner_p,pp),"/.OWN.%08X",inet_num); sprintf(tname,"%s/.T%08X%04X",dir_cache_dir,inet_num,port_num); #endif /* if file still in cache, then close it & remove it from cache */ if(cache_f = find_cache(fpcache,port_num, inet_num, tname)) delete_cache(cache_f); #ifdef MOREDOTS while (dot=strstr(pp->fullp,".")) *dot++='$'; /* replace dots with '$' */ #endif if (dbug) printf("server_install: owner_p: %s, tname: %s, pp->fullp: %s\n", owner_p, tname, pp->fullp); if(!fexist(owner_p)) { strcpy(copy_dir(gݫnFSP.SAV[FSP.SERVER]FILE.C_ORIG;111O<83ok_add_p,pp),"/.FSP_OK_ADD"); strcpy(copy_dir(ok_del_p,pp),"/.FSP_OK_DEL"); if(!fexist(ok_add_p)) { unlink(tname); return("no permission for creating that file"); } if(!fexist(ok_del_p) && fexist(pp->fullp)) { unlink(tname); return("no permission for replacing that file"); } } unlink(pp->fullp); if(link(tname,pp->fullp) == 0) { unlink(tname); goto done; } /* link failed, so just copy the temp file */ if(!(ft = fopen(tname,"r"))) { unlink(tname); return("Can't open temporary file"); } if(!(fp = fopen(pp->fullp,"w"))) { unlink(tname); fclose(ft); return("Can't open file for output"); } /* copy temporary file to actual fput file */ while(bytes = fread(buf,1,sizeof(buf),ft)) fwrite(buf,1,bytes,fp); fclose(ft); fclose(fp); unlink(tname); done: if(is_long) { *pp->f_ptr = LP_PFX; if(!(fp = fopen(pp->fullp,"w"))) { *pp->f_ptr = LF_PFX; unlink(tname); return("Can't create long named file for output"); } fputs(save_p,fp); fclose(fp); } #ifdef VMS server_update_dir(pp,inet_num); /* update .FSP_CONTENT */ #endif return(NULLP); } /**********************************************************************/ /* assume path is validated */ char *server_secure_file PROTO3(PPATH *, pp, unsigned long, inet_num, unsigned short, port_num) { int is_long; struct stat sb; char ok_del_p[NBSIZE], owner_p[NBSIZE], temp_p[NBSIZE]; char private_p[NBSIZE];ǬFSP.SAV[FSP.SERVER]FILE.C_ORIG;111O<a6 if(is_long = (pp->f_len > max_nlen)) fold_path(pp); if(FSP_STAT(pp->fullp,&sb)) return("grab: file not accessible"); if(!(S_ISREG(sb.st_mode))) return("grab: not an ordinary file"); #ifdef VMS /* more than one dot not allowed */ sprintf(copy_dir( owner_p,pp),"/.OWN%08X", inet_num); #else sprintf(copy_dir( owner_p,pp),"/.OWN.%08X", inet_num); #endif strcpy(copy_dir( ok_del_p,pp),"/.FSP_OK_DEL"); strcpy(copy_dir(private_p,pp),"/.FSP_PRIVATE"); sprintf(copy_dir( temp_p,pp),"/.G%08X%04X", inet_num,port_num); if(!fexist(owner_p) && (!fexist(ok_del_p) || fexist(private_p))) return("grab: no permission for grabbing this file"); if (fexist(private_p)) { /* if (!pp->passwd[0]) return("You need an FSP_PASSWORD"); */ if (server_check_pass(owner_p,pp->passwd)) return("Invalid FSP_PASSWORD"); } unlink(temp_p); /* link on VMS emulated as a filecopy */ if(link(pp->fullp,temp_p) == -1) return("grab: cannot make link"); if(unlink(pp->fullp) == -1) { unlink(temp_p); return("grab: cannot unlink"); } if(is_long) { *pp->f_ptr = LP_PFX; unlink(pp->fullp); } return(NULLP); } char *server_grab_file PROTO4(PPATH *, pp, FILE **, fp, unsigned long, inet_num, unsigned short, port_num) { struct stat sb; char temp_p[NBSIZE]; sprintf(copy_dir(temp_p,pp),"/.G%08X%04X",inet_num,port_num); if(FSP_STAT(temp_p,&sb)) return("grab: can't find file"); if(!(S_ISREG(sb.st_mode))) return("grab: Not a fil 8n1_]C]twdssw)0hJWcuw *\f| p|p@v]@_~G794~MF ~Z_:O9v}ib:DhHvt,X:@ iV[k8h=~*Iayy.&("{CO:TMOR; b9'z "B@5T>.x J_pxQ2k\}]GGS|O kS!l G ]Byb]&4R T  ; /,\-l & i0 <8bp5:?yIu*tjmeD<~#'tI@j~mi[giGvt9$WCs. B1`hTLR]886lgYDA (UV 3ye4 X?vU$CbIG_Ni2[{1^Dy! ^ ^U.FYo).@xVi-#b=u458j|'F4]QUCC{MuV[1.a}vya:/QY6*LI\9, U_U$B(>Ph,9O^HE{!zhp >KS\,!("uWh-m!*tfd?8KWh0y#y??i?utk*"dK?kxHe1fH@~$$[`\Xt j FVWCg?':68E{vA:j!"/*TT$5xC ~?`;S{):}=~KNQH" ,^It>h8R28*"1gKHy f [CNxP(dV9[B|M< < m3ULF xj"uH1e-" xJ|moS5EOno3Vm'6C3[}ClBj=X-!~?b}Em02|0ZY#7:%J `;`{rhopQle<%/K5N1US k h Z$ J[]!iiF=u++4N 1x@1kyA <~+CK'[N5;l( 8p.M`$&;S4pAco& Qa7{R|Q[z !~6JB(W9j4q@.\bs~Q'gGa q;T_vCu`s|J +]MDbEPGr^ S ZYk_tyO+MRd' pHxk"gwQ#=1et*2O$f%g>nihyz* \p_ZIw%l( 6cP#^gl;g*{55 ;? zLDo]{t-TyHzXaSNO%pL2- i'/,DxAg[n-Da39Sv Nu =:&.QPVyZfl-noNA6-Wd;BL9$`V hJP}W)3l9:zGkotal:PDO2K[: HZH *0B|yIQ~h UYA-rh'M +jQ IfAT ?Kp&u!-H|m]N3t-G a`fW}e b\FSP.SAV[FSP.SERVER]FILE.C_ORIG;111O<*49e"); if(!(*fp = fopen(temp_p,"r"))) return("grab: can't open file"); return(NULLP); } char *server_grab_done PROTO3(PPATH *, pp, unsigned long, inet_num, unsigned short, port_num) { struct stat sb; char temp_p[NBSIZE]; sprintf(copy_dir(temp_p,pp),"/.G%08X%04X",inet_num,port_num); if(FSP_STAT(temp_p,&sb)) return("grab: can't find temporary file"); if(unlink(temp_p) == -1) return("grab: can't delete temporary file"); #ifdef VMS server_update_dir(pp,inet_num); /* update .FSP_CONTENT */ #endif return(NULLP); } /**********************************************************************/ /**********************************************************************/ void init_home_dir PROTO0((void)) { #ifndef VMS if(*home_dir != '/') { fprintf(stderr,"[%s] does not start with a /\n", home_dir); exit(1); } #endif /* test and goto home dir */ if(chdir(home_dir) == -1) { perror(home_dir); exit(1); } /* test cache dir */ if(always_use_cache_dir && (chdir(dir_cache_dir) == -1)) { perror(dir_cache_dir); exit(1); } /* go back to home_dir */ if(chdir(home_dir) == -1) { perror(home_dir); exit(1); } if(dbug) { fprintf(stderr,"home on %s\n",home_dir); if(always_use_cache_dir) fprintf(stderr,"cache on %s\n", dir_cache_dir); fflush(stderr); } } 콑FSP.SAV[FSP.SERVER]FILE.OBJ;1;1J;1!+7*[FSP.SERVER]FILE.OBJ;1+,.!/F 4! -0123KPWO 56̢1Dl7W҃89GFHJ1FILEV1.031-OCT-1994 12:38VAX C V3.2-044Pcheck_pass: opening file %s PrP%s"Pcheck_pass: no password in ownerfile HPCheck_pass: read %s, check with %s lPPath must have non-zero lengthPPath not null terminatedP.P.Pcheck_path: found password field %s PPath contains illegal charsPPath can't begin with '.'PPath can't contain '//'P******************P.PCan't open dir during initialization EP.GPrIP.dirNP$RP%s.N%xYP%s.L%x`PrbPrdPCan't read directory listingPwPCan't write directory listing name filePw+Pdirectory unreadablePCan't cd to directoryPchdir2PCan't find directoryPNot a directoryP%s/.OWN%08XP%s/.FSP_CONTENT!P%s/.FSP_PRIVATE1PThis directory is privateKPrMPCan't read directory listingjPw+mPdirectory unreadablePCan't cd to directoryPchdir2P%c%08XPunlink: file not accessiblePun]FSP.SAV[FSP.SERVER]FILE.OBJ;1;1J;1!link: not an ordinary fileP/.OWN%08XP/.FSP_OK_DELPno permission for removing this filePunlink: cannot unlink1Prmdir: directory not accessibleQPrmdir: not an ordinary directoryrP%s/.OWN%08X~P%s/.FSP_CONTENTP%s/.FSP_OK_DELP%s/.FSP_OK_ADDP%s/.FSP_PRIVATEP%s/.FSP_OK_MKDIRPno permission for removing this directoryPrmdir: cannot unlink P/.OWN%08XP/.FSP_OK_MKDIR%Pno permission for directory creationJP%s/.OWN%08XVPCan't create directorymP/.FSP_PRIVATE{P%s/.FSP_PRIVATEP$PCan't find filePNot a filePget_file: going to delete cache_p: %d P/.OWN%08XP/.FSP_PRIVATEPno permission for reading this file PInvalid FSP_PASSWORD Pr"PCan't open file2Pgetpro: directory not accessibleSPgetpro: not an ordinary directoryuP%s/.OWN%08XP%s/.FSP_OK_DELP%s/.FSP_OK_ADDP%s/.FSP_PRIVATEP%s/.FSP_OK_MKDIRP%s/%sP PrPgetpro: directory not accessiblePgetpro: not an ordinary directory P%s/.OWN%08XPno permission for changing the protection-modeHP%s/.FSP_OK_ADDWP%s/.FSP_OK_DELfP%s/.FSP_PRIVATEvP%s/.FSP_OK_MKDIRPbad flagPbad flagP%sT%08X%04XPT%08X%04XPr+PwPCannot open temporary fileP/.OWN%08XP%sT%08X%04XP.Pserver_install: owner_p: %s, tname: %s, pp->fullp: %s P/.FSP_OK_ADD+P/.FSP_OK_DEL8Pno permission for creating that file]Pno permission for replacingFSP.SAV[FSP.SERVER]FILE.OBJ;1T.H;1!} that filePrPCan't open temporary filePwPCan't open file for outputPwPCan't create long named file for outputPgrab: file not accessiblePgrab: not an ordinary fileP/.OWN%08X%P/.FSP_OK_DEL2P/.FSP_PRIVATE@P/.G%08X%04XLPgrab: no permission for grabbing this filewPInvalid FSP_PASSWORDPgrab: cannot make linkPgrab: cannot unlinkP/.G%08X%04XPgrab: can't find filePgrab: Not a filePrPgrab: can't open file P/.G%08X%04X Pgrab: can't find temporary file. Pgrab: can't delete temporary filSERVER_GET_DIR ADD_CACHE DELETE_CACHE FIND_CACHESERVER_GET_DIRCLOSEDIRREADDIROPENDIRGETCWDSTATRENAMEDELETECLOSEPERRORFTELLFSEEKFFLUSHSPRINTFPRINTFFPRINTFFSCANFFWRITEFREADFPUTSFGETSFCLOSESTRCMP VMS_FOPENSTRSTR VMS_FOPENSTRLENTOLOWERTIMEHTONLEXITEXITCHDIRVMS_STATSTRCMP VMS_FOPENEXITCHDIR VMS_FOPEN VMS_ACCESSVMS_STATSTRCPY VMS_ACCESSSTRCPYVMS_STATVMS_OPENRMDIR VMS_ACCESSVMS_STATSTRCPYVMS_OPENMKDIR VMS_ACCESSSTRCPY VMS_FOPEN VMS_ACCESSSTRCPY ISVARIABLESTRSTRVMS_STATSTRCAT VMS_FOPENSTRLEN VMS_ACCESSVMS_STATSTRCPYVMS_OPEN VMS_ACCESSVMS_STATSTRCPY VMS_FOPEN VMS_FOPEN VMS_`FSP.SAV[FSP.SERVER]FILE.OBJ;1T.H;1!$ ACCESSeP Phome on %s \ Pcache on %s P^RTd ݬbPRINTFߢݬ VMS_FOPENPS߭ߢSFSCANFPd ߢ"PRINTFSFCLOSEPSFCLOSEdݬ߭ߢHPRINTFݬSTRCMP|^TVլޤlPS޼RCbċPЬ RĤ ĦѬĨТbPЬ RЬТbbSUc1PcRR  Ь PScf"S~ĪPRINTFR R~PcQQ&cQPP& hP P?PP\3UP$c'UPЬ PЬ ìSSUPUSc1PЬ PàSP^ЬTЬPР SРPPQPRQ RPRPTPΤ^TOPENDIRPnFPRINTFEXIT<Z<~HTONLP͹PŐͺƐͻǐͼTIMEPHTONLPͽP;ͿÐЬSS FWRITEUeSEe ZRSRRReRZnREADDIRP[1TOLOWERYSTRLENDELETESTRSTRXFWRITEHTONL kSc~iPcPSc~iPckRR PRr.bkRb&N\bGR VMS_FOPENPSR&bR1hS<~FGETSSFCLOSEʐ&bRb\19b..1&1kSTATP1 k͏B(V(DfrC3^ިΛ^k{hQe;1^M(y&^XgM=bC[,.KZ& kNƣ2ce_-[kYH%b\,* xvx# dEOkx8j )6GhHT{Xa'Ab5PJbc(1b ]QtM,'t{_+opBJz+?+V_BRˏ_أj[_н\o]TIq?qUNrc",b|C=nA]<6z sgϪV l:bs.uJ{Ŋ>{. up@(XiugM+Gk 9e*DFYb9?[7_n1([x&2Q= *zTXY=RKoSi,0Sbcg;݈al'!1&0aeZr~T:⫾%{(n97/,WI:!YP7)]_VuT8r?%#q3JkS ! #hg W{Q.FS3~>f~?y3P_ ֛4qfI' C0~.wo˻[}ѵ=f6bzA0`?eVY~ECOA6ZHe5.+P%I\3o˭uG?vto:N{VbK&lnV32 N._pXiX[#Ўmvᑶ<2`vHǼ%π߼~E[QPe0J/62& Uk.j Z;COxnH ]Ç"YcKn#K4%DoL qẁƠb)/d abDNH6&&;2Gd ZslI+0G]&8i᣻ig(m˩rrw%cXwc k-U˔KlFSP.SAV[FSP.SERVER]FILE.OBJ;1.H;3!allDserver_secure_filePserver_grab_fileu server_grab_donen| init_home_dir      JSTRSTRSTRCPY VMS_ACCESSSTRCPYVMS_STAT VMS_FOPENVMS_STATVMS_STATEXITCHDIR | CHECK_PATH hSERVER_GET_DIR t SERVER_DEL_FILE |SERVER_DEL_DIR SERVER_MAKE_DIR XSERVER_GET_FILE SERVER_GET_PRO  SERVER_SET_PRO |SERVER_UP_LOAD HSERVER_INSTALL DSERVER_SECURE_FILE  SERVER_GRAB_FILE SERVER2FSP.SAV[FSP.SERVER]FILE.OBJ;1.H;3!;!_GRAB_DONE | INIT_HOME_DIRI$CODEPX$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNODBUGHOME_DIRCACHE_P0FPCACHEMAX_NLENALWAYS_USE_CACHE_DIRDIR_CACHE_LIMIT DIR_CACHE_DIRDCHANGEDISVAR README_FILEi $CHAR_STRING_CONSTANTSi cFPRINTFcFFLUSHPB2?P)=yyyyyyyyeyyQTP)\\\\\\\)8*[FSP.SERVER]FILECACHE.C;2+,./F 4In-0123KPWO56|`Cl7|W҃89GFHJd`oFSP.SAV[FSP.SERVER]FILECACHE.C;23IuA/* FILECACHE.C * Routines to perform file-caching with VMS-FSP V2.6.5jt * * 05-MAR-93 First Version * Merged into standard distribution on Mar 10 by jtraub@cs.cmu.edu */ #include "tweak.h" #include "server_def.h" #include "s_extern.h" /* CLEAR_CACHE * clears all entries of the file_cache to zero, * points cache_pointer to last empty cache-entry */ void clear_cache PROTO2(FPCACHE *, fpcache, FPCACHE **, cache_p) { register int i; #ifdef DEBUG printf("clear_cache: delete %d entries\n",FSP_FILE_CACHE); #endif for (i=0;i<=FSP_FILE_CACHE;i++) { fpcache[i].fp=0; fpcache[i].filename[0]=0; fpcache[i].inet_num=0; fpcache[i].port_num=0; } *cache_p= &fpcache[FSP_FILE_CACHE]; } /* FIND_CACHE * searches for an entry in the file-cache. * returns pointer to entry if found, 0 otherwise. */ FPCACHE *find_cache PROTO4(FPCACHE *, fpcache, unsigned short, port_num, unsigned long, inet_num, char *, fname) { register int i=FSP_FILE_CACHE; #ifdef DEBUG printf("find_cache: searching for %s:\n",fname); #endif while (i>=0) { /* search for file in cache */ if (port_num==fpcache[i].port_num && inet_num==fpcache[i].inet_num && !strcmp(fname,fpcache[i].filename)) /* file found in cache, return cache-pointer */ return((FPCACHE *)&fpcache[i]); i--; } return((FPCACHE *)0); } /* DELETE_CACHE * deletes current entry from the filecache (file will be closed). */ void delete_cache PROTO1(FPCACHE *, cache_p) { #ifdef DEBUG if (dbug) print RFSP.SAV[FSP.SERVER]FILECACHE.C;2ORIG;1I~8f("delete_cache: deleting ptr:%d\n",cache_p); #endif if (cache_p->fp) { fclose(cache_p->fp); /* close file */ cache_p->fp=0; /* mark entry as being emtpy */ cache_p->port_num = 0; cache_p->inet_num = 0; cache_p->filename[0]=0; } } /* ADD_CACHE * Adds an entry to the filecache. Returns pointer to next empty * entry. */ FPCACHE *add_cache PROTO6(FPCACHE *, fpcache, FPCACHE *, cache_p, unsigned short, port_num, unsigned long, inet_num, char *, fname, FILE *, fp) { cache_p->fp= fp; /* add filepointer */ strcpy(cache_p->filename,fname); /* add filename */ cache_p->inet_num=inet_num; /* add IP address */ cache_p->port_num=port_num; /* add portnumber */ /* return pointer to next cache-entry */ if (cache_p<=fpcache) return((FPCACHE *)&fpcache[FSP_FILE_CACHE]); else return(cache_p-1); } *[FSP.SERVER]FILECACHE.OBJ;1+,./F 4 -0123KPWO56|Dl7 X҃89GFHJFSP.SAVSP.SERVER]FILECACHE.OBJ;1IG;1s,6 FILECACHEV1.031-OCT-1994 12:38VAX C V3.2-044R FILECACHE clear_cache@@ find_cache\ delete_cache  add_cache> { <FCLOSESTRCMPSTRCPY CLEAR_CACHE @ FIND_CACHE  DELETE_CACHE  ADD_CACHE$CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNODBUGHOME_DIRCACHE_P0FPCACHEMAX_NLENALWAYS_USE_CACHE_DIRDIR_CACHE_LIMIT DIR_CACHE_DIRP ^PSŏ$PRBcQaBBQaB QaPЬR´(^ROW #include /**************************************************************************** * This file contains routines to maintain client database. ****************************************************************************/ #ifndef VMS extern char *realloc(), *malloc(), *ctime(); #endif extern int priv_mode; extern int no_unnamed; static HTAB *htab; /* client data base. */ static unsigned hcnt; /* number of clients. */ static unsigned htot = 0; /* available entries in the data base. */ static HTAB hzero; #define HALLOC_SIZE 30 IPrange **iptab = 0; unsigned int ipcnt = 0, iptot = 0; char *check_ip PROTO1(unsigned long, inet_num) { int i, j; unsigned char val[4]; val[0] = (inet_num & 0x000000ff) ; val[1] = (inet_num & 0x0000ff00) >> 8; val[2] = (inet_num & 0x00ff0000) >> 16; val[3]?'FSP.SAV[FSP.SERVER]HOST.C;2ES.H;1O] = (inet_num & 0xff000000) >> 24; for (i = 0; i < ipcnt; i++) { for (j = 0; j < 4; j++) if (iptab[i]->lo[j] > val[j] || val[j] > iptab[i]->hi[j]) break; if (j == 4) break; } if (i >= ipcnt) return 0; return iptab[i]->text; } #define skip_whitespace(x) do {while (*(x)&&isspace(*(x))) (x)++;} while (0) /* parse the text string as an integer and return a value between 0x00 and 0xff if there is any error in forming the value (e.g., the text string isn't an integer, or the integer value is too large) then make the text string NULL */ static unsigned char parse_ipcomponentnum PROTO1(char **, textp) { unsigned long val = 0; if (!isdigit(**textp)) { *textp = 0; } else do { val = 10 * val + (**textp - '0'); (*textp)++; } while (isdigit(**textp)); if (val > 0xff) { val = 0; *textp = 0; } return val; } /* parse a whole field of a numerical IP address; it can be one of: integer >> fixed value integer '-' integer >> range of values '*' >> same as 0-255 */ static char *parse_ipcomponent PROTO3(char *, text, unsigned char *, lo, unsigned char *, hi) { if (*text == '*') { *lo = 0x00; *hi = 0xff; return (text + 1); } *lo = parse_ipcomponentnum(&text); if (!text) return 0; if (*text == '-') { text++; *hi = parse_ipcomponentnum(&text); } else *hi = *lo; return text; } static IPrange *parse_ipnumber PROTO1(char *, text) { IPrange *reply; int i; reply = (IPrangDOFSP.SAV[FSP.SERVER]HOST.C;2ES.H;1O&e *)malloc(sizeof(IPrange)); for (i = 3; i >= 0 && !isspace(*text); i--) { if (i < 3) { if (*text != '.') return 0; else text++; } text = parse_ipcomponent(text, &reply->lo[i], &reply->hi[i]); if (!text) { free((char *)reply); return 0; } } /* fill in the gaps in the case that the loop terminated due to the occurrence of white-space */ for (; i >= 0; i--) { reply->lo[i] = 0x00; reply->hi[i] = 0xff; } return reply; } static IPrange *parse_hostname PROTO2(char *, text, int, len) { IPrange *reply; struct hostent *hostaddr; unsigned long inet_num; char *hostname; hostname = malloc(len + 1); strncpy(hostname, text, len); hostname[len] = 0; hostaddr = gethostbyname(hostname); free(hostname); if (!hostaddr) return 0; reply = (IPrange *)malloc(sizeof(IPrange)); inet_num = ((struct in_addr *)(hostaddr->h_addr))->s_addr; reply->lo[0] = reply->hi[0] = (inet_num & 0x000000ff) ; reply->lo[1] = reply->hi[1] = (inet_num & 0x0000ff00) >> 8; reply->lo[2] = reply->hi[2] = (inet_num & 0x00ff0000) >> 16; reply->lo[3] = reply->hi[3] = (inet_num & 0xff000000) >> 24; return reply; } /* parse a single line for the IP hosts file */ IPrange *parse_ipline PROTO1(char *, text) { IPrange *reply; char type = 0; char *message = 0; int messlen = 0, addresslen; /* skip the leading white-space; if the line is commented or empty, ignore it */ skip_whitespace(text); if (!*text || *text == '#') 1FSP.SAV[FSP.SERVER]HOST.C;2P.H;13Ov return 0; /* find the first non-space character after the address - this identifies the type of host this is */ message = text; while (*message && !isspace(*message)) message++; addresslen = message - text; skip_whitespace(message); if (!*message || *message == '#') { /* if a host name is mentioned by itself, then treat it as ignored or normal depending on the value of priv_mode */ type = priv_mode ? 'N': 'I'; message = ""; messlen = 0; } else { /* the first character after the host name is the type of host */ type = *message; /* skip over the white space trailing the type - the start of the associated message */ message++; /* remember skip_whitespace() is a macro... */ skip_whitespace(message); /* `remove' the trailing white-space from the message */ messlen = strlen(message); while (messlen > 0 && isspace(message[messlen-1])) messlen--; } /* if the first character of the address is numerical or '*' then parse as a numerical address, otherwise we do a host lookup on the name. */ if (*text == '*' || isdigit(*text)) reply = parse_ipnumber(text); else reply = parse_hostname(text, addresslen); if (!reply) { fprintf(stderr, "Badly formed address in config file:\n\t%s", text); return 0; } /* allocate a string to hold the message */ reply->text = malloc(1 + messlen + 1); /* type + text + '\0' */ reply->text[0] = type; strncpy(&reply->text[1], message, messlen); reply->ted'nFSP.SAV[FSP.SERVER]HOST.C;2T.H;1J;1O xt[1 + messlen] = '\0'; return reply; } /**************************************************************************** * Write out the IP table in the .IPTAB_DUMP file. ****************************************************************************/ int dump_iptab PROTO0((void)) { int i; FILE *fp; if (!(fp = fopen(".IPTAB_DUMP","w"))) return; for (i = 0; i < ipcnt; i++) { fprintf(fp, "%3d-%3d.%3d-%3d.%3d-%3d.%3d-%3d %c `%s'\n", iptab[i]->lo[3], iptab[i]->hi[3], iptab[i]->lo[2], iptab[i]->hi[2], iptab[i]->lo[1], iptab[i]->hi[1], iptab[i]->lo[0], iptab[i]->hi[0], iptab[i]->text[0], &iptab[i]->text[1]); } fclose(fp); } /**************************************************************************** * Look up the hostname for an inet number. Return NULL if not found. ****************************************************************************/ static char *find_hostname PROTO1(unsigned long, inet_num) { struct hostent *he; char *hostname; if ((he = gethostbyaddr((char*)&inet_num, sizeof(inet_num), AF_INET))) { hostname = malloc(strlen(he->h_name)+1); strcpy(hostname, he->h_name); } else hostname = 0; return hostname; } /**************************************************************************** * Returns an entry from the database corresponding to to the inet number. * A new entry is created is it is not found. * The database is a linear array of sorted structures. * Entries are searched using binary search on the array. *<"mxzea q xG;1k.9hNXT>o$%Jf#Q w?bO&]sl]0fk'>!r;5*VO7"kU20 ?U*hCec0I|kG0T 2 3Mm?:~ZYY}`x)gv TRTw2G v`|4=3𚰳; 508G~ .E|jacIuR)6]&73 r= ':zSeݦCx'¬KuC&=_qܟǤW_*֓&1A%5%:~m.(iy]ޟɽ$9<}ĉ 4@"Չ-gWyZ+;(m(-rhm(bT$c,y}8{vנ:zd~YCޜ@glu/ov/)R TN XXzB_ITq%s3Z8niPY잾Cz߲^2qA.2ZV}r {v$ٍʿ9ageneŢmzid~?p>^۲|G焳SݛJJ$"| ⳽ JmW#ƉĖg+$+LtLy.PL@2mQ[AimCM:TPCgI ]a %IoC;"V^`Iy#a \,/ ~;2X.+etlLwdS *rb-7K\S=K_n] KLfV%Xkjx*>1N$֖$]G Q5. m Gr11Fq/@u]Lg_Z[q0zRUJX&XM>n$fxh_)S:VZP* " 0XK}BsYKkp-gO"YP.L>z^Ca-h#xMUaoXfv \Gi uMa# s\ FSP.SAV[FSP.SERVER]HOST.C;2T.H;1O***************************************************************************/ HTAB *find_host PROTO1(unsigned long, inet_num) { unsigned l, h, m, i; unsigned long inum; HTAB *hs, *hd; for(l = 0, h = hcnt-1; (m = (l + h) >> 1) != l; ) { /* binary search */ inum = htab[m].inet_num; if(inum > inet_num) h = m; else if(inum < inet_num) l = m; else { /* if we *need* reverse naming and we haven't already got one then try looking it up again. */ if (no_unnamed && !htab[m].hostname) htab[m].hostname = find_hostname(inum); htab[m].acc_cnt++; return(htab+m); } } if(htab[m].inet_num < inet_num) m++; /* locate first entry that is > */ if((hcnt+1) > htot) { /* need more space */ htot += HALLOC_SIZE; /* add HALLOC_SIZE entries at a time */ if(!(htab = (HTAB *) realloc(htab,sizeof(HTAB)*htot))) { perror("grow_htab realloc"); exit(1); } } for(i = hcnt-m, hs = htab+hcnt, hd=htab+hcnt+1; i--; *--hd = *--hs); htab[m]=hzero; htab[m].inet_num = inet_num; htab[m].last_key = get_next_key(); htab[m].next_key = get_next_key()+1; htab[m].hostname = find_hostname(inet_num); hcnt++; return(htab+m); } /**************************************************************************** * Client database initialization routine. ****************************************************************************/ int init_htab PROTO0((void)) /* always have 2 entries -- 0, MAXINT */ { FILE *fp; HTAB *hp; char buf[1024]; unsi_[lFSP.SAV[FSP.SERVER]HOST.C;2T.H;1O=gned int i1,i2,i3,i4; unsigned long hnum; if(!(htab = (HTAB *) malloc(sizeof(HTAB)*HALLOC_SIZE))) { perror("grow_htab malloc"); exit(1); } htab[0] = hzero; htab[1] = hzero; htab[1].inet_num = ~0; hcnt = 2; htot = HALLOC_SIZE; } /**************************************************************************** * Write out the client table in the .HTAB_DUMP file. ****************************************************************************/ int dump_htab PROTO0((void)) { int i; FILE *fp; HTAB *hp; if(!(fp = fopen(".HTAB_DUMP","w"))) return; for(i = hcnt-2, hp = htab+1; i--; hp++) { fprintf(fp,"%d.%d.%d.%d\t%5d %s", ((unsigned char *)(&hp->inet_num))[0], ((unsigned char *)(&hp->inet_num))[1], ((unsigned char *)(&hp->inet_num))[2], ((unsigned char *)(&hp->inet_num))[3], hp->acc_cnt, ctime((time_t *) &(hp->last_acc))); } fclose(fp); } *[FSP.SERVER]HOST.OBJ;1+,. /F 4 V -0123KPWO 56!Dl7X҃89GFHJeFSP.SAV[FSP.SERVER]HOST.OBJ;1H;1 s1HOSTV1.031-OCT-1994 12:38VAX C V3.2-044PBadly formed address in config file: %s*P.IPTAB_DUMP6Pw8P%3d-%3d.%3d-%3d.%3d-%3d.%3d-%3d %c `%s' cPgrow_htab reallocuPgrow_htab mallocP.HTAB_DUMPPwP%d.%d.%d.%d %5d %sP ^WЬSSˏSRRRRˏSRRRRʏSSRRUg=VPSEfTdRQPa a`QPSSUUgUgPREbRP<^UTެSгRbRRRBeԳ( TRгQaP0PRPTQгP`PPP@eTTԼTPP| ^T*  P޼UެޮVSЮRRRRBdԾ,P SRоQaP0PRPSQЮRPPP@dSSԾSeլPЬRb-eR޼ UެnnVSМnRRRRBdԾ) SRоQaP0PRPSQnRPPP@dSSԾSe P^T VAXC$MALLOC_OPTPSRXPPP@dJRЬP`.PPBBcݬϫP S VAXC$FREE_OPTPRPPP@dRPBcBRSP^ެRb~VAXC$MALLOC_OPTPSbݬSSTRNCPYbP@cS GETHOSTBYNAMEPRS VAXC$FREE_OPTRP VAXC$MALLOC_OPTPQвP`TTaˏTPPPPPˏTPPPPPˏTPPPPPQP^XS&PPP@cP֬PPP@cꕼ#PЬRb#bPPP@cPRb bPPP@cìRYb#bPPP@cPRb bPPP@cbTT#NPIPPWhRUdPTWRb"bPPP@cPRb bPPP@cRSTRLENPU)UP@bPPP@cUUP@bPPP@cЬVf* fPPP@c FSP.SAV[FSP.SERVER]HOST.OBJ;111  VρPT YVPTTݬߨFPRINTFPU~VAXC$MALLOC_OPTPWURФPSTRNCPYURBTP|^SVTߣ6ߣ*FOPENPURfDd\BlPР\l~~`~~~~~~~ߣ8U FPRINTFRRfUFCLOSEP ^߬ GETHOSTBYADDRPR$bSTRLENPPVAXC$MALLOC_OPTPSbSSTRCPYSSPP^[XVWVWRRYYRRVgTYSCRbUUdYW;PUdYV/PkhRCRb UQPbYShRCRbhSPVWRRYYRRVYRhSBcRbYRR-~SR HOSTcheck_ipparse_ipcomponentnumbparse_ipcomponent parse_ipnumberparse_hostname@ parse_ipline dump_iptabl find_hostnameB find_hostp  init_htabXx dump_htab~ . C$V_CTYPEDEFS GETHOSTBYNAME GETHOSTBYADDR GET_NEXT_KEYPERRORFPRINTFFCLOSEFOPEN VAXC$FREE_OPTVAXC$MALLOC_OPT VAXC$FREE_OPTSTRNCPYVAXC$MALLOC_OPTSTRNCPYVAXC$MALLOC_OPTSTRLENSTRCPYVAXC$MALLOC_OBoFSP.SAV[FSP.SERVER]HOST.OBJ;1J;1 !PTSTRLENEXITVAXC$REALLOC_OPTEXITVAXC$MALLOC_OPTCTIME CHECK_IP @ PARSE_IPLINE | DUMP_IPTAB  FIND_HOST | INIT_HTAB x| DUMP_HTAB$CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNODBUGHOME_DIRCACHE_P0FPCACHEMAX_NLENALWAYS_USE_CACHE_DIRDIR_CACHE_LIMIT DIR_CACHE_DIR_CTYPE_ PRIV_MODE NO_UNNAMEDIPTABIPCNTIPTOT$CHAR_STRING_CONSTANTSVAXC$REALLOC_OPTPhcPERROREXITШSYSZSRhRWhRRVZRZRPVW(gfZRZRYV( FFRЬbhR GET_NEXT_KEYFRPbhT GET_NEXT_KEYPRRSF RSbhRFRݬZPbVP|^V\<:~VAXC$MALLOC_OPTPlߦuPERROREXIT( lR( lR|^TUđĆFOPENPVPeRP\PS\8CTIMEP<~~~~b~ēVFPRINTFRS\S\VFCLOSEt3FSP.SAV[FSP.SERVER]LIB.C;2LE.;14N *[FSP.SERVER]LIB.C;2+,./F 4N -0123KPWO56|Cl7 )X҃89GFHJ /*********************************************************************\ * Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. * \*********************************************************************/ #include "tweak.h" #include "server_def.h" #include "s_extern.h" #include "co_extern.h" extern int errno; #ifdef VMS #define malloc VAXC$MALLOC_OPT #define free VAXC$FREE_OPT extern int isvar; /* in server_file.c */ #endif extern int no_unnamed; static int myport = 0; static int myfd; static int interrupted = 0; static int thc[THCCOUNT]; static time_t thcbase; extern int priv_mode; extern unsigned int max wFSP.SAV[FSP.SERVER]LIB.C;2LE.;14N thcallowed; static void server_interrupt PROTO1(int, signum) { interrupted = 1; #ifndef RELIABLE_SIGNALS signal(SIGALRM,server_interrupt); #endif } /**************************************************************************** * This is the message filter. It is called by main with a timeout value. * If timeout is -1, it will never time out. Otherwise, it waits for a * message. If timed out, it returns. Otherwise it pass it through checks. * Those message that passed get sent to the dispatch loop. ****************************************************************************/ int server_loop PROTO1(unsigned long, timeout) { unsigned long cur_time; HTAB *hp; char *ir; UBUF rbuf; struct sockaddr_in from; unsigned int u, sum, mask, rlen, rkey; int retval, bytes, old; unsigned char *s, *d, *t; while(1) { mask = 1 << myfd; if(interrupted) { dump_htab(); dump_iptab(); interrupted = 0; } retval = _x_select(&mask, timeout); if(retval == -1) { if(errno == EINTR) continue; perror("select"); exit(1); } if(retval == 1) { /* an incoming message is waiting */ bytes = sizeof(from); if((bytes = recvfrom(myfd,(char*)&rbuf,sizeof(rbuf),0, (struct sockaddr *)&from, &bytes)) < UBUF_HSIZE) continue; rlen = BB_READ2(rbuf.bb_len); if((int) (rlen+UBUF_HSIZE) > bytes) continue; /* truncated. */ if(!(ir = check_ip(from.sin_addr.s_addr))) ir = priv_mode ? "DFSP service not av [FSP.SAV[FSP.SERVER]LIB.C;2LE.;14N0ailable": "N"; switch (*ir) { case 'D': /* disabled host - return error message */ if (rbuf.cmd == CC_BYE) break; send_error(&from,&rbuf,&ir[1]); continue; case 'I': /* ignore the host */ continue; case 'N': /* normal host */ break; default: fputs("check_ip() returned illegal host type\n",stderr); exit(0); } if(!(hp = find_host(from.sin_addr.s_addr))) { fputs("find host failed\n",stderr); exit(0); } if(hp->hostname == 0 && no_unnamed) { send_error(&from,&rbuf, REVERSE_ERR_MSG); continue; } old = 0; cur_time = time((time_t *) 0); rkey = BB_READ2(rbuf.bb_key); if(hp->next_key != rkey) { if(!hp->active) hp->last_key = hp->next_key = rkey; else { if(hp->last_key == rkey) { if(cur_time < hp->last_acc + 3) continue; old = 1; } else { if(cur_time < hp->last_acc + 60) continue; } } } hp->active = 1; hp->last_acc = cur_time; s = (unsigned char *) &rbuf; d = s + bytes; u = rbuf.sum; rbuf.sum = 0; for(t = s, sum = bytes; t < d; sum += *t++); sum = (sum + (sum >> 8)) & 0xff; if(sum != u) continue; /* wrong check sum */ server_get_packet(bytes,&rbuf,old,hp,&from); } else return(0); /* got a timeout */ } } /**************************************************************************** * Routine to return a 16-bit key with random number in the first 8-bits and * zero in the second 8-bits. ***** cFSP.SAV[FSP.SERVER]LIB.C;2;1.;14Np ***********************************************************************/ unsigned long get_next_key PROTO0((void)) { unsigned long k; k = random(); k = k ^ (k >> 8) ^ (k >> 16) ^ (k << 8); return(k & 0xff00); } /**************************************************************************** * Generic routine for sending reply back to clients. * from: client address structure. * ub: pointer to the message buffer. * len1, len2: lengths of the two data regions in the message buffer. ****************************************************************************/ int server_reply PROTO4(struct sockaddr_in *, from, UBUF *, ub, int, len1,int, len2) { unsigned char *s, *t, *d; unsigned sum; time_t thcclock; int i, thcsum; if(dbug) fprintf(stderr,"snd (%c,%d,%d,%lu) ---> %d.%d.%d.%d\n", ub->cmd, len1, len2, BB_READ4(ub->bb_pos), ((unsigned char *)(&(from->sin_addr.s_addr)))[0], ((unsigned char *)(&(from->sin_addr.s_addr)))[1], ((unsigned char *)(&(from->sin_addr.s_addr)))[2], ((unsigned char *)(&(from->sin_addr.s_addr)))[3]); BB_WRITE2(ub->bb_len,len1); ub->sum = 0; s = (unsigned char *) ub; d = s + (len1 + len2 + UBUF_HSIZE); for(t = s, sum = 0; t < d; sum += *t++); ub->sum = sum + (sum >> 8); /* * Check that we do not exceed maximum throughput allowed before sending */ if(maxthcallowed) for(;;) { time(&thcclock); if(thcclock > thcbase) { if(thcclock>thcbase+THCCOUNT) { int i; for(i = 0; i <  3FFSP.SAV[FSP.SERVER]LIB.C;2BJ;1;4N THCCOUNT; thc[i++]=0); thcbase = thcclock; } else { while (thcclock > thcbase) { for(i = THCCOUNT-1; i>0; i--) thc[i] = thc[i-1]; thc[0] = 0; thcbase++; } } } for(i = 0, thcsum = 0; i< THCCOUNT; thcsum+= thc[i++]); thcsum /= THCCOUNT; if(dbug) { fprintf(stderr, "Average throughput: %d bytes/s | ", thcsum); for (i= THCCOUNT-1;i>=0;i--) fprintf(stderr,"%5d ",thc[i]) ; fprintf(stderr,"\n") ; } if(thcsum <= maxthcallowed) { thc[0]+=(len1+len2+UBUF_HSIZE); break; } if(dbug) fprintf(stderr, "Throughput too high, waiting.\n"); sleep(1); } if(sendto(myfd,(char *)ub,(len1 + len2 + UBUF_HSIZE),0, (struct sockaddr *)from,sizeof(struct sockaddr_in)) == -1) { perror("sendto"); exit(1); } } /**************************************************************************** * Send an error string. ****************************************************************************/ int send_error PROTO3(struct sockaddr_in *, from, UBUF *, ub, char *, msg) { char *d; for(d = ub->buf; *d++ = *msg++; ); ub->cmd = CC_ERR; server_reply(from,ub,d-ub->buf,0); } /**************************************************************************** * Send a block of data read from the file 'fp'. Offset information is * contained in the input ub message buffer, which also doubles as the output * message buffer. ****************************************************************************/ void send_file PROTO5(struct sockaddr_in *, fro zmtp  4N"$&[|N}P%/!.EiXӅVZU|;2>@ -|s?/u@V<~p%vgo/?Xbroc~@ݹ^ⲍ,mþf{,:i>R>)'"r#8'+H!6KJ Wy@QEZdx}t.קND sp'KÏ-\V @U%1̍{jDV2R 02@իy9;Pg[UsIjY8mA;y.)v24` ~kR8*Rn(c-1۲@yގkߺ1ʧ2_-MV8$ܺsB0FJu~;fѕ)Nj ҂QV3A@g9~up!"$ &*o(hW$Ƅf0R2G b|[v7^uFO۟| dᅢ}-kBo'!OjqS=6cXی=}jwC6vFҽ>#+Y¦Dyg09@lR\b TVa]xm7KSq1y8w_P$c3lNV=}B![ eq c"dڼ.dA˰`lYϴ W$Z;Qݻ1C^?8|?#hȦh9OV^OɱHUX}0CT;pJ"Y@IS. 7A~@]QhAW2hܔՅda{|`b- -lã䑣F^X qIu!^qK]bng(N(V`La;=^q^h5P \VK4*8edH`v@4 F=0a(y±fnmmg6M~n\pt,~6?(Ato`8s JGHs?g5;JF%Am 0j{GB`=>"\l?a[""'p~c! y3Im_I]YӐB"t!&v^ )+9Ϫh%sHFݫ=pv xsm!c/!J96GFSP.SAV[FSP.SERVER]LIB.C;21;5OBJ;2NJ.m, UBUF *, ub, FILE *, fp, int, has_len, char *, lp) { int bytes, len; unsigned long pos; #ifdef VMS char *buf; /* temp buffer for seek on var.rec.format files */ register int rtime = 5; /* max number of fread retries (var.rec.) */ #endif if(has_len == 2) { /* recover length field if it exists */ len = (len=lp[0] << 8) + lp[1]; if(len > UBUF_SPACE || len < 0) len = UBUF_SPACE; } else len = UBUF_SPACE; /* use default if it doesn't exist */ pos = BB_READ4(ub->bb_pos); #ifdef VMS if(isvar) { /* fseek fails on files in variable record format */ rewind(fp); buf=(char *)malloc(pos); bytes = fread(buf,1, pos, fp); /* dummy read pos bytes */ free(buf); } else if(pos != ftell(fp)) fseek(fp, pos, 0); #else fseek(fp,pos,0); #endif bytes = fread(ub->buf, 1, len, fp); #ifdef VMS /* some stupid VMS-bug in fread */ while (!bytes && errno==65535 && rtime) { rtime--; bytes=fread(ub->buf,1, len, fp); } #endif server_reply(from,ub,bytes,0); } /**************************************************************************** * The two UDP socket initialization routines. One for running alone. * The other for running under inetd. ****************************************************************************/ void init_network PROTO1(int, port) { int i; /* init throughput control */ if(maxthcallowed) { for(i = 0; i %d.%d.%d.%d PAverage throughput: %d bytes/s | P%5d P PThroughput too high, waiting. Psendto Psocket openPlistening on port %d P^Pμ^VYZTxդ DUMP_HTAB DUMP_IPTABԤݬ߭ _X_SELECTPRRifPERROREXITR1߭< ~ݤRECVFROMPѭ <~NTOHSP PP1fCHECK_IPPUަ RަRRUePPD P1?PJ1XޮSЮP PPQPRЮPc`aRQRЮPc`a퐏@ЮU PPR~ݮX SERVER_REPLY1P1Pjߦ$FPUTSEXIT FIND_HOSTPUjߦKFPUTSEXITեqiX ަ]ޮSЮ P PPQPRЮPc`aRQRЮPc`a퐏@ ЮP PPR~ݮX SERVER_REPLY1PXTIMEP<~NTOHSP[< PP[; [ [,P<PP[PѮP1X<PѮP1ЮRRSnRQЭWQS PPPWQSWPWPˏPWWn19UXݭSERVER_GET_PACKET1 P^ SEND_ERROR SERVER_REPLY _X_SELECT_X_UDPRANDOMSERVER_GET_PACKET SEND_ERROR DUMP_HTAB FIND_HOST DUMP_IPTABCHECK_IPDUPRECVFROMSENDTOSLEEPSIGNALREWINDPERRORFTELLFSEEKFFLUSHFPRINTFFREADFPUTSTIMENTOHSEXITEXITTIMEHTONSNTOHL VAXC$FREE_OPTVAXC$MALLOC_OPTNTOHLEXITTIME FSP.SAV[FSP.SERVER]LIB.OBJ;1ORIG;1  SERVER_LOOP  GET_NEXT_KEYRANDOMPRRPRPR\\PxR\\PRˏRP^V[ZWSj:ЬR~~~~ЬTݤNTOHLPݬݬ d~ƕg FPRINTFЬUXݬ HTONSPh R RURQUTYTQPRRYTQЬTYRYRRk1P߭TIMEЭUУ4TUTT TRURPPPRPB P Э42PUT*P Rޣ0Q4PСQPRԣ ֣4ѭ4PUP PRPB UP  Uj9UƺgFPRINTF Tޣ4RݢgFPRINTFRTgFPRINTFUk R RR !j gFPRINTFSLEEP1 Pݬ R R~ݬݣSENDTOPPERROREXIT^ЬP PPQPRЬ P֬ `a Ь P֬ `ЬQ@a PPR~Q SERVER_REPLY^XRѬ'ЬScPxPQPQPVVV <V<VЬSݣNTOHLPT2ݬ REWINDTVAXC$MALLOC_OPTPSݬ TSFREADS VAXC$FREE_OPTݬ FTELLTPTݬ FSEEKެ UeVެWgS FREADPT7h.R*SReV FREADPT hRTR LIBserver_interrupt server_loop get_next_key0L server_reply< send_errorL send_file init_network< init_inetd'   S FSP.SAV[FSP.SERVER]LIB.OBJ;1;1 * L SERVER_REPLY < SEND_ERROR  SEND_FILE  INIT_NETWORK < INIT_INETDc$CODE8$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNODBUGHOME_DIRCACHE_P0FPCACHEMAX_NLENALWAYS_USE_CACHE_DIRDIR_CACHE_LIMIT DIR_CACHE_DIRISVAR NO_UNNAMED PRIV_MODE MAXTHCALLOWED+$CHAR_STRING_CONSTANTS! SERVER_REPLY ^SRQPQPQ@ Q ߢ4TIMEЬbb_X_UDPPѢ PERROREXIT bFPRINTFFFLUSHSIGNALP^RDUPPϧSIGNALP"*[FSP.SERVER]MAIN.C;5+,.$/F 4N$$;-0123KPWO%56|ACl7x,X҃89GFHJE=FSP.SAV[FSP.SERVER]MAIN.C;5;2J;2N$* /*********************************************************************\ * Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) * * * * You may copy or modify this file in any manner you wish, provided * * that this notice is always included, and that you hold the author * * harmless for any loss or damage resulting from the installation or * * use of this software. * \*********************************************************************/ #include "tweak.h" #include "server_def.h" #include "s_extern.h" #include "version.h" #ifdef __STDC__ #include #else #include #endif #ifdef VMS #define FSP_STAT vms_stat #else #define FSP_STAT stat #endif #define ACTIONLOG0(X) \ do{ if(!old) { \ fsplogs(); \ fsploga("%s %s", inetstr, (X)); \ } } while (0) #define ACTIONLOG1(X) \ do { if(!old) { \ fsplogs(); \ fsploga("%s %-8s /%.*s", inetstr, (X), l1, s1); \ } } while (0) #define ACTIONINFO(F) \ do { if(!old) { \ fsploga F; \ } } while (0) #define ACTIONFAILED(M) \ do { if(!old) { \ fsploga(": ERROR %s\n", (M)); \ fsplogf(); \ } } while (0) #define ACTIONOK() \ do { if(!old) { \ fsploga("\n"); \ fsplogf(); \ } } while (0) #ifdef VMS /* for the freopen() function */ # define NULL_DEV "nl:" #else # define NULL_DEV "/dev/null" #endif int max_nlen = FILE_NAME_LIMIT; int inetd_mode = 0; int dir_cache_limit = MAX_DIR_CAjWFSP.SAV[FSP.SERVER]MAIN.C;5;2J;2N$+&CHE_COUNT; int logfd = -1; /* logfile file descriptor */ extern int daemonize; extern int dbug; extern int logging; extern int priv_mode; extern int read_only; extern int no_unnamed; extern int udp_port; extern int run_uid; extern char *logname; extern unsigned int maxthcallowed; char *config_file = 0 ; /**************************************************************************** * A slightly better logging function.. It now takes a format string and * * any number of args. * * The file is opened and closed so that I can run a cron job to summarize * * the file, then remove the already summarized portion automatically * * without worrying about the file descriptors pointing to a file that no * * longer really exists. * ****************************************************************************/ #define LOGBUFFER 1024 static char logbuf[LOGBUFFER]; /* buffer for log message */ static int logpos = 0; /* current log message length */ /* append some text to the log message */ #ifdef __STDC__ static void fsploga(const char *fmt, ...) #else static void fsploga(va_alist) va_dcl #endif { #ifdef __STDC__ va_list args; #else char *fmt; va_list args; #endif if(logging && logfd >= 0) { /* don't log if we don't have a logfile */ #ifdef __STDC__ va_start(args, fmt); #else va_start(args); fmt = va_arg(args, char *); #endif vsprintf(logbuf + logpos, fmt, args); logpos  FSP.SAV[FSP.SERVER]MAIN.C;5;1N$+= strlen(logbuf + logpos); va_end(args); } } /* add a datestamp to the log message */ static void fsplogs PROTO0((void)) { struct stat sb; if(logging && logfd >= 0 && FSP_STAT(logname, &sb) == -1) { close(logfd); #ifdef VMS if((logfd = vms_open(logname, "w")) < 0) #else if((logfd = open(logname, O_WRONLY | O_APPEND | O_CREAT, 0644)) < 0) #endif { perror(logname) ; logging = 0; } } if(logging && logfd >= 0) { /* don't log if we don't have a logfile */ time_t sectime; /* current time in seconds */ int timelen; char *timestr; sectime = time((time_t *)0); timestr = (char *)ctime(§ime); timelen = strlen(timestr) - 1; /* strip the CR */ timestr[timelen] = '\0'; strcpy(logbuf + logpos, timestr); logbuf[timelen] = ' '; logpos += timelen + 1; } } /* flush the log message to file */ static void fsplogf PROTO0((void)) { if(logging && logfd >= 0) { /* don't log if we don't have a logfile */ write(logfd, logbuf, logpos); logpos = 0; } } /**************************************************************************** * Send version information. * Note: no bounds checking is currently performed. As version information * grows, this will become required. ****************************************************************************/ static void server_show_version PROTO2(struct sockaddr_in *, from, UBUF *, ub) { char buf[UBUF_SPACE], verflags = 0; strcpy(buf, VERSION_STR); strcat(buf, "\n"); if(logging) verflags |= VER_lY~FSP.SAV[FSP.SERVER]MAIN.C;5BJ;1N$f LOG; if (read_only) verflags |= VER_READONLY; if (no_unnamed) verflags |= VER_REVNAME; if (priv_mode) verflags |= VER_PRIVMODE; if (maxthcallowed) verflags |= VER_THRUPUT; strcpy(ub->buf, buf); BB_WRITE4(ub->bb_pos,VER_BYTES); ub->buf[strlen(ub->buf)] = '\0'; ub->buf[strlen(ub->buf)+1] = verflags; if(maxthcallowed) { BB_WRITE4(ub->bb_pos,VER_BYTES+4); ub->buf[strlen(ub->buf)+2] = (char)((maxthcallowed & 0xff000000)>>24); ub->buf[strlen(ub->buf)+3] = (char)((maxthcallowed & 0x00ff0000)>>16); ub->buf[strlen(ub->buf)+4] = (char)((maxthcallowed & 0x0000ff00)>>8); ub->buf[strlen(ub->buf)+5] = (char)(maxthcallowed & 0x000000ff); server_reply(from, ub, strlen(ub->buf)+1, VER_BYTES+4); } else { server_reply(from, ub, strlen(ub->buf)+1, VER_BYTES); } } /**************************************************************************** * This is the dispatch loop for message that has been accepted. * bytes: size of the message received. * ub: pointer to the message buffer. * old: true if this message contains old sequence number (retransmit). * hp: pointer to the entry for the client host who sent this message. * from: pointer to the socket address structure of the client host. ****************************************************************************/ void server_get_packet PROTO5(int, bytes, UBUF *, ub, int, old, HTAB *, hp, struct sockaddr_in *, from) { unsigned long inet_num, pos; unsigned short port_num; unsigned l1, l2; chFSP.SAV[FSP.SERVER]MAIN.C;5.C;1N$w ar *s1, *s2, *pe, inetstr_buf[128], *inetstr; FILE *fp; PPATH pp; struct stat sd; /* for logging of filesize */ pos = BB_READ4(ub->bb_pos); l1 = BB_READ2(ub->bb_len); l2 = bytes - l1 - UBUF_HSIZE; s1 = ub->buf; s2 = ub->buf + l1; /* put remote inet_number in a var, for logging purposes */ if (dbug || logging) { if (hp->hostname) inetstr = hp->hostname; else { sprintf(inetstr_buf,"%d.%d.%d.%d", ((unsigned char *)(&hp->inet_num))[0], ((unsigned char *)(&hp->inet_num))[1], ((unsigned char *)(&hp->inet_num))[2], ((unsigned char *)(&hp->inet_num))[3]); inetstr = inetstr_buf; } } if(dbug) fprintf(stderr,"rcv (%c,%d,%d,%lu) <--- %s\n", ub->cmd, l1, l2, pos, inetstr); if(!old) { hp->last_key = hp->next_key; hp->next_key = get_next_key() + ((hp->last_key+1) & 0x00ff); } BB_WRITE2(ub->bb_key,hp->next_key); inet_num = hp->inet_num; port_num = from->sin_port; switch(ub->cmd) { case CC_VERSION: if(logging & L_VER) ACTIONLOG0("VERSION"); server_show_version(from, ub); if(logging & L_VER) ACTIONOK(); return; case CC_BYE: if(!old) hp->active = 0; server_reply(from,ub,0,0); return; case CC_GET_DIR : if (!pos && (logging & L_GETDIR)) ACTIONLOG1("GETDIR"); if((pe = check_path(s1,l1,&pp)) || (pe = server_get_dir(&pp, inet_num, &fp))) { if (pos && (logging & L_ERR) && (logging & L_GETDIR)) ACTIONLOG1("GETDIR"); if ((logging & L_ERR) && (loggK&4 `aqf1N-MZԡZAYOja똡"ql{GA/"HJih6Vq5; \- {xnR (h0-騙u-sVΰ%+YHIGR 3cl %8n59*_Eg)= 6_MDdDHVm?!& .lG|Gyc%|%Ŏz6?5j.Nl34qw7=w$UDY;]FgfdqawX+ͤFwc tARZ+Z3eb(5pz?Vfv +]"ZvvN.#uP"DU(ү^؃ML`8GNrHѺzO#7]?DZrf+EK`c$B%ҥ;EaKJE1 ċmy4J (oTC PEZ]g%Η,HAUdhE׺4a$LBRVg'] G?S!P68чxuw8UT[ީ,L2woJ&,%q>q]opeiviK{aoTfDBx@* WrQQ ¼uưS[X ɀSPnsBT]xkcTQo Z\ȭP,~t](A<+9Q;v;rj>J6db4Ac^hd+EN\ H[i{_{d ?eCz۞hvVHw޲8 IGC.G4%t̹jd-\(?HoZq{K"WKN{@a0;,H YWy}Qo/_ wZ XJTtM;T_qP*2#miwPZ2:!apQylJekH[ d9o"d*@wrl /> Sw@|d ,TBR c-H )5p䋋m$A9pӭ[j1]3JqьLp\xSF똈Ė)eq1ouNOCu{bhJ)wJ7~sI9j722+*Ô" ,Bʊ$G"=eKCFSP.SAV[FSP.SERVER]MAIN.C;5;1BJ;1N$Xing & L_GETDIR)) ACTIONFAILED(pe); else if (!pos && (logging & L_GETDIR)) ACTIONOK() ; send_error(from, ub, pe); return; } send_file(from,ub,fp,l2,s2); fclose(fp); if (!pos && (logging & L_GETDIR)) ACTIONOK(); return; case CC_GET_FILE: if (!pos && (logging & L_GETFILE)) ACTIONLOG1("GETFILE"); if((pe = check_path(s1,l1,&pp)) || (pe = server_get_file(&pp, &fp, inet_num, port_num))) { if (pos && (logging & L_ERR) && (logging & L_GETFILE)) ACTIONLOG1("GETFILE"); if ((logging & L_ERR) && (logging & L_GETFILE)) ACTIONFAILED(pe); else if (!pos && (logging & L_GETFILE)) ACTIONOK() ; send_error(from, ub, pe); return; } if (!pos) { FSP_STAT(pp.fullp,&sd); /* log filesizes */ if (logging & L_GETFILE) ACTIONINFO((" (%d)",sd.st_size)); } send_file(from,ub,fp,l2,s2); if (!pos && (logging & L_GETFILE)) ACTIONOK(); return; case CC_DEL_FILE: if(logging & L_DELFILE) ACTIONLOG1("DELFILE"); if (read_only) { if((logging & L_ERR) && (logging & L_DELFILE)) ACTIONFAILED("Permission denied"); else if (logging & L_DELFILE) ACTIONOK() ; send_error(from, ub, "Permission denied"); return; } if(!old) if((pe = check_path(s1,l1,&pp)) || (pe = server_del_file(&pp,inet_num))) { if((logging & L_ERR) && (logging & L_DELFILE)) ACTIONFAILED(pe); else if (logging & L_DELFILE) ACTIONOK() ; send_error(from, ub, pe) ; return; } sFSP.SAV[FSP.SERVER]MAIN.C;5D.1;1N$erver_reply(from,ub,0,0); if(logging & L_DELFILE) ACTIONOK(); return; case CC_DEL_DIR : if(logging & L_DELDIR) ACTIONLOG1("DELDIR"); if (read_only) { if((logging & L_ERR) && (logging & L_DELDIR)) ACTIONFAILED("Permission denied"); else if (logging & L_DELDIR) ACTIONOK() ; send_error(from, ub, "Permission denied") ; return; } if(!old) if((pe = check_path(s1,l1,&pp)) || (pe = server_del_dir(&pp,inet_num))) { if((logging & L_ERR) && (logging & L_DELDIR)) ACTIONFAILED(pe); else if (logging & L_DELDIR) ACTIONOK() ; send_error(from, ub, pe) ; return; } server_reply(from,ub,0,0); if(logging & L_DELDIR) ACTIONOK(); return; case CC_UP_LOAD : if (!pos || read_only) { if(logging & L_UPLOAD) ACTIONLOG0("UPLOAD"); if(read_only) { if((logging & L_ERR) && (logging & L_UPLOAD)) ACTIONFAILED("Permission denied"); else if (logging & L_UPLOAD) ACTIONOK() ; send_error(from, ub, "Permission denied") ; return; } } if(!old) if(pe = server_up_load(s1,l1,pos, inet_num,port_num)) { if (pos && (logging & L_ERR) && (logging & L_UPLOAD)) ACTIONLOG0("UPLOAD"); if ((logging & L_ERR) && (logging & L_UPLOAD)) ACTIONFAILED(pe); else if (!pos && (logging & L_UPLOAD)) ACTIONOK() ; send_error(from, ub, pe) ; return; } server_reply(from,ub,0,0); if(!pos && (logging & L_UPLOAD)) ACTIONOK(); return; case CC_INSTALL : if(logW>BFSP.SAV[FSP.SERVER]MAIN.C;5D.1;1N$ging & L_INSTALL) ACTIONLOG1("INSTALL"); if (read_only) { if((logging & L_ERR) && (logging & L_INSTALL)) ACTIONFAILED("Permission denied"); else if (logging & L_INSTALL) ACTIONOK() ; send_error(from, ub, "Permission denied") ; return; } if(!old) if((pe = check_path(s1,l1,&pp)) || (pe = server_install(&pp,inet_num,port_num))) { if((logging & L_ERR) && (logging & L_INSTALL)) ACTIONFAILED(pe); else if (logging & L_INSTALL) ACTIONOK() ; send_error(from, ub, pe) ; return; } server_reply(from,ub,0,0); if(logging & L_INSTALL) ACTIONOK(); return; case CC_MAKE_DIR: if(logging & L_MAKEDIR) ACTIONLOG1("MAKEDIR"); if (read_only) { if((logging & L_ERR) && (logging & L_MAKEDIR)) ACTIONFAILED("Permission denied"); else if (logging & L_MAKEDIR) ACTIONOK() ; send_error(from, ub, "Permission denied") ; return; } if(!old) if((pe = check_path(s1,l1,&pp)) || (pe=server_make_dir(&pp,inet_num))) { if((logging & L_ERR) && (logging & L_MAKEDIR)) ACTIONFAILED(pe); else if (logging & L_MAKEDIR) ACTIONOK() ; send_error(from, ub, pe) ; return; } if(pe = server_get_pro(&pp,s1,inet_num)) { if((logging & L_ERR) && (logging & L_MAKEDIR)) ACTIONFAILED(pe); else if (logging & L_MAKEDIR) ACTIONOK() ; send_error(from, ub, pe) ; return; } server_reply(from,ub,strlen(ub->buf)+1,0); if(logging & L_MAKEDIR) ACTIONOK(); return; case C$[2FSP.SAV[FSP.SERVER]MAIN.C;5.1;1N$C_GET_PRO : if(logging & L_GETPRO) ACTIONLOG1("GETPRO"); if((pe=check_path(s1,l1,&pp)) || (pe=server_get_pro(&pp,s1,inet_num))) { if((logging & L_ERR) && (logging & L_GETPRO)) ACTIONFAILED(pe); else if (logging & L_GETPRO) ACTIONOK() ; send_error(from, ub, pe) ; return; } BB_WRITE4(ub->bb_pos,PRO_BYTES); server_reply(from,ub,strlen(ub->buf)+1,PRO_BYTES); if(logging & L_GETPRO) ACTIONOK(); return; case CC_SET_PRO : if(logging & L_SETPRO) ACTIONLOG1("SETPRO"); if(read_only) { if((logging & L_ERR) && (logging & L_SETPRO)) ACTIONFAILED("Permission denied"); else if (logging & L_SETPRO) ACTIONOK() ; send_error(from, ub, "Permission denied") ; return; } if(!old) if((pe = check_path(s1,l1,&pp)) || (pe = server_set_pro(&pp,s2,inet_num))) { if((logging & L_ERR) && (logging & L_SETPRO)) ACTIONFAILED(pe); else if (logging & L_SETPRO) ACTIONOK() ; send_error(from, ub, pe) ; return; } if(pe = server_get_pro(&pp,s1,inet_num)) { if((logging & L_ERR) && (logging & L_SETPRO)) ACTIONFAILED(pe); else if (logging & L_SETPRO) ACTIONOK() ; send_error(from, ub, pe) ; return; } BB_WRITE4(ub->bb_pos,PRO_BYTES); server_reply(from,ub,strlen(ub->buf)+1,PRO_BYTES); if(logging & L_SETPRO) ACTIONOK(); return; case CC_GRAB_FILE: if (!pos || read_only) { if(logging & L_GRABFILE) ACTIONLOG1("GRABFILE"); if (read_only) { if((logging & L_ERzFSP.SAV[FSP.SERVER]MAIN.C;5.1;1N$+/R) && (logging & L_GRABFILE)) ACTIONFAILED("Permission denied"); else if (logging & L_GRABFILE) ACTIONOK() ; send_error(from, ub, "Permission denied") ; return; } } if(pe = check_path(s1,l1,&pp)) { if (pos && (logging & L_ERR) && (logging & L_GRABFILE)) ACTIONLOG1("GRABFILE"); if((logging & L_ERR) && (logging & L_GRABFILE)) ACTIONFAILED(pe); else if (!pos && (logging & L_GRABFILE)) ACTIONOK() ; send_error(from, ub, pe) ; return; } if(!old && !pos) if(pe=server_secure_file(&pp,inet_num,port_num)) { if((logging & L_ERR) && (logging & L_GRABFILE)) ACTIONFAILED(pe); else if (logging & L_GRABFILE) ACTIONOK() ; send_error(from, ub, pe) ; return; } if(pe = server_grab_file(&pp, &fp, inet_num, port_num)) { if (pos && (logging & L_ERR) && (logging & L_GRABFILE)) ACTIONLOG1("GRABFILE"); if((logging & L_ERR) && (logging & L_GRABFILE)) ACTIONFAILED(pe); else if (!pos && (logging & L_GRABFILE)) ACTIONOK() ; send_error(from, ub, pe) ; return; } send_file(from,ub,fp,l2,s2); fclose(fp); if (!pos && (logging & L_GRABFILE)) ACTIONOK(); return; case CC_GRAB_DONE: if(logging & L_GRABFILE) ACTIONLOG1("GRABDONE"); if (read_only) { if((logging & L_ERR) && (logging & L_GRABFILE)) ACTIONFAILED("Permission denied"); else if (logging & L_GRABFILE) ACTIONOK() ; send_error(from, ub, "Permission denied") ; return; } if(pe = check_patT;b8FSP.SAV[FSP.SERVER]MAIN.C;512N$Wh(s1,l1,&pp)) { if((logging & L_ERR) && (logging & L_GRABFILE)) ACTIONFAILED(pe); else if (logging & L_GRABFILE) ACTIONOK() ; send_error(from, ub, pe) ; return; } if(!old) if(pe = server_grab_done(&pp,inet_num,port_num)) { if((logging & L_ERR) && (logging & L_GRABFILE)) ACTIONFAILED(pe); else if (logging & L_GRABFILE) ACTIONOK() ; send_error(from, ub, pe) ; return; } server_reply(from,ub,0,0); if(logging & L_GRABFILE) ACTIONOK(); return; default: if(logging & L_ERR) { ACTIONLOG0("UNKNOWN"); ACTIONINFO((" (%d)", ub->cmd)); ACTIONFAILED("Unknown FSP command"); send_error(from, ub, "Unknown FSP command") ; } return; } } static int arg_err PROTO0((void)) { fputs("Usage: fspd [-f configfile]\n", stderr); exit(1); } int main PROTO2(int, argc, char **, argv) { inetd_mode = !strcmp(argv[0],"in.fspd"); if(argc != 1) { if (argc>3) arg_err() ; if (strncmp(argv[1],"-f",2)) arg_err() ; if (argc==3) config_file=argv[2] ; else config_file=argv[1]+2 ; } load_configuration(); if(inetd_mode) { init_inetd(); freopen(NULL_DEV,"r",stdin); freopen(NULL_DEV,"w",stdout); freopen(NULL_DEV,"w",stderr); } /* clear all entries in file-cache */ clear_cache(fpcache, &cache_p); /* Moved setuid to here from below because log file was getting opened * by root, and fspd could no longer write to the log file after the * setuid. This should always open the file as run_uid * MoFfFSP.SAV[FSP.SERVER]MAIN.C;5.1;1N$\"dified A.E.J.Fellows 9 March 93 */ if(run_uid) if(setuid(run_uid) != 0) exit(1); init_home_dir(); if (logging && *logname) { /* test to see if logfile can be written */ /* open it append mode so that it doesn't wipe the file when * you are running under inetd. VMS uses file version number, so * the old logfile won't be erased. */ #ifdef VMS if((logfd=vms_open(logname, "w")) < 0) { #else if((logfd=open(logname, O_WRONLY | O_APPEND | O_CREAT, 0644)) < 0) { #endif fprintf(stderr, "Error opening logfile: %s, logging disabled.\n", logname); logging = 0; /* no logging */ } } if(!inetd_mode) { /* Fork and die to drop daemon into background */ /* Added Alban E J Fellows 12 Jan 93 */ /* Moved by JT Traub to only do this if not running under inetd. */ if(daemonize) { #ifdef VMS freopen(NULL_DEV,"r",stdin); /* speed up */ freopen(NULL_DEV,"w",stdout); freopen(NULL_DEV,"w",stderr); if (vfork() > 0) #else if (fork() > 0) #endif exit(0); } init_network(udp_port); } /* setuid and init_home_dir move from here to above the logging file open */ init_htab(); srandom(getpid()); if(inetd_mode) server_loop(120*1000L); /* 2 minutes */ else while(1) server_loop(-1L); exit(0); }  *FSP.SAV[FSP.SERVER]MAIN.OBJ;1;1N*[FSP.SERVER]MAIN.OBJ;1+,./F 4 -0123KPWO56YDl74X҃89GFHJ1MAINV1.031-OCT-1994 12:38VAX C V3.2-044 PP PPwPVMS Version 2.7.1, May 21st, 1993$P &P%d.%d.%d.%d2Prcv (%c,%d,%d,%lu) <--- %s NP%s %sTPVERSION\P ^P%s %-8s /%.*slPGETDIRsP%s %-8s /%.*sPGETDIRP: ERROR %s P P P%s %-8s /%.*sPGETFILEP%s %-8s /%.*sPGETFILEP: ERROR %s P P (%d)P P%s %-8s /%.*sPDELFILEP: ERROR %s PPermission deniedP PPermission denied"P: ERROR %s .P 0P 2P%s %-8s /%.*s@PDELDIRGP: ERROR %s SPPermission deniedeP gPPermission deniedyP: ERROR %s P P P%s %sPUPLOADP: ERROR %s PPermission deniedP PPermission deniedP%s %sPUPLOADP: ERROR %s P P P%s %-8s /%.*sPINSTALLP: ERROR %s PPermission deniedP PPermission denied-P: ERROR %s 9P ;P =P%s %-8s /%.*sKPMAKEDIRSP: ERROR %s _!P/D FSP.SAV[FSP.SERVER]MAIN.OBJ;11PPermission deniedqP sPPermission deniedP: ERROR %s P P: ERROR %s P P P%s %-8s /%.*sPGETPROP: ERROR %s P P P%s %-8s /%.*sPSETPROP: ERROR %s PPermission deniedP PPermission deniedP: ERROR %s P P: ERROR %s )P +P -P%s %-8s /%.*s;PGRABFILEDP: ERROR %s PPPermission deniedbP dPPermission deniedvP%s %-8s /%.*sPGRABFILEP: ERROR %s P P: ERROR %s P P%s %-8s /%.*sPGRABFILEP: ERROR %s P P P%s %-8s  INIT_INETD INIT_NETWORK SEND_FILE SEND_ERROR SERVER_REPLY GET_NEXT_KEY SERVER_LOOP INIT_HTAB CLEAR_CACHE INIT_HOME_DIRSERVER_GRAB_DONESERVER_GRAB_FILESERVER_SECURE_FILESERVER_INSTALLSERVER_UP_LOADSERVER_SET_PROSERVER_GET_PROSERVER_GET_FILESERVER_MAKE_DIRSERVER_DEL_DIRSERVER_DEL_FILESERVER_GET_DIR CHECK_PATHLOAD_CONFIGURATIONSETUIDGETPIDWRITE/%.*sPGRABDONEP: ERROR %s PPermission deniedP PPermission deniedP: ERROR %s %P 'P: ERROR %s 3P 5P 7P%s %s=PUNKNOWNEP (%d)KP: ERROR %s WPUnknown FSP commandkPUnknown FSP commandPUsage: fspd [-f configfile] Pin.fspdP-fPnl:PrPnl:PwPnl:PwPwPError opening logfile: %s, logging disabled. Pnl:PrPnl:PwPnl:PwP^R" rFSP.SAV[FSP.SERVER]MAIN.OBJ;1.1;1n?7ެQQQP`PQPbPP~VSPRINTFbPP~STRLENP|<^VUTSeAd=fVMS_STATP(dCLOSEfVMS_OPENPd fPERROReeKdGTIMEP߭CTIMEP\\STRLENPRBl\c\\~STRCPY BcRRP^\lWRITE^TWUߤSTRCPYߤ$STRCATUUUUgUЬR STRCPYSHTONLPc STRLENVf@ fPU@ g1SHTONLPc fPQˏgPPPPA fPQˏgPPPPA fPQˏgPPPPA fPQgA  fPPRݬ SERVER_REPLY fPPR SERVER_REPLY^RYЬSݣNTOHLPZ<~NTOHSPXPP P WXWni4ЬPՠ РV%P~~~`~ߢ&xSPRINTFxVVZݮX~ߢ2FPRINTFլ 'ЬS  GET_NEXT_KEYPQ<PPʏPQPP ЬTUЬS< ~HTONSPec[ЬPdSS1:SA1SPPA P1&?Piլ jߢTVߢN ݬݬ>iլ  ߢ\լ ЬS|~ݬݬ SERVER_REPLYZiլ  WXߢlVߢ^ϧDXW CHECK_PATHPT߭[DSERVER_GET_DIRPTuZ$i iլ ϼWXVߢsViSSSլ .Tˆ<CZSլ ”%Tݬݬ SEND_ERRORnݮ ݭݬݬ SEND_FILEݭFCLOSEZiլ –Z!iլ WX¦#̎N y]{N1(X| V//0K>tjTi.#cTK3#B1q2C K"!ED=n?B #b:DVJnҔ EnNE Gʘ*=;a*bl\JjsF'#GTU?= 2Dk-"S64,! ˆ”q wI.7,RI:m NjHW(g J.4kv]cQm BԋJESR6P@xh66NuV{&+@?\ uشrM9>wgP` B7OG۹P lr#= ^\l}.qF<7uC' Gm'a?j2}r >rFA~fneV-P6{^:>LCK}#biiG.A6&<{$); bѽCۏ2)u>r~iANJ;qׇXK#ݚ{:ahX}QNWz- 0123KPWO56*WCl7`Q҃89GFHJ # Sample csh initialization file. setenv FSP_PORT 21 setenv FSP_HOST 131.215.131.148 setenv FSP_DIR / setenv FSP_TRACE setenv FSP_DELAY 3000 alias fcat \(set noglob\; exec fcatcmd \!\*\) alias fcd setenv FSP_DIR \`\(set noglob\; exec fcdcmd \!\*\)\` alias fdu \(set noglob\; exec fducmd \!\*\) alias ffind \(set noglob\; exec ffindcmd \!\*\) alias fget \(set noglob\; exec fgetcmd \!\*\) alias fgrab \(set noglob\; exec fgrabcmd \!\*\) alias fhost 'eval `fhostcmd \!\*`' alias fless \(set noglob\; e*RMFSP.SAV  [FSP]SETUP.;1]FGRAB.1;1> xec fcatcmd \!\* \| less\) alias fls \(set noglob\; exec flscmd \!\*\) alias fmore \(set noglob\; exec fcatcmd \!\* \| more\) alias fpro \(set noglob\; exec fprocmd \!\*\) alias fpwd echo \$FSP_DIR on \$FSP_HOST port \$FSP_PORT alias frm \(set noglob\; exec frmcmd \!\*\) alias frmdir \(set noglob\; exec frmdircmd \!\*\) alias ftouch "touch \!:1;fput \!:1;rm \!:1" *[FSP]VMS.DIR;1+,./F 4- 0123 KPWO56M7W89GFHJIBUGS.VMS CMUSHARE.OPT COMPILE.COMCOMPILE.COM_ORIGFSP.COM FSPD.CONFHELP.DIR INSTALL.VMS LIBSHARE.OPTLINK.COM  LINK.COM_ORIGMAKECLIENT.COM MAKECLIENT.COM_ORIG MAKEMERGE.COMMAKEMERGE.COM_ORIG+b &FSP.SAV [FSP]VMS.DIR;1FGRABCMD.1;1MAKESERVER.COM MAKESERVER.COM_ORIG MULSHARE.OPT RESUBFSP.COM RUNFSPD.COM SETUP.COMSETUPMERGE.COMSOCKETSHRSHARE.OPT TGVSHARE.OPT UCXSHARE.OPT VMS.CHANGELOG*[FSP.VMS]BUGS.VMS;1+,./F 4LW-0123KPWO56. -N_FSP.SAV[FSP.VMS]CMUSHARE.OPT;8IG;2!=*[FSP.VMS]CMUSHARE.OPT;8+,./F 4!>-0123KPWO56Cl7`tfX҃89GFHJ!cmuip_root:[syslib]libcmu/librarysys$share:vaxcrtl/share*[FSP.VMS]COMPILE.COM;4+,./F 4H-0123KPWO56\Cl7nX҃89GFHJ$! COMPILE.COM $! compiler for VMS-FSP V2.7.0 $! 03-JAN-93 First version for FSP V2.6.5 $! 07-MAY-93 Modified for VMS-FSP V2.7.0 $! $! Original routine from VMS-IRC-Client DCL MAKE file $! Copyright 1990 by Very Mad Students, University of Karlsruhe, FRG $! $!------------------------------------------------------------------ $! @Compile $!------------------------------------------------------------------ $!set verify .V {{ ~pqp mCM O ^.yY@ʸG}ҦFά! {fGUTUA347_Vbgde2e(yې2K/\%VBiv+3r҄]]6 -td>(,[0cUK;7HmQ ʄN 0QcSZF?N,VLJx<,~&OtO F\V-u(%/Y˅lMR g> ]˴S9@,ʪo١$,&#UP7PAڜЁҮ? <]>뤗G@ƍ$pk}nUW:uDPFT⢅d! ވS5+DNͺ2Uc`U }u S n8H1Ǟ!`V .i <<  (4=~ 'Zgֵk4v1BO0h9_o37˖Uir /g *+Eu hZ3G {boSQ=C0hj`&D.b!ϛ)ӝCN*;=mR "S'ŭ$^<'wi~}?rX]@ę lM\G=s:0k.u@j0;8 Kl!**hj(" y.PҴ=ж0hFYzbhQ_q-blWj!ٴs|@۟`;bAfKwBy\/m 6GkS:7;ds5ܪ Yw yIӡ-̿&Ҹ):klyz}jFFԖRs#1)#}`fs`9cYZkՕ&rq9"qȟ^ /y >Ft{*@}F9-^>- ?f]@K:R( Ugrea~i9{-$٫48,bVf?bܿa9$媧u2wh[h>3rN`sSf@- %jyYH!ӈ Q 62?'$@:"ù[J9È}qebly|?MdQ -u8"u{|op1Wb|\Ü`- $!set verify /*FSP.SAV[FSP.VMS]COMPILE.COM;4.1;12HR$CompileIt: $ Source = F$CVTIME(F$FILE_ATTR("''P1'.C","CDT")) $ IF F$SEARCH("''P1'.OBJ") .EQS. "" THEN GOTO DoObject $ Object = F$CVTIME(F$FILE_ATTR("''P1'.OBJ","CDT")) $ Header = F$CVTIME(F$FILE_ATTR("[.vms]ucxshare.opt","CDT")) $ IF Source .LTS. Header THEN GOTO DoObject1 $ IF Source .LTS. Object THEN GOTO NoObject $ GOTO DoObject $DoObject1: $ COPY/NOCONF/NOLOG 'P1'.c 'P1'.c $ PURGE/NOLOG 'P1'.c $DoObject: $ if f$trnlnm("FSP_DEBUG") .nes. "" then $ cc = "cc/debug/noopt" $ WRITE sys$output "...compiling ''P1'" $ CC /object='P1'.obj /include=[.include.vms] 'P1' 'P2' 'P3' 'P4' 'P5' $ GOTO EndSub $NoObject: $ WRITE sys$output "...''P1' already up to date" $EndSub: $ EXIT *[FSP.VMS]COMPILE.COM_ORIG;1+,./F 4P-0123KPWO56l Cl7@=wX҃89GFHJ0G7 FSP.SAVSP.VMS]COMPILE.COM_ORIG;1Pp$! COMPILE.COM $! compiler for VMS-FSP V2.7.0 $! 03-JAN-93 First version for FSP V2.6.5 $! 07-MAY-93 Modified for VMS-FSP V2.7.0 $! $! Original routine from VMS-IRC-Client DCL MAKE file $! Copyright 1990 by Very Mad Students, University of Karlsruhe, FRG $! $!------------------------------------------------------------------ $! @Compile $!------------------------------------------------------------------ $!set verify $CompileIt: $ Source = F$CVTIME(F$FILE_ATTR("''P1'.C","CDT")) $ IF F$SEARCH("''P1'.OBJ") .EQS. "" THEN GOTO DoObject $ Object = F$CVTIME(F$FILE_ATTR("''P1'.OBJ","CDT")) $ Header = F$CVTIME(F$FILE_ATTR("[.vms]ucxshare.opt","CDT")) $ IF Source .LTS. Header THEN GOTO DoObject1 $ IF Source .LTS. Object THEN GOTO NoObject $ GOTO DoObject $DoObject1: $ COPY/NOCONF/NOLOG 'P1'.c 'P1'.c $ PURGE/NOLOG 'P1'.c $DoObject: $ WRITE sys$output "...compiling ''P1'" $ CC/nodebug /object='P1'.obj /include=[.include.vms] 'P1' 'P2' 'P3' 'P4' 'P5' $ GOTO EndSub $NoObject: $ WRITE sys$output "...''P1' already up to date" $EndSub: $ EXIT 1Q FSP.SAV[FSP.VMS]FSP.COM;1TCMD.1;1M*[FSP.VMS]FSP.COM;1+,./F 4M-0123KPWO56,%Cl7`~X҃89GFHJ$! FSP.COM $! Puts the output of a fsp command to a file and changes the FSP variables $! to the content of this file. $! $! THIS FILE MUST BE COPIED TO THE SAME DIRECTORY WHERE THE FSP-EXECUTABLES $! ARE, OTHERWISE YOU'LL GET AN ERRORMESSAGE WHEN USING THE 'FCD' AND 'FHOST' $! COMMANDS. $! $on CONTROL_Y then goto end $on CONTROL_C then goto end $on ERROR then goto end $def sys$output sys$scratch:temp_fspcmd0.com $'P1' "''P2'" $deassign sys$output $if "''P1'" .EQS. "FHOSTCMD" then goto fhost $! $! Read the output of the fcd command, and define the new FSP_DIR $! variable. $fcd: $open/read temp sys$scratch:temp_fspcmd0.com $! $pwd = "" $loop: $read/error=endfcd/end_of_file=endfcd temp pwd $write sys$output "''pwd'" $define/nolog fsp_dir "''pwd'" $goto loop $! $endfcd: $close temp $goto end $! $! The fhost command produces an executable .COM file. $fhost: $@sys$scratch:temp_fspcmd0 $! $end: $deassign sys$output $delete/nolog/noconfirm sys$scratch:temp_fspcmd0.com;* *[FSP.VMS]FSPD.CONF;2+,. /F 4M -0123KPWO 56쀄Cl7 X҃89GFHJ23FSP.SAV[FSP.VMS]FSPD.CONF;2.1;11M # This is an example fspd.conf file for the VMS-FSP server. # Copy it and edit it to suit your tastes. # The 'conf' command allows a global file to read local files so that # multiple users at a site can use the same central fspd file. # # conf globalfspd.conf # The 'readme' commands specifies the name of the local readme file # for each directory. If no readme command is given, the readme file # defaults to .README # # readme .README # The usecachedir command tells the server if it's going to be using a # cache directory on if it will be relying on .FSP_CONTENT files instead. # it accepts the parameters 'on' or 'off' # usecachedir off # The 'cachedir' command controls where the server thinks the cache # directory is located if the usecachedir command is set to 'on'. # This directory can be relative to the home directory or an absolute # path. # # cachedir pool:[bdaasp.cache] # The 'homedir' command tells the server where it's ROOT directory is. # This directory must be given as an absolute path. # homedir anonymous_root:[000000] # The 'logfile' command tells the server where to log things too if # logging is enabled. # It can be a relative path from the fspd home directory or an absolute # path. # it must include the filename. # logfile disk$service:[vmsserv]fspd.log # The 'log' command specifies the type of logging that should be performed. # The log command takes the following options # 'none' or any of 'all', '(!)errors', '(!)version', '(!)getdir', # '(!)getfile', '(!)upload', '(!)install', '(!)de3!fFSP.SAV[FSP.VMS]FSPD.CONF;2.1;11M +lfile', '(!)deldir', # '(!)setpro', '(!)getpro', '(!)makedir', '(!)grabfile'. # logging of 'all' will include logging of errors. # for example: # log all !errors -- will log all commands sent, but no error messages. # log all !getdir -- will log all commands except getdir and all errors # EXCEPT those that occured on a getdir command. # log install getfile errors -- will log all install and getfile commands # as well as any errors that occur on ONLY those commands. # If no log command is given, logging will be turned of (same as 'log none') # log all # The 'port' command specifies which port the fspd server is to listen two. # This is NOT needed if running under inetd, but otherwise is required. # port 6669 # The 'thruput' command is used to specify the thruput control in avg # of # bytes per second that the server will allow. Use 'thruput off' to specify # no thruput control. A negative value or zero will also shut off thruput # control. If this command is not given, it acts like 'thruput off' # # thruput off # The 'setuid' command is used to specify a specific uid under which the # FSP server will run. Use 'setuid off' or 'setuid 0' in order to not # attempt to perform a setuid. If this command is not given, it acts like # 'setuid off' # # setuid off # The 'daemonize' command specifies whether the fspd should fork itself into # the background when started up. The only acceptable values are 'on' or # 'off'. If this command isn't given, it acts like 'daemonize of4a~FSP.SAV[FSP.VMS]FSPD.CONF;2.1;11M f'. # # daemonize off # The 'debug' command specifies whether the server should write debugging # output to stderr while it is running. The only acceptable values are 'on' # or 'off'. If this command is never given, it acts like 'debug off'. # # debug off # The 'restricted' command specifies whether the server is run in restricted # mode. In this case, only hosts enabled via the 'host' command will be # able to connect. The only acceptable values for this command are 'on' or # 'off'. If the command isn't given, it acts as 'restricted off'. # # restricted off # The 'reverse_name' command specifies if the server refuses connections to # sites that it cannot reverse lookup. The only acceptable values for this # command are 'on' or 'off'. If the command is not given, it acts like # 'reverse_name off' by default. # # reverse_name off # The 'read_only' command specifies whether the server should ignore any # command that would cause a 'write' action on the server. The commands # that are refused by this are upload, install, mkdir, deldir, delfile, # and setpro. The only acceptable values for this command are 'on' or 'off'. # If the command is not given, it acts like 'read_only off'. # # read_only off # The 'host' command subsumes the function of the .IPHOSTS file from # previous versions. Each line looks as follows. (information in [] # is optional) # host host_mask [host_type message] # # host_mask is either the full numeric or text name of a machine OR # a wildcarded host ma5juFSP.SAV[FSP.VMS]FSPD.CONF;2.1;11M ` sk. # wildcarded hostmasks look as follows. # 128.4 - 8.*.* -- (* acts as the range 0 - 255) # The above line would affect all hosts of the form 128.4.*.*, 128.5.*.*, # 128.6.*.*, 128.7.*.* and 128.8.*.*. # This sort of host masking is only available with numeric hosts, not with # text names. # host_type is one of D, I, or N. # I hosts are ignored, N hosts are treated as normal, and D hosts will # get back the error string message given as the third parameter. # # If host_type isn't specified, the host is treated as ignored or normal # depending on the value of restricted. # # The following line allows all CMU machines (128.2.*.*) access to a site. # host 128.2.*.* N This message is useless here. *[FSP.VMS]HELP.DIR;1+,./F 4-0123 KPWO56մ789GFHJI6FSP.SAV[FSP.VMS]HELP.DIR;1MD.1;1FSP.HLPFSPD.HLP*[FSP.VMS.HELP]FSP.HLP;1+,./F 4G-0123KPWO56lnCl7IY҃89GFHJG! ---------------------------------------------------------------------! This help file written by:5! Andy Harper, Kings College London, 26-OCT-1994G! ---------------------------------------------------------------------1 FSPAThe FSP suite of commands utilizes the FSP protocol to manipulate@files on a remote host and to transfer files between the currentsystem and that remote host.BFSP is a connectionless protocol and is most often used to provideAANONYMOUS FTP style access to fi7j;FSP.SAV[FSP.VMS.HELP]FSP.HLP;1;1G{le. The FSPD utility provides the server side.DFSP appears as a series of separate utility programs that are run toFperform a single action. State information, such as the current remoteEhost name and the current remote directory, is kept in logical names.2 FCAT3Copy files from the remote host to standard output.Format: fcat [-r] [file [...]] 3 Example fcat 00indexD Print the file `00index' from the FSP server to the terminal 3 Options@The -r option causes a recursive descent through each directory,1listing the contents of all files found en route. 3 Parameters@Each file specified as a parameter is copied from the server andFdisplayed on the standard output. If several files are specified, then=they are displayed one after the other, with the output being$concatenated to the standard output.2 FCD8Change the current working directory on the remote host.Format: fcd [dir] 3 Examples fcd /pub/software5 Change the remote directory to `/pub/software' fcd xyzD Change the remote directory to `xyz' contained in the current remote directory. 3 ParametersDWith no parameter given, the current working directory is changed to@the root directory (/) on the server. Otherwise the directory ischanged to that specified.BIf the specified directory begins with a /, it is used as the full?name of the working directory. Otherwise, it is relative to thecurrent setting.2 FDUFDisplays the size, in kilobytes, of all file8Dp-}FSP.SAV[FSP.VMS.HELP]FSP.HLP;1GGxs in the specified file ordirectory on the remote host.Format:% fdu [-s] [-a] [-r] [file [...] ] 3 OptionsCThe -s option causes only the grand total for each of the specifiedFfilenames to be displayed. Otherwise, all files are listed separately.?The -a option causes sizes to be displayed for each file in theCspecified directories. Otherwise, sizes are displayed only for each directory.BThe -r option causes the sizes to be displayed recursively for allDfiles and subdirectories of each of the named files and directories.EOtherwise, only the sizes of files and directories in those specifiedare displayed. 3 ParametersFEach parameter is the name of a file or directory on the remote system'for which size information is required.2 FFINDEFind files by name, or by other characteristic, in the directory treeof the remote host.Format:# ffind pathname-list expression 3 Examples ffind . -name intro.ms -print? Find all the files called `intro.ms' in the directory tree' starting at the current directory. 3 ParametersCThe pathname-list specifies a set of top level directory names. The?search for matching files is made recursively through the whole9directory tree, starting at each of these points in turn.<Files are matched by using a set of operators to specify the>characteristics of the required files. In these descriptions: +n means `more than n' -n means `less than n' n means `exactly n'4 -nameF-name "filename"9I= ~m i emcIG; UH P,mA#5'o<}-kY[k+x\6xBbgbLY\ =j +!I)#pXk1S+Ic{K- XiOTn*yf.D;BJhBro$4DP :>/]]?- AmW lh&~6^FR0.$x+ >37Uj H]OPz&v);&/uko!>L$PYUc5h%YG7Ƕ4D=3n#4= -Li\effq`(vf'T-5ujeU}ZyMPUxs1o'dy*^-a,l9GY/ LA 4`5"1$QY#~hd0%)u|C>LQGd!umax,!H0wp3Q%sc;3>yI=8Gz/}IH1b1 VNt~ ze+rWS1_YH0mx?]y9_Yu=.:<9ygAd C1cL@Db$W*>Q{{;Sq&ML= pm]I;0j ^+'T9!}^&tYjATJ!FAvxl3]~"ht[}#4l2Lm:'4d rQumi-IDFKi9H 7 L+0o/yh! g`X1joV T# O|Wnk[s$w%ofb4"֣%*'%~p4G3su*F>Gz*#''e'g[=?f$CRejbsWOh`lif]`K0zy[ESG04mn^BX|6;lyT8rDwM-5zEPHu$J< /4^_EP99I[ I 3]\z9PtTTWx )K#Am <7h CbSVYAKHZQn[mEP DdQkC)Dhtk2SJ]9/rMr 5g{hC[x{~>]DA% ?U2u}RJI0yfc?bA2EXQnf[Mla)|u^ bWVI0WvT^. j0S 8x~dA =*8dtNBo z0U & X4*`j9} '>;-nv;f3+#FC@1Jza;~9<^2N u?|f4&m* TN K>GeFIISP x 'T t:r).gh;A9%TU =#;1!9kN9h*B?1F4`b9p '9ir&2]#j  U9uG0'8H_aZi.~77:)Gm.y*hi*})?- HOa,vhld+`*3B`bgNw$]e1>3q?(=,y:41:&@ewE$Ui(WCc 6,ts"ZrfN]`")f >2|x2%(=na{(k2u(kB^16,4h6X6@6$beN *chE Z  im]Ln32(`j$>9cx$xa-"T2~'`exE7]s2&(hk&(o7-o%:dˠFSP.SAV[FSP.VMS.HELP]FSP.HLP;1G~  true if the file matches the specified "filename"4 -pruneD-prune Always true. has the side effect of pruning theE search tree at the file. That is, if the currentF path name is a directory, there will be no search) into that directory.4 -typeF-type "c" True if the type of the file is `c', where `c' is one of:$ d directory% f plain file4 -sizeC-size "n" True if the file is `n' blocks long. If `n' isB followed by the letter c, then the size is in3 characters rather than blocks.4 -timeD-time "n" True if the file has been accessed, modified or' changed in n days.4 -execF-exec "command" True if the executed command returns a zero value? as exit status. the end of command must be8 punctuated by an escaped semicolon.4 -okB-ok "command" As -exec except that the generated command isF written to the standard output, then the standardF input is read, and the command executed only upon& the response `y'.4 -printB-print Always true; the current pathname is printed.4 -lsB-ls Always true; the current pathname is printed,C together with its associated statistics. TheseD ;ԣ.FSP.SAV[FSP.VMS.HELP]FSP.HLP;11G7 include size in blocks, protection mode, numberB of hard links, user, group, size in bytes and' modification time.4 -newerC-newer "file" True if the current pathname has been modified: more recently than the file argument.4 (expression)>( expression ) True if the bracketed expression is true. 4 !primary?! primary True if the primary is false; false if theD primary is true. In other words the unary `not' operator.4 -aAprimary1 -a primary2 True if BOTH primary1 and primary2 are true;E false otherwise. The -a is not strictly requiredD since it is implied by the juxtaposition of two? primaries. -a is the logical AND operator.4 -oAprimary1 -o primary2 True if EITHER primary1 or primary2 is true;D False otherwise. -o is the logical OR operator.2 FGET8Download files from the remote host to the local system.Format:3 fget [-f] [-u] [-t] [-n] [-a] [-r] [file [...]] 3 OptionsCThe -f option forces overwriting of files. Otherwise, files are not overwritten.FThe -u option forces unique filenames by appending a unique integer to each copy.CThe -t option forces overwrite of the local file if the download is successful.FThe -n option forces files with identical names not to be overwritten.<The -a option forces files to be appended to a partial file.<z{FSP.SAV[FSP.VMS.HELP]FSP.HLP;11G>;BThe -r option will recursively get all files in given directories.CThe default mode is to overwrite files after a successful download.EThis has the drawback of possibly leaving behind temporary files withnames similar to .fsp#### 3 ParametersBWhen used without arguments, a list of file names is read from theGstandard input. Whan arguments are given, they are taken to be the listDof file names. Each file named is copied from the remote host to the local system.2 FGRAB8Download files from the remote host to the local system.Format:/ fgrab [-f] [-u] [-t] [-n] [-a] [file [...]] 3 OptionsCThe -f option forces overwriting of files. Otherwise, files are not overwritten.FThe -u option forces unique filenames by appending a unique integer to each copy.CThe -t option forces overwrite of the local file if the download is successful.FThe -n option forces files with identical names not to be overwritten.<The -a option forces files to be appended to a partial file.CThe default mode is to overwrite files after a successful download.EThis has the drawback of possibly leaving behind temporary files withnames similar to fsp.temp#### 3 ParametersBWhen used without arguments, a list of file names is read from theGstandard input. Whan arguments are given, they are taken to be the listDof file names. Each file named is copied from the remote host to the local system.2 FHOSTESet environment information into logical names, to define the currentFSP host, direct=oy9FSP.SAV[FSP.VMS.HELP]FSP.HLP;1.1;1G`Jory etc.Format:G fhost [-d delay] [-p local port] [-l local directory] [-o timeout]C [-t trace] [-w password] [f filename] [-h number|name]0 [host port [directory]| abbreviation] 3 Options3The -d option sets FSP_DELAY to the specified value9The -p option sets FSP_LOCALPORT to the given port numberBThe -l option sets FSP_LOCAL_DIR to the specified local directory.=The -o option sets FSP_TIMEOUT to the specified timeout valueCThe -t option sets FSP_TRACE to 0 if the value is "off" and to 1 ifthe value is "on"@The -p option sets FSP_PASSWORD to the specified password string 3 ParametersFA resources file is used to set all logical names needed to connect toDa given host via FSP. Th -f option specifies a particular file to beFused as the resources file. If no -f option is given, a search is made=for the file .FSPRC in the current directory and in the homeCdirectory of the current user. If none is found, then a system widedefault file is used.EIf invoked with an abbreviation as a parameter, the resources file isEsearched for the first host to match this abbreviation and the values1for that host will be set into the logical names.DIf invoked with a given host and port number, this host will be used3and no searching in the resource file will be done.2 FLSALists the files contained in the current working directory on the remote host.Format: fls [-flags] [file [...]]BOnly the name, time, size and type fields are disp>ù(FSP.SAV[FSP.VMS.HELP]FSP.HLP;1.1;1GĠlayed. All otherinformation is forged locally. 3 Options-All the usual unix `ls' flags are recognized.2 FMKDIR%Create directories on the remote hostFormat: fmkdir [dir [...]] 3 ParametersFFor each directory name appearing in the argument list, that directory?is created on the remote host in the current directory. The newCdirectories are owned by the client system and permission for otherDclients to create or delete items in these directories are initially turned off.DThe client may alter the permission states with the fpro command2 FPRO9Get or set permissions for directories on the remote hostFormat:, fpro [+c|-c|+d|-d|+p|-p|+m|-m] file [...] 3 OptionsGThe options determine the permissions to be applied to the remote file.< +c Others can create new items -c Others cannot create< +d Others can delete old items -d Others cannot delete6 +p File is private -p File is public< +m Others can create -m Others cannot create7 subdirectories. subdirectories. 3 ParametersDFor each remote file named on the parameter list, display or set thepermissions for that file.8With no option specified, the permissions are displayed.=With an option specified, the permissions are chnaged to that specified.2 FPUTUpload files to the remote hostFormat: fput [filename [...]] 3 ParametersBWhen used without arguments, a list of file names is read from theFstandard input and each one is uploa?_ FSP.SAV[FSP.VMS.HELP]FSP.HLP;1Gtded to the remote host. Otherwise,+each file named as a parameter is uploaded.2 FRM!Remove files from the remote hostFormat: frm filename [...] 3 Parameters>Each file named as a parameter is removed from the remote host2 FRMDIR'Remove directories from the remote hostFormat: frmdir directory [...] 3 ParametersDEach directory named as a parameter is removed from the remote host.2 FVER#Displays the version number string.Format: fver [-l] 3 OptionsB-l requests that the version number string of the local client isD displayed. Otherwise the version number string of the remote FSP host is displayed.2 Logical_Names 3 FSP_DELAY 3 FSP_DIREThe current working directory on the remote host. The root of the FSP=file system accessible from the server is ALWAYS /. Directory2specifications follow the unix style. For example: /pub/software 3 FSP_HOSTDHolds the name or internet number of the remote host running the FSPserver.3 FSP_LOCAL_DIRBIf set, this contains the local working directory where downloadedfiles will be placed.3 FSP_LOCALPORTDThe port number used by the local FSP client programs to contact theBremote FSP server. It is not generally recommended to define this.3 FSP_PASSWORD 3 FSP_PORT:The port number on which the remote FSP server is running. 3 FSP_TIMEOUTCIf set, this contains the timeout value. Timeout determines whetherAthe FSP client will give up if no response is received within thetime. 3 FSP_TRACE@5FSP.SAV[FSP.VMS.HELP]FSP.HLP;1G9AIf this is defined (with any value) then utilities which transferEinformation will display the number of Kilobyte blocks transferred asCthe transfer progresses. Also shown will be a measure of characters7per second, giving an indication of network throughput.CThis has no effect when the file being transferred is output to the terminal.2 Resource_File 3 ExampleIf the resources file contains: host seismo.soar.cs.cmu.edu fsp port 30& local directory ~/sources/fsp-266.1 trace offThen: fhost seismo$Will set up logical names like this: FSP_TRACE 0 FSP_PORT 30$ FSP_LOCAL_DIR ~/sources/fsp-266.1 FSP_DIR / 2 Version2This port of FSP to VMS is based on version 2.7.0.It was ported to VMS by: Andy Harper Kings College London England$The supported TCP/IP transports are:, UCX Digital's own TCP/IP product$ MULTINET TGV's TCP/IP productG CMU The Free TCP/IP product from Carnegie-Mellon UniversityE SOCKETSHR Eckhart Meyer's socket interface to the NETLIB TCP/IP: Transport. This is the recommended option.ApFSP.SAV[FSP.VMS.HELP]FSPD.HLP;1K*[FSP.VMS.HELP]FSPD.HLP;1+,./F 4K-0123KPWO56jDl7}TY҃89GFHJ1 FSPD Server to allow FSP access to a directory of files Format: fspd [-f configfile] FSPD is the server for an anonymous-ftp style archive called FSP. The main features of this service are: connection-less model, communication robustness, server resource protection, inter-client protection, and user friendly interface. Please read the INFO file bundled with the FSP source for more information. 2 Configuration FSPD is configured cia entries in a configuration file (see the -f option and the `fspd.conf' entry under `files'). Each entry is a text line and configures one FSPD parameter. 3 # Any line starting with a hash characteris a comment line. Used to annotate the configuration file. 3 conf Allows the contents of another configuration file to be read in. This allows part of the configuration file to be kept elsewhere and shared amongst different FSPD servers if required. Format: conf filename 3 readme Defines the name of the local `.readme' file in a directory. If a file with this name exists whenBRUFSP.SAV[FSP.VMS.HELP]FSPD.HLP;1.H;2K)~ the user changes to a directory, its contents are sent to that user. Format: readme filename The default readme file is `.README'. 3 usecachedir Tells the server if it is going to be using a cache directory or if it will be relying on .FSP_CONTENT files. Format: usecachedir on|off The default is off. 3 cachedir Tells the server the location of the cache directory. Only used if the usecachedir command is `on'. Format: cachedir path path can be absolute or relative to the home directory. It is specified in VMS syntax! 3 homedir Tells the server where the root of the public directory tree is. All absolute path names will be treated as starting from this point (I.E. the `/' directory is the directory named here. Other directories will be below this point) Format: homedir path path MUST be absolute and in VMS syntax. 3 logfile Tells the server where transactions should be logged. logging must be enabled (see the `log' command). Format: logfile filename Either an absolute or relative file may be specified but it MUST include a filename and be in VMS syntax. 3 log Specifies the type of logging that should be performed. Format: log [none] [all] [[!]errors] [[!]version] [[!]getdir] [[!]getfile] [[!]upload] [[!]install] [[!]delfile] [[!]deldir] [[!]setpro] [[!]getpro] [[!]makedir] [[!]grabfile] An exclamation mark preceding an option means that the item should NOT be logged. 4 Examples log all !errors log all commands sent, but no error messages log all !getdir CU9 FSP.SAV[FSP.VMS.HELP]FSPD.HLP;1;1;2KS log all commands except getdir; and all errors EXCEPT those that occurred on a getdir command. log install getfile errors log all install and getfile command, including any errors that occur on ONLY those commands. 3 port Specifies on which UDP port the FSPD server listens for incoming connections. Whichever port is chosen must be unique. Port 21 is often a good choice as this matches the corresponding TCP port used for FTP. Format: port number 3 thruput Specifies the thruput control, in average number of bytes/second, that the server will allow. Format: thruput off | 0 | number Off or 0 turns off thruput control. The default is off. 3 setuid Used to specify a specific uid under which the server will run. Format: setuid off | 0 | uid off or 0 cause no setuid to take place. The default is off. Not really applicable to the VMS version! 3 dameonize Specifies whether FSPD should fork itself into the background when started. Format: daemonize on | off The default is off. Not really applicable to the VMS version. 3 debug Specifies whether the server should write debugging output to `stderr' while it is running. Format: debug on | off The default is off. 3 restricted Specifies whether the server should run in restricted mode. if so, then only hosts enabled with the `hosts' command will be able to connect. Format: restricted on | off The default is off. 3 reverse_name Specifies whether the server should refuse connections to sites that do not have a reverse tranDEJQjfk 1y e#).,3Wv"SkMuV$:&*(P_2qAc;Y@"bb]dz0)Ur }w>h@Ap. 9o3|u*'>4qY5rU OVvYGMc!(lFGJ*2Kw~=e!G}M nLKy{x-VoU7msx/fM bTdEG>33M6}KM6T ^k"n8a|A~xS)PlyFd:iu"RMyL@g*`)=afjqn hw]FM )k%6 "$I 6eA<\tcI  $IBl ZFr(K kUj9Enu)pyTJLeH QG+)\zO{!>M%_UEoo CUG?baxK;7_(t FZMoJ83N wOn.ytZD}j@ rgT ri/7FIMDw9mE"l8\dr6^Q(:C<9fyJAO3"uye2b?0#<.3*]$C:,zxGy* 0v(l$K4.i~;8T<~MlbTT uiETG7$d5bkD=?X F|.IPmT$q Jko1_$SX3 j/\M->=QP: ?T CBiB9: \C72!33Ro@j--v DH Y\ ydhzgsg3?zhmy1#n 1JOGD%)XG='w.WPB9 }mj/gB^H!8 Bl)|8D%=9>9K $ }y6z ;m1GX ?w0 4LY=xVO GI u98b#4|xk^UC(Zhb@og|jA7,,sVgOL:X<A, aXDGw(AZ..bPOEfQdeCj0d`xf&h,45!8-dmBeAQ eT5Ib 9DnM,*1qp@ =C}gr!134XE['4:q#*_PRsQ.j@pVT6+j5i$%ACY@YZ JM|(MZEF|]]{ j>W %W%Pa.-f-q E[FSP.SAV[FSP.VMS.HELP]FSPD.HLP;1.H_ORIG;1KL slation of their address. This is to prevent access by sites that might have forged who they are. Format: reverse_name off The default is off 3 read_only Specifies whether the server should ignore any command that would cause it to write into its file system. The commands that are refused by this are: upload, install, mkdir, deldir, delfile and setpro. Format: read_only on | off The default is off. 3 host Identifies hosts which are to be allowed access or not allowed access. Format: host host_mask [host_type message] 4 Examples host 123.1.1.1 D You are not allowed access to this server Deny access to the specified host and and send back the indicated error text `You are not allowed access to this server'. host 123.5.*.* N Allow all hosts from 123.5.0.0 to 123.5.255.255 to access the server. host 123.6.*.* I Ignore all accesses from hosts in the range 123.6.0.0 to 123.6.255.255 4 Host_Mask The host mask can be any of A full numeric address A host name A wildcarded numeric addres In a wildcarded numeric address, the character `*' may be used in any of the component parts to mean all numbers from 0 to 255. Alternatively, a range may be specified, in the form `n-m' Some examples: 128.4.*.* All addresses between 128.4.0.0 and 128.4.255.255 128.4-8.*.* All addresses between 128.4.0.0 and 128.8.255.255 4 Host_Type The host type specifies whether the host is to be allowed access or denied access. It is one of these single letters: FGk{wFSP.SAV[FSP.VMS.HELP]FSPD.HLP;1.H_ORIG;1K1 I Ignore the host N Normal host D Send back an error message to the host (see `message') If Host_Type is not specified, the host is treated as ignored or normal depending on the value of restricted. 4 Message The message text to be sent back to the host that matches a D type host record. 2 Options -f May be used to specify an alternate configuration file. The default is FSPD.conf in the SYS$LOGIN directory. 2 Files Various files are used as markers in the directories available to the FSPD server. 3.OWN.XXXXXXXX Used to indicate the ownership of a directory. If this file is present in a directory, the directory is owned by the machine whose inet number is XXXXXXXX when printed as an 8-digit hex number. 3 .README A text file that is sent to the client when the directory is entered giving information about the directory. It can only be hand created by the site administrator at this time. 3 .FSP_OK_DEL Existence of this file in a directory grants non-owner machines the permission to delete items from this directory. 3 .FSP_OK_ADD Existence of this file in a directory grants non-owner machines the permission to add items to this directory. 3 .FSP_PRIVATE Existence of this file in a directory means that files in that directory cannot be read, i.e. they are private. 3 .FSP_OK_MKDIR Existence of this file in a directory grants non-owner machines the permission to create subdirectories under the current directory. 3 .TXXXXXXXXXXXX Transient temporary file in the FSP directorGB$FSP.SAV[FSP.VMS.HELP]FSPD.HLP;1.H_ORIG;1K?y cache directory used for file uploading. 3 .GXXXXXXXXXXXX Transient temporary file in the FSP directory used for file downloading through the fgrab command. 3 .HTAB_DUMP A file created in the top directory when FSPD receives an alarm signal. It contains a listing of the active clients in FSPD's client table. 3 FSPD.CONF A file containing control information about how specific features of the server are to be used. See the example.conf file for explicit details. 3 .FSP_CONTENT File used to cache directory listing. Such files are normally created on demand in each directory that FSPD exports. If a .FSP_CONTENT file exists in a directory, but is not writable by the FSPD process, then the directory cannot be listed. If it does not exist and FSPD fails in its attempt to create a .FSP_CONTENT file, then FSPD will create one with a hashed name in a cache directory specified during compile time. Options can be set at compile time such that FSPD will create a cache file in the cache directory even if a .FSP_CONTENT file could have been created in the directory to be listed. 3 FSPD.LOG This is a logfile and records some or all of the FSPD server's transactions. The logfile name and what is logged are specified in the FSPD.CONF configuration file (see `logfile' and `log' entries). H[ FSP.SAV[FSP.VMS]INSTALL.VMS;1F.H;1Ma*[FSP.VMS]INSTALL.VMS;1+,./F 4M-0123KPWO56LCl7X҃89GFHJVMS-fsp V2.7.0 INSTALLATION information May 17, 1993 ======================================= What's this? This package contains the VMS port of FSP V2.7.0. At this moment it's just a beta-version, not all functions are tested thoroughly. The current version will run properly on VMS systems with UCX/TCP network software and some systems with Multinet/UCX. For other implementations, modifications might be needed in the header- and makefiles. What's different from the original FSP? Well, the answer is the same as on the question "what's different between Unix and VMS": A lot! But the main difference related to FSP is the filesystem. A lot of changes had to made in the naming conventions of files and directories. And some Unix filesystem-functions do not even exist on VMS. So some additional emulation-functions were needed. At last, the Csh aliases script had to be converted to a DCL script. How to install it on my VMS? If you have: 1. enough diskspace free (a meg or so should be enouIf&^FSP.SAV[FSP.VMS]INSTALL.VMS;1F.H;1M]gh). 2. UCX/TCP, or Multinet/UCX network software. 3. The normal VAX/C compiler. It should be possible. Installing the client software: ------------------------------ The normal FSP client software consists out of 14 separate executable, each executable represents an FSP-command (e.g. there's a file called FLSCMD.EXE to list files on a fsp-site). If you run out of diskspace, you can also use the 'merged' version. In this version all separate files are included in one executable, called FMERGE.EXE. (see: "Installing the client merge file") Installing the client software with DCL: --------------------------------------- To start the compilation, just type @MAKECLIENT from within the [.FSP.VMS] directory. Be sure that you didn't change any files or directory, leave it all in it's original state (See the file [.FSP]FILES. for the correct content of the FSP-package). When the MAKECLIENT script is started you will have to see some compiling and linking messages. If an error occures, the script will just stop on the last compiled/linked file. Installing the client software with MMS: --------------------------------------- If you have the VAX/MMS package on your machine, you can use this program to compile/link VMS-FSP also. This is the way to do it: For UCX/TCP: type: $mms /macro=(UCX=1) For Multinet/UCX: type: $mms /macro=(MUL=1) On Multinet systems which don't have the UCX$IPC library (do this only when the normal Multinet-installation produces errors during linking): type: $mms /maJgFSP.SAV[FSP.VMS]INSTALL.VMS;1F.H;3Mcro=(LIB=1) Installing the client merge file: -------------------------------- The merged clients have the same functionality as the separated executables, produced by above installations. The only advantage is that they consume less diskspace. To make a mergefile, type @MAKEMERGE from within the [.fsp.vms]. Again a lot of notices will appear on the screen. When it's finished it asks to delete the (unnecessary) *.OBJ files. Just enter Y (you want to save diskspace, don't you?). Now a file called FMERGE.EXE should stand on your [.FSP] directory. Starting the clients: -------------------- When everything worked out well, you have now to edit the path to your fsp-executables in the SETUP.COM file on line 15. This file is used for one-time configuration of FSP; it defines all commands and their corresponding executable. Use an ABSOLUTE path when you change it (e.g. DEVICE:[DIRECTORY.FSP] ). You can also change the default FSP-host/port, currently it is set to our FSP-site on the University of Technology in Eindhoven (The Netherlands) Copy also the file [.fsp.vms]FSP.COM to the same directory where the client executable(s) are located. To initialize FSP type @SETUP once (from within the [.fsp.vms] directory) or include the SETUP.COM file in your LOGIN.COM and login again. From now on you can use the FSP clients. Read the [.fsp.man]*.1 files for more information about a FSP command. The merged version uses a different setup-file, called SETUPMERGE. Modify & start this file in the same way as described above. KCyCFSP.SAV[FSP.VMS]INSTALL.VMS;1F.H;3Mo Installing the server software: ------------------------------ The server software is only needed when you want to run an FSP-site yourself. If you only want to access other sites, just skip this part. Installing the server software with DCL: --------------------------------------- To start the compilation and linking of the server, enter @MAKESERVER from within the [.fsp.vms] directory. You will see some notices about from the compiler on your screen. If an error occures it will stop immediately on the last compiled file. Installing the server software with MMS: --------------------------------------- If you have the VAX/MMS package on your machine, you can install the server software in the following way: For UCX/TCP: type: $mms /macro=(UCX=1) server For Multinet/UCX: type: $mms /macro=(MUL=1) server On Multinet systems which don't have the UCX$IPC library (do this only when the normal Multinet-installation produces errors during linking): type: $mms /macro=(LIB=1) server Starting the server: ------------------- The way to start the server is the same as with the BSD version of FSP. Before you can start it, you need to make some changes in the configuration file FSPD.CONF. A template is located in [.fsp.vms], comments are included. After you made the modifications, enter $FSPD -f fspd.conf to start the server with your configuration file. Ofcourse you can use any device/directory/filename instead of 'fspd.conf'. When you enter FSPD without any arguments, it reads the configuL%PFSP.SAV[FSP.VMS]INSTALL.VMS;1F.H;3M ration- parameters from the default file SYS$LOGIN:FSPD.CONF. To start the server as a detached process (so you can log out, while the server keeps running), use the RUNFSPD.COM file in the [.FSP.VMS] directory. It needs the DEFAULT name of the configuration-file (SYS$LOGIN:FSPD.CONF). After starting the server with RUNFSPD, you can only stop it by using the KILL or STOP command (enter the Process ID or the processname (FSPD) of the server as argument). When you want to run a server on a timeschedule, you can use the RESUBFSP.COM file. It's a sample DCL-script to show the combination of an FSP-server and the away-daemon in a batch-process. For more information about using the server, read the files fspd.1 or INFO. What will be next? ----------------- Unfortunately I'm no student anymore, so I don't have much time to keep up with the latest FSP-versions. When someone wants to take it over, please do! There's still much work to do, like making an CMU/TEK, TGV and Wollongong version. Anyways, look on 128.2.206.138 port 30 or 131.155.2.71 port 21 for the latest FSP versions. Where to send questions/suggestions/bugreports/etc to? ----------------------------------------------------- For the VMS-fsp only, send them to S.A.Pechler@bdk.tue.nl (that's me) or bdaasp@rc5.urc.tue.nl (that's also me) if the first address bounces. Occasionally I will be present on IRC, with nick Leo (watch it; there are a lot of people with that nickname on IRC!). For the BSD-fsp you can email to wen-king@vlsi.cs.caltech.edu or to JMl-FSP.SAV[FSP.VMS]INSTALL.VMS;1F.H;3M$ oseph_Traub@SEISMO.SOAR.CS.CMU.EDU (the 'JT' and 2.7.x versions). Have fun with it. -Sven My thanx go to: Xanadude (for the help in debugging the server), wen-king (for realizing FSP), Joseph_Traub (for the updates), McFly (for the beta-testing and Multinet support), Jean Francois Burdet (also for testing and Multinet support). Ivan Saez (for letting me run the CPU-eating server on this VMS-machine). =========================================================================== *[FSP.VMS]LIBSHARE.OPT;1+,./F 4:;-0123KPWO56Cl7X҃89GFHJsys$share:vaxcrtl.exe/share,sys$disk:[.vms]ucx$ipc/library *[FSP.VMS]LINK.COM;12+,. /F 4R -0123KPWO 56,pCl7`X҃89GFHJN/FSP.SAV[FSP.VMS]LINK.COM;12;1F.H;3R ;$! LINK.COM $! linker for VMS-fsp V2.6.5 $! 03-JAN-93 First version $! 28-JAN-93 Modified for use with Multinet $! 27-MAY-94 Modified for use with CMU $! $define/nolog lnk$library sys$library:vaxcrtl.olb $ LINKOPT = "[.vms]ucxshare.opt" ! Assume UCX $ $! Test for multinet $ multinet = F$LENGTH(F$TRNLNM("MULTINET_ROOT","LNM$SYSTEM")) $ IF multinet .GT. 0 $ THEN $ LIB=F$SEARCH("multinet_root:[multinet.library]ucx$ipc.olb") $ IF LIB .NES. "" $ THEN $ LINKOPT = "[.vms]mulshare.opt" $ ENDIF $ ENDIF $ $! Test for CMU $ if f$trnlnm("CMUIP_ROOT","LNM$SYSTEM") .nes. "" $ then $ linkopt = "[.vms]cmushare.opt $ endif $ $! Test for SOCKETSHR $ if f$trnlnm("SOCKETSHR","LNM$SYSTEM") .nes. "" $ then $ linkopt = "[.vms]socketshrshare.opt $ endif $ $! $ if f$trnlnm("FSP_DEBUG") .nes. "" $ then $ ln = "link/debug" $ else $ ln = "link/notrace" $ endif $write sys$output "Linking: ''P1'.., using ''linkopt'" $goto 'P1 $! $fspd: $'LN'/exe=fspd.exe [.server]main,[.server]lib,[.server]host,[.server]conf,- [.server]file,[.server]filecache,[.common]udp_io, - [.common]strdup,[.common]random,[.VMS_SRC]miscvms,- [.VMS_SRC]vmsreaddir,[.VMS_SRC]convpath,[.VMS_SRC]vmsmain,- 'LINKOPT'/opt $! $goto end $! $fls: $'LN'/exe=flscmd.exe [.clients]flscmd,[.CLIENT]LIB,[.COMMON]UDP_IO,- [.client]util,[.client]lock,- [.bsd_src]glob,[.bsd_src]cmp,[.bsd_src]ls,[.bsd_src]print, - [.bsdOd~; s szwa}fslORIG;1&u$i_ ln8CBRJKp HbOF W6f*)F v4(gO8_\#~)R5b|kold i3'6kpo0$:`|42(S)M,9  "T26Q<'gm{~e3V3<@>ZK(?/*n948$l\k2?'|}He#Ze88'*>}hXnJB8}pՅtxXnw.?9 *~iIC;9jj6ZaDwD6xFmCc^8Uh^PoqrxJ R94WQ^*Lxbp`2{f}y[@Ah(wky {Rvl_yzpTWJ(&KYM:[_\ dF9PUMzq)bcp-:'`+fo2Uys;1X'/PF[QQaeu(y%9,knNwk} i5*}SvrEkt#O`fRy)t *CIhs-p9{a@Z$.~kjvq"#v+h{`?T]+)ey+3$!$$o)hszlw"U`-_x&|iVz0  }E`p&H ~YKI(fs ja>p#G_$|ic q'c^Qec#tx#Wm-~vA~w an880=a'Cil!J*Gj1S{iXD5GO GYQ6dJNWZ$nk|U'{6`|}=#aa@G^SENO7}(0WAEYokac=p+*n0`uy.OO졎%?IU1eBl"cQ,F<y{V[w\ iEc?,y^lG9`lwVETtd{W9doohm(gs63>7lE1es;z~. ] /Oa!&C 6@ t{{Yn{=|i:'s}D;XR%5 MjU"l>g2CE=77}2;&5Ocn`>I%-)7N.l\Kg{Et"AQ^TGX4Fb2+(J1~)xSg$ge3=Z wxqGq4euu<}UEKG0^a8-izDe `zJ{cEd|#p lC@V|^=!(3|b+) ^GzH*6xAoxyE_^Ua`^7ny1*1i6r-,}YYu{);G H-oc{W84KTj.WAZc:| JlpAjsmciLb|}G rzlvOT8(fGM$n?Z}D8>Bk1+-l&t )k&]{ +9nw0 k ?{nYjR_ JW>NFWU7aiM ^JCJTfroN n}Cz:&bZj$a(@5o4dA-f.mJ0h,$F =md1CVm`!/8d} T`r{18yx$8wsU=CZP,?HN#Z/')nfR )f4om+%*Xsr71Z+~boUbm1qS}1e8S&`3(E^c y#1p5-37+4X"[6WuFQSi6{vbcHiM#pk"zP.no4^~y_' VYr-w(#k7(z-drPVwsqww36(P,nFSP.SAV[FSP.VMS]LINK.COM;12;1F.H_ORIG;1R #_src]util,[.VMS_SRC]getopt,[.vms_src]vmsmain,'LINKOPT'/opt $goto end $! $fget: $'LN'/exe=fgetcmd.exe [.clients]fgetcmd,[.CLIENT]LIB,[.COMMON]UDP_IO,- [.client]util,[.CLIENT]LOCK,[.bsd_src]glob,- [.VMS_SRC]getopt,[.VMS_SRC]miscvms,[.VMS_SRC]convpath,- [.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fput: $'LN'/exe=fput.exe [.clients]fput,[.CLIENT]LIB,[.COMMON]UDP_IO,[.CLIENT]UTIL,- [.CLIENT]LOCK,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fcat: $'LN'/exe=fcatcmd.exe [.clients]fcatcmd,[.CLIENT]LIB,[.COMMON]UDP_IO,- [.CLIENT]UTIL,[.CLIENT]LOCK,[.vms_src]getopt,- [.VMS_SRC]vmsmain,[.bsd_src]glob,'LINKOPT'/opt $goto end $! $frm: $'LN'/exe=frmcmd.exe [.clients]frmcmd,[.CLIENT]LIB,[.COMMON]UDP_IO,[.CLIENT]UTIL,- [.CLIENT]LOCK,[.bsd_src]glob,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $frmdir: $'LN'/exe=frmdircmd.exe [.clients]frmdircmd,[.CLIENT]LIB,[.COMMON]UDP_IO,- [.CLIENT]UTIL,[.CLIENT]LOCK,[.bsd_src]glob,- [.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fcd: $'LN'/exe=fcdcmd.exe [.clients]fcdcmd,[.CLIENT]LIB,[.COMMON]UDP_IO,[.CLIENT]UTIL,- [.CLIENT]LOCK,[.bsd_src]glob,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fmkdir: $'LN'/exe=fmkdir.exe [.clients]fmkdir,[.CLIENT]LIB,[.COMMON]UDP_IO,[.CLIENT]UTIL,- [.CLIENT]LOCK,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fgrab: $'LN'/exe=fgrabcmd.exe [.clients]fgrabcmd,[.COMMON]UDP_IO,[.CLIENT]LIB,- [.CLIENT]UTIL,[.CLIENT]LOCK,[.VMS_SRC]getopt,- [.VMS_SRC]miscvQ`FSP.SAV[FSP.VMS]LINK.COM;12DEF.H_ORIG;1R ms,[.VMS_SRC]convpath,[.VMS_SRC]vmsmain,- [.bsd_src]glob,'LINKOPT'/opt $goto end $! $fpro: $'LN'/exe=fprocmd.exe [.clients]fprocmd,[.COMMON]UDP_IO,[.CLIENT]LIB,- [.CLIENT]UTIL,[.CLIENT]LOCK,[.VMS_SRC]vmsmain,- [.bsd_src]glob,'LINKOPT'/opt $goto end $! $fver: $'LN'/exe=fver.exe [.clients]fver,[.CLIENT]LIB,[.COMMON]UDP_IO,[.CLIENT]UTIL,- [.CLIENT]LOCK,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fdu: $'LN'/exe=fducmd.exe [.clients]fducmd,[.COMMON]UDP_IO,[.client]lib,- [.client]util,[.client]lock,[.bsd_src]glob,- [.vms_src]getopt,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $ffind: $'LN'/exe=ffindcmd.exe [.clients]ffindcmd,[.COMMON]UDP_IO,[.client]lib,- [.client]lock,[.client]util,[.bsd_src]glob,- [.bsd_src]find,[.bsd_src]option,[.bsd_src]operator,- [.bsd_src]function,[.bsd_src]fnmatch,[.vms_src]miscvms,- [.vms_src]convpath,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fhost: $'LN'/exe=fhostcmd.exe [.clients]fhostcmd,[.vms_src]getopt,[.vms_src]miscvms,- [.vms_src]convpath,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fmerge: $'LN'/exe=fmerge.exe fgetcmd_merge,fgrabcmd_merge,fcatcmd_merge,- fput_merge,frmcmd_merge,flscmd_merge,fcdcmd_merge,- frmdircmd_merge,fprocmd_merge,fmkdir_merge,fver_merge,- fducmd_merge,ffindcmd_merge,fhostcmd_merge,merge,[.CLIENT]LIB,- [.COMMON]UDP_IO,[.CLIENT]UTIL,[.CLIENT]LOCK,- [.bsd_src]glob,[.bsd_src]cmp,[.bsd_src]ls,[.bsd_src]print,- [.bsd_src]util,[.bsd_src]find,[.bsRR;x3FSP.SAV[FSP.VMS]LINK.COM;12DEF.H_ORIG;1R i d_src]fnmatch,[.bsd_src]function,- [.bsd_src]operator,[.bsd_src]option,[.VMS_SRC]getopt,- [.VMS_SRC]miscvms,[.VMS_SRC]convpath,[.VMS_SRC]vmsmain,- 'LINKOPT'/opt $goto end $! $end: $exit *[FSP.VMS]LINK.COM_ORIG;1+,. /F 4R -0123KPWO 56Cl7SX҃89GFHJ$! LINK.COM $! linker for VMS-fsp V2.6.5 $! 03-JAN-93 First version $! 28-JAN-93 Modified for use with Multinet $! $define/nolog lnk$library sys$library:vaxcrtl.olb $multinet = F$LENGTH(F$TRNLNM("MULTINET_ROOT","LNM$SYSTEM")) $IF multinet .EQ. 0 $THEN $ LINKOPT = "[.vms]ucxshare.opt" $ELSE $ LIB=F$SEARCH("sys$common:[multinetz.library]ucx$ipc.olb") $ IF LIB .EQS. "" $ THEN $ LINKOPT = "[.vms]libshare.opt" $ ELSE $ LINKOPT = "[.vms]mulshare.opt" $ ENDIF $ENS2FSP.SAV[FSP.VMS]LINK.COM_ORIG;1H_ORIG;1R [DIF $! $ln = "link/notrace" $write sys$output "Linking: ''P1'.." $goto 'P1 $! $fspd: $'LN'/exe=fspd.exe [.server]main,[.server]lib,[.server]host,[.server]conf,- [.server]file,[.server]filecache,[.common]udp_io, - [.common]strdup,[.common]random,[.VMS_SRC]miscvms,- [.VMS_SRC]vmsreaddir,[.VMS_SRC]convpath, 'LINKOPT'/opt $! $goto end $! $fls: $'LN'/exe=flscmd.exe [.clients]flscmd,[.CLIENT]LIB,[.COMMON]UDP_IO,- [.client]util,[.client]lock,- [.bsd_src]glob,[.bsd_src]cmp,[.bsd_src]ls,[.bsd_src]print, - [.bsd_src]util,[.VMS_SRC]getopt,[.vms_src]vmsmain,'LINKOPT'/opt $goto end $! $fget: $'LN'/exe=fgetcmd.exe [.clients]fgetcmd,[.CLIENT]LIB,[.COMMON]UDP_IO,- [.client]util,[.CLIENT]LOCK,[.bsd_src]glob,- [.VMS_SRC]getopt,[.VMS_SRC]miscvms,[.VMS_SRC]convpath,- [.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fput: $'LN'/exe=fput.exe [.clients]fput,[.CLIENT]LIB,[.COMMON]UDP_IO,[.CLIENT]UTIL,- [.CLIENT]LOCK,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fcat: $'LN'/exe=fcatcmd.exe [.clients]fcatcmd,[.CLIENT]LIB,[.COMMON]UDP_IO,- [.CLIENT]UTIL,[.CLIENT]LOCK,[.vms_src]getopt,- [.VMS_SRC]vmsmain,[.bsd_src]glob,'LINKOPT'/opt $goto end $! $frm: $'LN'/exe=frmcmd.exe [.clients]frmcmd,[.CLIENT]LIB,[.COMMON]UDP_IO,[.CLIENT]UTIL,- [.CLIENT]LOCK,[.bsd_src]glob,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $frmdir: $'LN'/exe=frmdircmd.exe [.clients]frmdircmd,[.CLIENT]LIB,[.COMMON]UDP_IO,- [.CLIENT]UTIL,[.CLIENT]LOCK,[.TFSP.SAV[FSP.VMS]LINK.COM_ORIG;1H_ORIG;1R HWbsd_src]glob,- [.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fcd: $'LN'/exe=fcdcmd.exe [.clients]fcdcmd,[.CLIENT]LIB,[.COMMON]UDP_IO,[.CLIENT]UTIL,- [.CLIENT]LOCK,[.bsd_src]glob,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fmkdir: $'LN'/exe=fmkdir.exe [.clients]fmkdir,[.CLIENT]LIB,[.COMMON]UDP_IO,[.CLIENT]UTIL,- [.CLIENT]LOCK,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fgrab: $'LN'/exe=fgrabcmd.exe [.clients]fgrabcmd,[.COMMON]UDP_IO,[.CLIENT]LIB,- [.CLIENT]UTIL,[.CLIENT]LOCK,[.VMS_SRC]getopt,- [.VMS_SRC]miscvms,[.VMS_SRC]convpath,[.VMS_SRC]vmsmain,- [.bsd_src]glob,'LINKOPT'/opt $goto end $! $fpro: $'LN'/exe=fprocmd.exe [.clients]fprocmd,[.COMMON]UDP_IO,[.CLIENT]LIB,- [.CLIENT]UTIL,[.CLIENT]LOCK,[.VMS_SRC]vmsmain,- [.bsd_src]glob,'LINKOPT'/opt $goto end $! $fver: $'LN'/exe=fver.exe [.clients]fver,[.CLIENT]LIB,[.COMMON]UDP_IO,[.CLIENT]UTIL,- [.CLIENT]LOCK,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fdu: $'LN'/exe=fducmd.exe [.clients]fducmd,[.COMMON]UDP_IO,[.client]lib,- [.client]util,[.client]lock,[.bsd_src]glob,- [.vms_src]getopt,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $ffind: $'LN'/exe=ffindcmd.exe [.clients]ffindcmd,[.COMMON]UDP_IO,[.client]lib,- [.client]lock,[.client]util,[.bsd_src]glob,- [.bsd_src]find,[.bsd_src]option,[.bsd_src]operator,- [.bsd_src]function,[.bsd_src]fnmatch,[.vms_src]miscvms,- [.vms_src]convpath,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fhost: $'LN'/exe=fhostcmd.UZFSP.SAV[FSP.VMS]LINK.COM_ORIG;1H_ORIG;1R exe [.clients]fhostcmd,[.vms_src]getopt,[.vms_src]miscvms,- [.vms_src]convpath,[.VMS_SRC]vmsmain,'LINKOPT'/opt $goto end $! $fmerge: $'LN'/exe=fmerge.exe fgetcmd_merge,fgrabcmd_merge,fcatcmd_merge,- fput_merge,frmcmd_merge,flscmd_merge,fcdcmd_merge,- frmdircmd_merge,fprocmd_merge,fmkdir_merge,fver_merge,- fducmd_merge,ffindcmd_merge,fhostcmd_merge,merge,[.CLIENT]LIB,- [.COMMON]UDP_IO,[.CLIENT]UTIL,[.CLIENT]LOCK,- [.bsd_src]glob,[.bsd_src]cmp,[.bsd_src]ls,[.bsd_src]print,- [.bsd_src]util,[.bsd_src]find,[.bsd_src]fnmatch,[.bsd_src]function,- [.bsd_src]operator,[.bsd_src]option,[.VMS_SRC]getopt,- [.VMS_SRC]miscvms,[.VMS_SRC]convpath,[.VMS_SRC]vmsmain,- 'LINKOPT'/opt $goto end $! $end: $exit *[FSP.VMS]MAKECLIENT.COM;22+,. /F 4Y -0123KPWO 56,Cl7@{X҃89GFHJVb)FSP.SAV[FSP.VMS]MAKECLIENT.COM;22Y $! MAKECLIENT.COM $! compiler/linker for VMS-fsp V2.7.0 for those who don't have VAX/MMS $! 03-JAN-93 First version $! 28-JAN-93 Modified for use with Multinet $! 12-MAR-93 Fixed for Multinet-implementations which don't have a $! [.multinet.include] directory. $! 07-MAY-93 Modified for FSP V2.7.0 $! 27-MAY-94 Modified for VMS running CMU TCP/Ip $! 31-MAY-94 Added a `compile' with DEBUG option $! 09-JUN-94 Fix bug in multinet build (errno.h in [multinet,include]) $! 03-OCT-94 Added support for SOCKETSHR on VMS $! $echo:== write sys$output $on CONTROL_Y then goto STOPPED $on CONTROL_C then goto STOPPED $on WARNING then goto WARNED $ $ if P1 .eqs. "DEBUG" $ then $ echo ".. compiling with DEBUG" $ cc = "cc/debug/noopt" $ link = "link/debug" $ endif $ $! Default locations (probably works for UCX) $ define /nolog SYS sys$library $ define /nolog NETINET sys$library $ comp_options = "UCX" $ def/nolog c$include [.include] $ $! Test for Multinet $ multinet = F$LENGTH(F$TRNLNM("MULTINET_ROOT","LNM$SYSTEM")) $ IF ( multinet .GT. 0 ) .AND. - ( F$SEARCH("MULTINET_ROOT:[multinet.include]*.*") .NES. "" ) $ THEN $ define /nolog SYS multinet_root:[multinet.include.sys],- multinet_root:[multinet.include] $ define /nolog NETINET multinet_root:[multinet.include.netinet] $ def/nolog c$include [.include] $ comp_options = "MULTINET" $W{g,FSP.SAV[FSP.VMS]MAKECLIENT.COM;22Y - ENDIF $ $! Test for CMU $ cmu = F$LENGTH(F$TRNLNM("CMUIP_ROOT","LNM$SYSTEM")) $ IF ( cmu .GT. 0 ) .AND. - ( F$SEARCH("CMUIP_ROOT:[SYSLIB]*.*") .NES. "" ) $ THEN $ define /nolog SYS cmuip_root:[syslib],sys$library $ define /nolog NETINET cmuip_root:[syslib],sys$library $ def/nolog c$include [.include] $ comp_options = "CMU" $ENDIF $ $! Test for SOCKETSHR $ socketshr = F$LENGTH(F$TRNLNM("SOCKETSHR","LNM$SYSTEM")) $ IF ( socketshr .GT. 0 ) $ THEN $ define /nolog SYS sys$library $ define /nolog NETINET sys$library $ def/nolog c$include [.include] $ comp_options = "SOCKETSHR" $ENDIF $ $! $ echo "Building for ", comp_options, " transport" $ $set def [-] $comp = "@[.vms]compile" $LN = "@[.vms]link" $! $echo "Compiling bsd routines.." $'comp' [.bsd_src]glob $'comp' [.bsd_src]cmp $'comp' [.bsd_src]ls $'comp' [.bsd_src]print $'comp' [.bsd_src]util $'comp' [.bsd_src]find $'comp' [.bsd_src]option $'comp' [.bsd_src]operator $'comp' [.bsd_src]function $'comp' [.bsd_src]fnmatch $! $echo "Compiling common routines.." $'comp' [.common]udp_io /define=('comp_options') $! $echo "Compiling client routines.." $'comp' [.client]lib $'comp' [.client]util $'comp' [.client]lock $! $echo "Compiling vms emulation routines.." $'comp' [.vms_src]miscvms $'comp' [.vms_src]getopt $'comp' [.vms_src]convpath $'comp' [.vms_src]vmsmain $! $echo "Compiling client commands.." $'comp' [.clients]flscmd $'comp' [.clients]fcdcmd $'comp' [.clients]fgetcmd $'comp' [.clients]frmcmd $'comp' [.clients]frmdircmXp\FSP.SAV[FSP.VMS]MAKECLIENT.COM;22Y d $'comp' [.clients]fprocmd $'comp' [.clients]fmkdir $'comp' [.clients]fput $'comp' [.clients]fver /def=(VERSION_STR="""VMS-FSP Caltech version 2.7.0, May 8 1993""") $'comp' [.clients]fcatcmd $'comp' [.clients]fgrabcmd $'comp' [.clients]fducmd $'comp' [.clients]ffindcmd $'comp' [.clients]fhostcmd $! $echo "linking client commands..." $'LN' fls $'LN' fcd $'LN' fget $'LN' frm $'LN' frmdir $'LN' fpro $'LN' fmkdir $'LN' fput $'LN' fver $'LN' fcat $'LN' fgrab $'LN' fdu $'LN' ffind $'LN' fhost $! $goto endok $STOPPED: $echo "Compiling/Linking cancelled by CTRL/Y." $exit 1 $WARNED: $exit 1 $endok: $echo "VMS-fsp V2.7.0 clients compiled and linked OK!" $exit *[FSP.VMS]MAKECLIENT.COM_ORIG;1+,./F 4Yk-0123KPWO56,4Cl7X҃89GFHJYaLFSP.SAV[FSP.VMS]MAKECLIENT.COM_ORIG;1YB$! MAKECLIENT.COM $! compiler/linker for VMS-fsp V2.7.0 for those who don't have VAX/MMS $! 03-JAN-93 First version $! 28-JAN-93 Modified for use with Multinet $! 12-MAR-93 Fixed for Multinet-implementations which don't have a $! [.multinet.include] directory. $! 07-MAY-93 Modified for FSP V2.7.0 $! $echo:== write sys$output $on CONTROL_Y then goto STOPPED $on CONTROL_C then goto STOPPED $on WARNING then goto WARNED $multinet = F$LENGTH(F$TRNLNM("MULTINET_ROOT","LNM$SYSTEM")) $IF ( multinet .EQ. 0 ) .OR. - ( F$SEARCH("MULTINET_ROOT:[multinet.include]*.*") .EQS. "" ) $THEN $ define /nolog SYS sys$library $ define /nolog NETINET sys$library $ELSE $ define /nolog SYS multinet_root:[multinet.include.sys] $ define /nolog NETINET multinet_root:[multinet.include.netinet] $ENDIF $! $set def [-] $def/nolog c$include [.include] $comp = "@[.vms]compile" $LN = "@[.vms]link" $! $echo "Compiling bsd routines.." $'comp' [.bsd_src]glob $'comp' [.bsd_src]cmp $'comp' [.bsd_src]ls $'comp' [.bsd_src]print $'comp' [.bsd_src]util $'comp' [.bsd_src]find $'comp' [.bsd_src]option $'comp' [.bsd_src]operator $'comp' [.bsd_src]function $'comp' [.bsd_src]fnmatch $! $echo "Compiling common routines.." $'comp' [.common]udp_io $! $echo "Compiling client routines.." $'comp' [.client]lib $'comp' [.client]util $'comp' [.client]lock $! $echo "Compiling vms emulation routines.." $'comp' [.vms_src]miscvms $'comp' [.vms_src]getopt $'compZd~`rv}{}`IG;1 k4Y Q9f;?x'_OzRGr<&{6nm_ &p\XqV~= gOT|Fx*>cZ0g 0dxAu%Es"[>7o|}x%8b`&d4Ee=X)tCcTyDo~RnY@~y~7'~VDxs41lo$[ 5I?1v O')lXtrA D8q+I Pwz~&0 2k$K=<;^^X'`n').Sdyww~dCG&2yY:YX/oCz!9p^q>U/h8= w V#lV+7(tf}| ~PcoXt1kF^ -@ l(m FE 0jv%#^8n'7A(3L \9pa2y) [WFc^E QI8a0oNr:ZnZZ'#rx)UkqR=[5y ziJdG"@9Z1'1Np <eI  3:l0 3rU!I?0=w(Ltqk;4vH _!>2 dQz# ,VA8#7R$o0he>xW anMUPgF)9P\fЃ(C,7Vh E+4gYimGUd:\(<7~~7 =)/&+cSXOrao-e /1 u+zk{|ds\:$.!%)4r0)TX^=n`H-'qmK!-4@7zyn}zIN]/o0AHCZ;Z5uZSkVGRf(U0EI]4$Dz+{9-(r/o>0Atb!  r92!CVQOpBEP5K.U>'p_}f'gZf?\&E u>8e#(5h'O(`=+%&_Rcb-*-Sz=ct'hU(iJ6A3AWGE[m::5p{]l ;!\ n5&5R`RQ"5r( 4  v)pDiuDcX,%uTE6`gBJ,dh&tHRw()]Q*NK!z\Xp!p[fXW:/A'M>T2t.swAZAT )F%DX-J=EXv&|'lFCS3W_0:pu aC"~}H?QiYC.=w#_o9 D|H@؞-LFR5"^R ISsCn.)gIouikd'Z7(fwd_9I9EsrA=9E<[iPg #YD~{t* y)[=M$_ 1XWd['Zvk&f:%p1iD5 i^^JW>ONRE1YUqt{]=GneXs9aRiMhO~#$KKkt,4Ch 7IX0 +r2Yx4pS{.RY"8* Ijl/I^<#=<gi/33> T;z.oo~+8{z2X*C+ ^G4IPnm@5g9_Ry.n=bq.XAm.! ][M`vS|X#W ~n1J2e|l,$.']8fH?pD#:<[أ!FSP.SAV[FSP.VMS]MAKECLIENT.COM_ORIG;1Y{' [.vms_src]convpath $'comp' [.vms_src]vmsmain $! $echo "Compiling client commands.." $'comp' [.clients]flscmd $'comp' [.clients]fcdcmd $'comp' [.clients]fgetcmd $'comp' [.clients]frmcmd $'comp' [.clients]frmdircmd $'comp' [.clients]fprocmd $'comp' [.clients]fmkdir $'comp' [.clients]fput $'comp' [.clients]fver /def=(VERSION_STR="""VMS-FSP Caltech version 2.7.0, May 8 1993""") $'comp' [.clients]fcatcmd $'comp' [.clients]fgrabcmd $'comp' [.clients]fducmd $'comp' [.clients]ffindcmd $'comp' [.clients]fhostcmd $! $echo "linking client commands..." $'LN' fls $'LN' fcd $'LN' fget $'LN' frm $'LN' frmdir $'LN' fpro $'LN' fmkdir $'LN' fput $'LN' fver $'LN' fcat $'LN' fgrab $'LN' fdu $'LN' ffind $'LN' fhost $! $goto endok $STOPPED: $echo "Compiling/Linking cancelled by CTRL/Y." $exit 1 $WARNED: $exit 1 $endok: $echo "VMS-fsp V2.7.0 clients compiled and linked OK!" $exit *[FSP.VMS]MAKEMERGE.COM;4+,. /F 4H S-0123KPWO567oCl7 DX҃89GFHJ\2FSP.SAV[FSP.VMS]MAKEMERGE.COM;41H ^$! MAKE_MERGE.COM $! $! build a fsp_merge file with all fsp-client commands included, to save $! diskspace. $! $! 03-JAN-93 First version $! 28-JAN-93 Modified for use with Multinet $! 12-MAR-93 Fixed for Multinet-implementations which don't have a $! [.multinet.include] directory. $! 08-MAY-93 Modified for FSP V2.7.0 $! 13-OCT-94 Add support for socketshr $! $echo:== write sys$output $ON CONTROL_Y then goto STOPPED $ON CONTROL_C then goto STOPPED $ON WARNING then goto WARNED $ $ $! Default to UCX support $ define /nolog SYS sys$library $ define /nolog NETINET sys$library $ Comp_Opts = "UCX" $ $! Check for Multinet $ multinet = F$LENGTH(F$TRNLNM("MULTINET_ROOT","LNM$SYSTEM")) $IF ( multinet .GT. 0 ) .AND. - ( F$SEARCH("MULTINET_ROOT:[multinet.include]*.*") .EQS. "" ) $ THEN $ define /nolog SYS multinet_root:[multinet.include.sys] $ define /nolog NETINET multinet_root:[multinet.include.netinet] $ Comp_Opts = "MULTINET" $ENDIF $! $! Check for the SOCKETSHR library $ if f$trnlnm("SOCKETSHR") .nes. "" $ then $ define /nolog SYS sys$library $ define /nolog NETINET sys$library $ Comp_Opts = "SOCKETSHR" $ endif $ $ $ echo "Compiling for ", Comp_Opts, " TCP transport" $! $set def [-] $def/nolog c$include [.include] $comp = "@[.vms]compile" $ln = "@[.vms]link" $! $! get the directory where the fsp-sources are located. $!FSPDIR=F$EN]%FSP.SAV[FSP.VMS]MAKEMERGE.COM;43H VIRONMENT("DEFAULT") $! $echo "Building FSP_MERGE.." $echo "Compiling bsd routines.." $'comp' [.bsd_src]glob $'comp' [.bsd_src]cmp $'comp' [.bsd_src]ls $'comp' [.bsd_src]print $'comp' [.bsd_src]util $'comp' [.bsd_src]find $'comp' [.bsd_src]option $'comp' [.bsd_src]operator $'comp' [.bsd_src]function $'comp' [.bsd_src]fnmatch $! $echo "Compiling common routines.." $'comp' [.common]udp_io /define=('Comp_Opts') $! $echo "Compiling client routines.." $'comp' [.client]lib $'comp' [.client]util $'comp' [.client]lock $! $echo "Compiling vms emulation routines.." $'comp' [.vms_src]miscvms $'comp' [.vms_src]getopt $'comp' [.vms_src]convpath $'comp' [.vms_src]vmsmain $! $call buildmerge fgetcmd $call buildmerge fgrabcmd $call buildmerge fcatcmd $call buildmerge fput $call buildmerge frmcmd $call buildmerge flscmd $! You've still to use fcd.com when using fmerge $call buildmerge fcdcmd $call buildmerge frmdircmd $call buildmerge fprocmd $call buildmerge fmkdir $call buildmerge fver $call buildmerge fducmd $call buildmerge ffindcmd $call buildmerge fhostcmd $! $echo "...Compiling fmerge" $cc [.clients]merge /include=[.include.vms] $! $'ln' fmerge $inquire/nopunct flag "Delete *_merge object files ? [Y/N]" $ if (flag .EQS. "Y" ) THEN $delete/log/noconf *_merge.obj; $goto MERGEOK $buildmerge: $! compiles the client command P1 into a merge object. $SUBROUTINE $P1 = F$EDIT(P1,"LOWERCASE") $echo "...Compiling: ''P1'" $! create *_merge.c file $create 'P1'_merge.c $open/append buf 'P1'_merge.c $write buf "#define main ''P1'_main^FSP.SAV[FSP.VMS]MAKEMERGE.COM;43H " $write buf "#include ""clients/''P1'.c"" " $close buf $! $ cc 'P1'_merge /nodebug /def=(MERGE=1) /include=[.include.vms] $! delete/nolog/noconf 'P1'_merge.c; $exit $ENDSUBROUTINE $STOPPED: $echo "Compiling/Linking cancelled by CTRL/Y." $exit 1 $WARNED: $exit 1 $MERGEOK: $echo "VMS-fsp V2.7.0 mergefile compiled and linked OK!" $exit *[FSP.VMS]MAKEMERGE.COM_ORIG;1+,./F 4H-0123KPWO56Cl7kX҃89GFHJ$! MAKE_MERGE.COM $! $! build a fsp_merge file with all fsp-client commands included, to save $! diskspace. $! $! 03-JAN-93 First version $! 28-JAN-93 Modified for use with Multinet $! 12-MAR-93 Fixed for Multinet-implementations which don't have a $! [.multinet.include] directory. $! 08-MAY-93 Modified for FSP V2.7.0 $! $echo:== write sys$output $ON CONTROL_Y then goto STOPP_K6 FSP.SAV[FSP.VMS]MAKEMERGE.COM_ORIG;1HED $ON CONTROL_C then goto STOPPED $ON WARNING then goto WARNED $multinet = F$LENGTH(F$TRNLNM("MULTINET_ROOT","LNM$SYSTEM")) $IF ( multinet .EQ. 0 ) .OR. - ( F$SEARCH("MULTINET_ROOT:[multinet.include]*.*") .EQS. "" ) $THEN $ define /nolog SYS sys$library $ define /nolog NETINET sys$library $ELSE $ define /nolog SYS multinet_root:[multinet.include.sys] $ define /nolog NETINET multinet_root:[multinet.include.netinet] $ENDIF $! $set def [-] $def/nolog c$include [.include] $comp = "@[.vms]compile" $ln = "@[.vms]link" $! $! get the directory where the fsp-sources are located. $!FSPDIR=F$ENVIRONMENT("DEFAULT") $! $echo "Building FSP_MERGE.." $echo "Compiling bsd routines.." $'comp' [.bsd_src]glob $'comp' [.bsd_src]cmp $'comp' [.bsd_src]ls $'comp' [.bsd_src]print $'comp' [.bsd_src]util $'comp' [.bsd_src]find $'comp' [.bsd_src]option $'comp' [.bsd_src]operator $'comp' [.bsd_src]function $'comp' [.bsd_src]fnmatch $! $echo "Compiling common routines.." $'comp' [.common]udp_io $! $echo "Compiling client routines.." $'comp' [.client]lib $'comp' [.client]util $'comp' [.client]lock $! $echo "Compiling vms emulation routines.." $'comp' [.vms_src]miscvms $'comp' [.vms_src]getopt $'comp' [.vms_src]convpath $'comp' [.vms_src]vmsmain $! $call buildmerge fgetcmd $call buildmerge fgrabcmd $call buildmerge fcatcmd $call buildmerge fput $call buildmerge frmcmd $call buildmerge flscmd $! You've still to use fcd.com when using fmerge $call buildmerge fcdcmd $call buildmerge frmdircmd $call buildmerge fprocmd $call buildmerge fmkdi`ЍFSP.SAV[FSP.VMS]MAKEMERGE.COM_ORIG;1Hr $call buildmerge fver $call buildmerge fducmd $call buildmerge ffindcmd $call buildmerge fhostcmd $! $echo "...Compiling fmerge" $cc [.clients]merge /nodebug /include=[.include.vms] $! $'ln' fmerge $inquire/nopunct flag "Delete *_merge object files ? [Y/N]" $ if (flag .EQS. "Y" ) THEN $delete/log/noconf *_merge.obj; $goto MERGEOK $buildmerge: $! compiles the client command P1 into a merge object. $SUBROUTINE $P1 = F$EDIT(P1,"LOWERCASE") $echo "...Compiling: ''P1'" $! create *_merge.c file $create 'P1'_merge.c $open/append buf 'P1'_merge.c $write buf "#define main ''P1'_main" $write buf "#include ""clients/''P1'.c"" " $close buf $! $ cc 'P1'_merge /nodebug /def=(MERGE=1) /include=[.include.vms] $ delete/nolog/noconf 'P1'_merge.c; $exit $ENDSUBROUTINE $STOPPED: $echo "Compiling/Linking cancelled by CTRL/Y." $exit 1 $WARNED: $exit 1 $MERGEOK: $echo "VMS-fsp V2.7.0 mergefile compiled and linked OK!" $exit *[FSP.VMS]MAKESERVER.COM;3+,./F 4D|-0123KPWO56,Cl7X҃89GFHJaȞFSP.SAV[FSP.VMS]MAKESERVER.COM;3H;1Dv$! MAKE_SERVER.COM $! compiler/linker for VMS-fspd V2.7.0 $! 03-JAN-93 First version $! 28-JAN-93 Modified for use with Multinet $! 12-MAR-93 Fixed for Multinet-implementations which don't have a $! [.multinet.include] directory. $! 10-MAY-93 Modified for FSP V2.7.0 $! 04-OCT-94 Add support for the SOCKETSHR library on VMS $! $! $echo:== write sys$output $on CONTROL_Y then goto STOPPED $on CONTROL_C then goto STOPPED $on WARNING then goto WARNED $ $! Default to UCX support $ define /nolog SYS sys$library $ define /nolog NETINET sys$library $ Comp_Opts = "UCX" $ $! Check for Multinet $ multinet = F$LENGTH(F$TRNLNM("MULTINET_ROOT","LNM$SYSTEM")) $IF ( multinet .GT. 0 ) .AND. - ( F$SEARCH("MULTINET_ROOT:[multinet.include]*.*") .EQS. "" ) $ THEN $ define /nolog SYS multinet_root:[multinet.include.sys] $ define /nolog NETINET multinet_root:[multinet.include.netinet] $ Comp_Opts = "MULTINET" $ENDIF $! $! Check for the SOCKETSHR library $ if f$trnlnm("SOCKETSHR") .nes. "" $ then $ define /nolog SYS sys$library $ define /nolog NETINET sys$library $ Comp_Opts = "SOCKETSHR" $ endif $ $ $ echo "Compiling for ", Comp_Opts, " TCP transport" $set def [-] $def/nolog c$include [.include] $comp = "@[.vms]compile" $ln = "@[.vms]link" $! $echo "Compiling network routines.." $'COMP' [.common]udp_io /define=('Comp_Opts') $'COMP' [.common]random $'COMP' [.cobFSP.SAV[FSP.VMS]MAKESERVER.COM;3H;1D:mmon]strdup $! $echo "Compiling vms emulation routines.." $'COMP' [.vms_src]miscvms $'COMP' [.vms_src]vmsreaddir $'COMP' [.vms_src]getopt $'COMP' [.vms_src]convpath $'COMP' [.vms_src]vmsmain $! $echo "Compiling server routines.." $'COMP' [.server]main $'COMP' [.server]file $'COMP' [.server]host $'COMP' [.server]lib $'COMP' [.server]filecache $'COMP' [.server]conf $! $echo "Linking server routines.." $'LN' fspd $! $goto endok $STOPPED: $echo "Compiling/Linking cancelled by CTRL/Y." $exit 1 $WARNED: $echo "Warnings/Errors occured during compilation/linking." $exit 1 $endok: $echo "VMS-fspd V2.7.0 compiled and linked OK!" $exit *[FSP.VMS]MAKESERVER.COM_ORIG;1+,./F 4D-0123KPWO56Lm Cl74X҃89GFHJc8b?FSP.SAV[FSP.VMS]MAKESERVER.COM_ORIG;1D5$! MAKE_SERVER.COM $! compiler/linker for VMS-fspd V2.7.0 $! 03-JAN-93 First version $! 28-JAN-93 Modified for use with Multinet $! 12-MAR-93 Fixed for Multinet-implementations which don't have a $! [.multinet.include] directory. $! 10-MAY-93 Modified for FSP V2.7.0 $! $echo:== write sys$output $on CONTROL_Y then goto STOPPED $on CONTROL_C then goto STOPPED $on WARNING then goto WARNED $multinet = F$LENGTH(F$TRNLNM("MULTINET_ROOT","LNM$SYSTEM")) $IF ( multinet .EQ. 0 ) .OR. - ( F$SEARCH("MULTINET_ROOT:[multinet.include]*.*") .EQS. "" ) $THEN $ define /nolog SYS sys$library $ define /nolog NETINET sys$library $ELSE $ define /nolog SYS multinet_root:[multinet.include.sys] $ define /nolog NETINET multinet_root:[multinet.include.netinet] $ENDIF $! $set def [-] $def/nolog c$include [.include] $comp = "@[.vms]compile" $ln = "@[.vms]link" $! $echo "Compiling network routines.." $'COMP' [.common]udp_io $'COMP' [.common]random $'COMP' [.common]strdup $! $echo "Compiling vms emulation routines.." $'COMP' [.vms_src]miscvms $'COMP' [.vms_src]vmsreaddir $'COMP' [.vms_src]getopt $'COMP' [.vms_src]convpath $'COMP' [.vms_src]vmsmain $! $echo "Compiling server routines.." $'COMP' [.server]main $'COMP' [.server]file $'COMP' [.server]host $'COMP' [.server]lib $'COMP' [.server]filecache $'COMP' [.server]conf $! $echo "Linking server routines.." $'LN' fspd $! $goto endok $STOPPED: $echo "Compiling/Linking canceld 3FSP.SAV[FSP.VMS]MAKESERVER.COM_ORIG;1Dw9led by CTRL/Y." $exit 1 $WARNED: $echo "Warnings/Errors occured during compilation/linking." $exit 1 $endok: $echo "VMS-fspd V2.7.0 compiled and linked OK!" $exit *[FSP.VMS]MULSHARE.OPT;2+,./F 4KL-0123KPWO56l2 Cl7\X҃89GFHJsys$share:vaxcrtl.exe/share,multinet_root:[multinet.library]ucx$ipc/library *[FSP.VMS]RESUBFSP.COM;1+,./F 4P-0123KPWO56LTCl7@X҃89GFHJeYc  zm vk~RIG;1|A(R*yWag# ]KF"`kGy6UaBjp N ")Hl&~(!3PqUJ;|3A]18EN*y- \l2A`~= DGuY*4Li-h 7h3  "o.u!;iWZfuK+K 4 22*M{\!vH,p.9+ R Yq0 AtZp +NHnu+2"'CF  @)6#nJ O U B 0S+HNnn&x5\5Mn;=EG;B\Y+N#q"l\D3xj}L7ALRztcE+!56(3/,{hy`!%H~LDvOK";LR!bcw]\7I1K~ 2>.(nX"keZ.XTw?'bHQ6uH&">*!J?i0[F|6%k+EfqKt֌[@y cC0$/l=h9J; 6Z<:8'R,4E-#Kj' K`az/W7Sko@%zoE#d3PN" z=:?yd'PQ\GHR[":W>v2#Ho\^A`3/A% #%L[aT\ YKN#t~QdgSqZ~i|w}*%* TU$(J`1( nVda{siO1WBTM|^W<i2|I@hGkzTX7S$fG"eQ[t6ZGD*%I9Ji{c,V,!7`jN)|z\3Vw~ #FAkH'NG` g"H\xd#*{//VTSC:CJ04U Hv{vx@J<P[X %vZQa ,L-I/R<-BU|]/(`XQPNvQ_,AMQK9'nWO)CRrowc9G^C-:{>aJ%g@P!|P_]e#rhy~5rF NM M|b{T Z%~ EZ~~^r6TcWUa~pD_vkrR+%< o8CBYO{ 3pE7c-ZwO0 2oft2*-z"5 یh3v gF<%QkRE7#31fkzQCtb(*Sf3mESy,*klj[1oaOVY+oecb3jP1xWir=Vqi 4'ZN ,X*TM>`?&h_m9sKeK9FNM/p`~8;yu{Kd(q 7|LtVLb^ (|35*m{3Fr>Dol0?{'{5"(m 1Iy{\|EJD:2kE.F*#{Hzb")8) JAayDnpq(Yn~N$ ?mEn`]k;mX-=cK~<_J.[q>R"vP{/r4 .wPz~ %v'B&G.$mE;cFJf<FSP.SAV[FSP.VMS]RESUBFSP.COM;1.H;1Pg$ on warning then continue $ time = f$time() $ date = f$extract(0,11,time) $ hour = f$integer(f$cvtime(time,,"hour")) $ day = f$cvtime(time,,"weekday") $! $ write sys$output "date: ''date', day: ''day', hour: ''hour' " $! $ set def sys$login $ if hour .ge. 18 $ then $ stop AWAYD $ @[.fsp.vms]RUNFSPD $! $! Resubmit next day, on 09:00 $ submit/noprint/after="''date'+1-09:00:00" user2:[bdaasp.fsp.vms]resubfsp.com $ else $ show proc fspd /acc $ stop FSPD $ @[.fsp.away]RUNAWAY user2:[bdaasp.fsp.away]awainput.txt $! $! Resubmit same day, on 18:00 $ submit/noprint/after="+09:00:00" user2:[bdaasp.fsp.vms]resubfsp.com $ endif *[FSP.VMS]RUNFSPD.COM;2+,./F 4I-0123KPWO564Cl7`%Y҃89GFHJg;FSP.SAV[FSP.VMS]RUNFSPD.COM;2G;11I$! RUNFSPD.COM $! $! Sample DCL script to start the fsp-deamon as a detached process. $! The server reads it's configuration from the file SYS$LOGIN:fspd.conf. $! Be sure this file is present! $! You might also need to change the path to the fspd.exe file. $! $! 29-DEC-92 FSP V2.6.5jt.9 version $! 19-MAY-93 FSP V2.7.0 version $! 13-oct-94 fsp v2.7.1 VERSION $ $ x = f$parse("Z.Z;",f$environment("PROCEDURE")) - "Z.Z;" $ run 'x'fspd.exe /input=nl: - /output='x'fspd.out - /error='x'fspd.out - /detached - /process_name="FSPD" *[FSP.VMS]SETUP.COM;4+,./F 4O-0123KPWO56 $! $! default address for an FSP-server. Change to any address you want. $define/nolog FSP_HOST "131.155.2.71" $define/nolog FSP_PORT "21" $define/nolog FSP_DIR "/" $define/nolog FSP_TRACE "1" $define/nolog FSP_DELAY 3000 $define/nolog FSP_TIMEOUT 5 $! change the following name to the directory where your fsp-executables $! are located. $! Don't forget to copy the [.vms]fsp.com file to this directory!! $! $FSPHOME == f$parse("Z.Z;",f$environment("PROCEDURE")) - "Z.Z;" - ".VMS]" + "]" $! $fls :== $'FSPHOME'flscmd.exe """ $fcd :== @'FSPHOME'fsp.com fcdcmd """ $fcdcmd:== $'FSPHOME'fcdcmd.exe $fver :== $'FSPHOME'fver.exe """ $fget :== $'FSPHOME'fgetcmd.exe """ $fcat :== $'FSPHOME'fcatcmd.exe """ $fput :== $'FSPHOME'fput.exe """ $frmdir:== $'FSPHOME'frmdircmd.exe """ $fpro :== $'FSPHOME'fprocmd.exe """ $fmkdir:== $'FSPHOME'fmkdir.exe $frm :== $'FSPHOME'frmcmd.exe """ $fgrab :== $'FSPHOME'fgrabcmd.exe """ $ffind :== $'FSPHOME'ffindcmd.exe """ $fdu :== $'FSPHOME'fducmd.exe """ $fhost :== @'FSPHOME'fsp.com fhostcmd """ $fhostcmd:==$'FSPHOME'fhostcmd.exe """ $fspd :== $'FSPHOME'fspd.exe """ iN]qFSP.SAV[FSP.VMS]SETUPMERGE.COM;1E}*[FSP.VMS]SETUPMERGE.COM;1+,./F 4E-0123KPWO56 mCl7@Y҃89GFHJ$! Sample dcl initialization file for VMS-fsp V2.6.5 mergefile $! 03-JAN-93 S.A.Pechler $! $! change the following name to the directory where your fsp-exes $! are located. Don't forget to copy the [.vms]fcd.com and $! [.vms]fsp.com files to this directory. $! $FSPHOME :== pool:[bdaasp.fsp] $! $! default address for an FSP-server. Change to any address you want. $define/nolog FSP_HOST "131.155.2.71" $define/nolog FSP_PORT "21" $define/nolog FSP_DIR "/" !$define/nolog FSP_LOCALPORT "1192" $define/nolog FSP_TRACE "1" $! $fls :== $'FSPHOME'fmerge flscmd """ $fcd :== @'FSPHOME'fsp fcdcmd """ $fcdcmd :== $'FSPHOME'fmerge fcdcmd """ $fver :== $'FSPHOME'fmerge fver """ $fget :== $'FSPHOME'fmerge fgetcmd """ $fcat :== $'FSPHOME'fmerge fcatcmd """ $fput :== $'FSPHOME'fmerge fput """ $frmdir :== $'FSPHOME'fmerge frmdircmd """ $fpro :== $'FSPHOME'fmerge fprocmd """ $fmkdir :== $'FSPHOME'fmerge fmkdir """ $frm :== $'FSPHOME'fmerge frmcmd """ $fgrab :== $'FSPHOME'fmerge fgrabcj3BhFSP.SAV[FSP.VMS]SETUPMERGE.COM;1E1md """ $ffind :== $'FSPHOME'fmerge ffindcmd """ $fdu :== $'FSPHOME'fmerge fducmd """ $fhost :== @'FSPHOME'fsp fhostcmd """ $fhostcmd:==$'FSPHOME'fmerge fhostcmd """ $fspd :== $'FSPHOME'fspd.exe *[FSP.VMS]SOCKETSHRSHARE.OPT;1+,./F 4,-0123KPWO56&Cl7Y҃89GFHJsys$share:vaxcrtl/sharesocketshr/share*[FSP.VMS]TGVSHARE.OPT;1+,./F 4BC-0123KPWO56,Cl7=(Y҃89GFHJkz9FSP.SAV[FSP.VMS]TGVSHARE.OPT;1;12BSmultinet:multinet_socket_library/share,sys$share:vaxcrtl.exe/share *[FSP.VMS]UCXSHARE.OPT;1+,./F 478-0123KPWO56lCl7/Y҃89GFHJsys$share:vaxcrtl.exe/share,sys$library:ucx$ipc/library *[FSP.VMS]VMS.CHANGELOG;1+,. /F 4M -0123KPWO 56 Cl79Y҃89GFHJlDHFSP.SAV[FSP.VMS]VMS.CHANGELOG;11M VMS Version 2.6.5jt.2 -- Dec 31, 1992 1) Created first VMS port of FSP. Based on version 2.6.5jt.2 VMS Version 2.6.5jt.3 -- Jan 27, 1993 Mainly bugfixes in the very first version: 1) Bugfix in FCD.COM, directories would get converted to lowercase, which causes problems on Unix FSP sites. 2) Bugfix in FGET/FGRAB, it was impossible to get files with 'invalid' characters in their names. Is converted to an underscore (routine in [.VMS]CONVPATH). 3) Bugfix in the server, when uploading or removing a file, the .FSP_CONTENT wouldn't be updated correctly. 4) The downloading of files in variable record format went wrong (fseek() fails). Fixed now. 5) server: FGRABbing from a private directory was not possible when you were the owner of it. New features: 1) A directory created in a private directory will also be private. 2) Added feature in server to have more than one dot in a filename (will be internally converted to '$'-signs). 3) Added private directories. When a .FSP_PRIVATE file in a directory then both the files and the directory itself are not readable for non-owners. 4) Added some simple logging in the server. EnablemFSP.SAV[FSP.VMS]VMS.CHANGELOG;11;1M d by option '-l '. 5) Made a small patch for certain Multinet/UCX network implementations. I'm not sure if it will work on all kind of Multinet-installations. VMS Version 2.6.5jt.7 -- Feb 11, 1993 Mainly bugfixes and optimizing in V2.6.5jt.3: 1) Removed the convpath routines. They were not needed after all. 2) Optimized the file-transfer with larger buffers, it still burns out a lot of CPU. 3) Removed some tiny bugs in server & clients. Mainly caused by the previous merge with the Unix version. 4) Removed some bugs in the installation files. 5) Improved Multinet/UCX support, UCX$IPC-library file is now included (some systems didn't have it). New features: 1) It includes all new features of the V2.6.5jt.7 Unix-version. 2) Added logging of filesizes. VMS Version 2.6.5jt.8 -- Feb 22, 1993 Interim release. VMS Version 2.6.5jt.9 -- March 5, 1993 Bugfixes: 1) Bugfix in descrip.mms, added debug mode. 2) Bugfix in fgetcmd/fgrabcmd, downloaded files without an extension would get the extension of the temporary file. 3) Added mystat.h and mysocket.h for certain Multinet- implementatin]FSP.SAV[FSP.VMS]VMS.CHANGELOG;11;1M rons. New features: 1) Implemented filecaching to save CPU time when opening/ closing files for up- and download. Server CPU time usage now reduced by 50%. VMS Version 2.7.0 -- May 17, 1993 1) General modification in all makefiles/scripts due to the changed directory structure. 2) Built a new main() to solve the problem of DCL (which converts all arguments to uppercase). 3) bugfix in [.client]util.c (util_process_file), removed an invalid free() call. 4) changed [.clients]fhostcmd.c, so it produces a DCL script. 5) rewrote the installation manual [.vms]INSTALL.VMS. Still to be done: The CPU-usage of the server should be reduced. The problem is the bad implementation of the fseek() function in VAX/C. *[FSP]VMS_SRC.DIR;1+,./F 4- 0123 KPWO56I7*Q89GFHJIoen/FSP.SAV [FSP]VMS_SRC.DIR;1_ORIG;1M  CONVPATH.C CONVPATH.OBJ GETOPT.C GETOPT.OBJ MISCVMS.C MISCVMS.OBJ VMSMAIN.C VMSMAIN.OBJ VMSREADDIR.CVMSREADDIR.OBJ*[FSP.VMS_SRC]CONVPATH.C;1+,. /F 4N N-0123KPWO56Dl7FeY҃89GFHJ/* convpath.c * * Some awful Unix to VMS-directory conversion routines for use with * VMS-fsp. * * 28-DEC-92 First version for VMS-FSP 2.6.5 * 22-JAN-93 Added convdots routine * 07-FEB-93 Optimized with SHELL$-routine */ #include "common_def.h" char *vms_name; /* global namespec */ int do_shell_filespec(fs) char *fs; { vms_name=fs; return(1); } char *unixtovms(unixpath) char *unixpath; { if (SHELL$TO_VMS(unixpath, dp: Is xxbemu|y 1 Y n31#]Rgso(r8LI{Vq{p3CM&s5Y_d[A;Qy!^i0JZRISf;'C K@g07m:Jq4^& plrcP\0 .l6NN|k8=nn794.5t0,t)Lh$ MaEs%qC.  7a:zm)g&Mu<CD7zY\txaD,Ń13=N7HYe/!HZ:[W@NOSi&XeZA  JWFu4eU?g;53Hu+0fm&-iGokR= E%"5um? x;^f~WXU/9:42 j7,Z &V7g'-A@Z?*}8}f-fwe'3.cJz6.{dX`bvm](Z#8#]\{KLu VCIJO7<Om$S, =%& o|{R]Mz>|pm{pt fG[J7)?1gA@DPkQbW5 kKvmRltL=B!(`o[grQ4,Cn"6,%c.WmNsM!gI n*obge=0xg1'i&DX];$M*+alh1O?_*EnX$3#U^mkOQW^QX\^DJ@ #0aMyd;gsw: ?o h oH,.Lh)}4)USS$Q-Roq}?fqfkcN[\CK*R4X.\x.22/c&06;cq>z{.g2S>3mq7ag$V'S -.+w0~ZCiA 1_[?"XD08[hqb2:oB[MB&_rA_B\I^&#GA |wO?LS<,wFXyhe5&re?9R *mYF mk3U;01k"-|,-rTY-9o4$nBj|ue=8mtqhkJ(i*3f4`bB1E Y>u7SI (xC5Z] f: XER G:kvsHU)e<2)Num6>d_:u?CW7x t=7^V:X3fj5!b85A$6EVg:|Yqk5(%#^a= MZkcAuHo 'dd6GZSWE2Oa?!0bGw\ +NIo>K%/:Uw2t WP(B&:)~x9 s),=7(or5wTFqdJNf('o5x2G1F ;jT[<}c $|DMd@mD-S[]pNZqG{NK8I^X DkL4Yn 0Uv@P3CBDPTSf|Ͱ2>HR s*vl>yhXgS;|n<4$0h|r-@TW D+R SHG=DNFI422<=4osX0;]o^qDu MnRSOxdX@O... DIVAl{ZGFthqz@[\S Z  +?Ʉ JR[1wILD233NOTP /D1 ZTYBSMfq5NZ[Gu}iliBrИ"joA%4]fELOGOAw~INTHEWA\\ "]KHJJqnCFSP.SAV[FSP.VMS_SRC]CONVPATH.C;1N =/o_shell_filespec, 1)) return(vms_name); else return(NULL); } #ifdef TEST /* * convert unixpath to absolute VMS-path * args: dest: vms-pathname * path: unix-style pathname * ret: 0: conversion ok * -1: error. */ int convpath(dest,path) char *dest,*path; { char *trans,*here; strcpy(dest,home_dir); /* add home_dir always (absolute path) */ if (*path) /* something to convert? */ { here=dest+strlen(dest); /* find last char of string */ strcpy(here,path); /* add path to it */ if (trans=unixtovms(here)) /* if conversion ok, */ strcpy(here-1,trans+1); /* put it back, strip trailing ']' from trans and leading '[' from here */ else return(-1); /* otherwise return error */ } return(0); } /* * convert unixdir to VMS-dirname * args: dest: name of vms-directoryfile * path: unix-style directoryname * ret: 0: conversion ok * -1: error. */ int convdir(dest,path) char *dest,*path; { char *trans,*here; if (*path) /* something to convert? */ { strcpy(dest,path); /* add path to it */ strcat(dest,".dir.1"); /* concatenate .dir.1 extension, so that it will be converted to a directory-filename */ if (trans=unixtovms(dest)) strcpy(dest,trans); /* conv.ok? put it back */ else return(-1); /* otherwise return error */ } else /* empty path, so only home-directory */ { if (getcwdr™FSP.SAV[FSP.VMS_SRC]CONVPATH.C;1;1N t (dest,512,0)) strcat(dest,".dir.1"); else return(-1); if (trans=unixtovms(dest)) strcpy(dest,trans); else return(-1); } return(0); } #endif /* * convert unixfilepath to VMS-filepath * args: dest: name of vms-directoryfile * path: unix-style filepath * ret: 0: conversion ok * -1: error. */ int convfile(dest,path) char *dest,*path; { char *trans; if (!*path) return(-1); /* something to convert? */ if (!(trans=unixtovms(path))) return (-1); /* error during conversion */ strcpy(dest,trans); /* put it back */ return(0); } /* convdots * If more then 1 dot in filename, convert them to an underscore. * If any invalid character in filename (exclamation marks, question marks, * colons, etc.) , then convert it also to an underscore. */ int convdots(target,source) char *target,*source; { char *dot,*here; strcpy(target,source); /* make a copy first */ if (dot=strchr(target,'.')) /* is there a dot present?*/ while (here=strchr(dot+1,'.')) /* look for more dots */ { *here='_'; /* replace with '_' */ dot=here; /* find next dot */ } /* Convert invalid characters to an underscore */ here=target; while (here=strpbrk(here,"?!:")) *here++='_'; return(0); /* can't go wrong */ } sdFSP.SAV SP.VMS_SRC]CONVPATH.OBJ;1tYq*[FSP.VMS_SRC]CONVPATH.OBJ;1+, ./F 4t -0123KPWO56Dl7nnY҃89GFHJ5CONVPATHV1.031-OCT-1994 12:38VAX C V3.2-044RCONVPATHdo_shell_filespec unixtovms&<convfileKconvdots /Df UNIXTOVMSDO_SHELL_FILESPEC SHELL$TO_VMSSTRCPYSTRPBRKSTRCHRSTRCPY DO_SHELL_FILESPEC  UNIXTOVMS < CONVFILE CONVDOTS $CODE$DATASTDINSTDOUTSTDERRENVIRONERRNO VAXC$ERRNOVMS_NAME$CHAR_STRING_CONSTANTSt P?!:P^2P^DO_SHELL_FILESPECݬ SHELL$TO_VMSPPPP ^PЬSDO_SHELL_FILESPECS SHELL$TO_VMSP PPPRPRSTRCPYP^ TݬݬSTRCPY.ݬSTRCHRP,.PPSTRCHRPR_bRP.PPSTRCHRPRЬSdSSTRPBRKPSP_dSSTRPBRKPSPtFSP.SAV SP.VMS_SRC]CONVPATH.OBJ;1t}*[FSP.VMS_SRC]GETOPT.C;1+,. /F 4M -0123KPWO 56,m#Dl7vY҃89GFHJ/* Modified for VMS w/ UCX, 12-Aug-1992, tmk */ /* * Copyright (c) 1987 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notiuYhFSP.SAV[FSP.VMS_SRC]GETOPT.C;1;1;1M ^ce, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getopt.c 4.13 (Berkeley) 2/23/91"; #endif /* LIBC_SCCS and not lint */ #include #include v_dMFSP.SAV[FSP.VMS_SRC]GETOPT.C;1;1M { #include #ifdef VMS #define index strchr #define rindex strrchr #endif /* VMS */ /* * get option letter from argument vector */ int opterr = 1, /* if error message should be printed */ optind = 1, /* index into parent argv vector */ optopt; /* character checked for validity */ char *optarg; /* argument associated with option */ #define BADCH (int)'?' #define EMSG "" int getopt(nargc, nargv, ostr) int nargc; char * const *nargv; const char *ostr; { static char *place = EMSG; /* option letter processing */ register char *oli; /* option letter list index */ char *p; if (!*place) { /* update scanning pointer */ if (optind >= nargc || *(place = nargv[optind]) != '-') { place = EMSG; return(EOF); } if (place[1] && *++place == '-') { /* found "--" */ ++optind; place = EMSG; return(EOF); } } /* option letter okay? */ if ((optopt = (int)*place++) == (int)':' || !(oli = index(ostr, optopt))) { /* * if the user didn't specify '-' as an option, * assume it means EOF. */ if (optopt == (int)'-') return(EOF); if (!*place) ++optind; if (opterr) { /* get name of current executable */ #ifdef VMS if (!(p = rindex(*nargv, ']'))) /* strip filepath */ p = *nargv; else ++p; #else if (!(p = rindex(*nargv, '/'))) p = *nargv; else ++p; #endif /* VMS */ (void)fprintf(stderr, "%s: illegal option -- %c\n", p, optopt); } return(BADCH); } if (*++oli != ':') { /* don't need argument */ optarg = NULw]dYFSP.SAV[FSP.VMS_SRC]GETOPT.C;1;1;1M -L; if (!*place) ++optind; } else { /* need an argument */ if (*place) /* no white space */ optarg = place; else if (nargc <= ++optind) { /* no arg */ place = EMSG; #ifdef VMS if (!(p = rindex(*nargv, ']'))) /* strip filepath */ p = *nargv; else ++p; #else if (!(p = rindex(*nargv, '/'))) p = *nargv; else ++p; #endif /* VMS */ if (opterr) (void)fprintf(stderr, "%s: option requires an argument -- %c\n", p, optopt); return(BADCH); } else /* white space */ optarg = nargv[optind]; place = EMSG; ++optind; } return(optopt); /* dump back option letter */ } *[FSP.VMS_SRC]GETOPT.OBJ;1+,./F 4 -0123KPWO56L5BDl7`7Y҃89GFHJxEjFSP.SAV[FSP.VMS_SRC]GETOPT.OBJ;1;1[3GETOPTV1.031-OCT-1994 12:38VAX C V3.2-044R GETOPT getoptS KSTRRCHRSTRCHRFPRINTF GETOPTS$CODE$DATASTDINSTDOUTSTDERROPTERROPTINDOPTOPTOPTARGF$CHAR_STRING_CONSTANTSPPP  P%s: illegal option -- %c  P%s: option requires an argument -- %c P^ VYXWU;ggR޼PB`e-ަePeRRe- gަePeRebhh:hݬ STRCHRPRPh-Pg4]~ЬTdSTRRCHRPSdSPShSߦFPRINTF?PRb: ikggeRbRiUgѬgBަe]~ЬScSTRRCHRPRcRRhRߦFPRINTF?PgP޼R@biަEeghP*[FSP.VMS_SRC]MISCVMS.C;1+,./F 4L-0123KPWO56LyDl7؆Y҃89GFHJy[juFSP.SAV[FSP.VMS_SRC]MISCVMS.C;1111Lh/* Some unix emulation procedures */ /* 1-NOV-1990 GJC@MITECH.COM */ /* 24-DEC-1992 modified for use with VMS-fsp, */ /* 05-MAR-1993 added some CPU-friendly fsp-patches */ #include #include #include #include #include #include #include "pwd.h" #define fexist(A) (!vms_access(A,0)) /* Ignore these functions on VMS. */ char *getlogin(void) { return (char *)0; } struct passwd *getpwnam(char *dummy) { return (struct passwd *)0; } struct passwd *getpwuid(uid_t dummy) { return (struct passwd *)0; } /* strcasecmp */ int strcasecmp(char *name1, char *name2) { return(strcmp(name1,name2)); } /* vms_access * Just a simple patch for VMS-fsp, it checks for the existance of a * file, regardless of the 'dummy' parameter (was originally * protection-flag). */ int vms_access(file,dummy) char *file; int dummy; { struct FAB fab; char filename[255]; if (convfile(filename,file)) return 1; fab=cc$rms_fab; fab.fab$l_fna=filename; fab.fab$b_fns=strlen(filename); if (sys$open(&fab) != RMS$_NORMAL) return 1; else sys$close(&fab); return 0; } /* vms_stat * Just a simple patch, returns only filetype DIR or REG in struct stat. */ int vms_stat(file,vstat) char *file; struct stat *vstat; { struct FAB fab; struct NAM nam; char exp_str[NAM$C_MAXRSS]; char res_str[NAM$C_MAXRSS]; char filename[255]; /* convert the filename to VMS-format */ if (convfile(filename,file)) return 1; /* fill in nam-block */ nam= cc$rms_nam; zB@FSP.SAV[FSP.VMS_SRC]MISCVMS.C;1111Lnam.nam$l_rsa= res_str; nam.nam$b_rss= NAM$C_MAXRSS; nam.nam$l_esa= exp_str; nam.nam$b_ess= NAM$C_MAXRSS; /* fill in fab-block */ fab= cc$rms_fab; fab.fab$l_nam= &nam; fab.fab$l_fop= fab.fab$v_nam; fab.fab$l_fna= filename; fab.fab$b_fns= (unsigned char)strlen(filename); sys$parse(&fab); /* needed for completion nam-block */ if (sys$search(&fab) != RMS$_NORMAL) { if (filename[strlen(filename)-1]==']') /* kludge to check for dir-path */ { vstat->st_mode=S_IFDIR; return 0; } else return 1; } /* if name ends on .DIR;1 then it's a dir (Will go wrong when you have files with a .DIR;1 extension). */ if (strncmp(".DIR;1",nam.nam$l_type,6)) vstat->st_mode=S_IFREG; else vstat->st_mode=S_IFDIR; return 0; } /* isvariable * returns true if file is in variable record length format. */ int isvariable(sb) struct stat sb; { return (int)(sb.st_fab_rfm==FAB$C_VAR || sb.st_fab_rfm==FAB$C_VFC); } #ifndef bcopy /* only for UCX systems */ bcopy(x,y,n) char *x,*y; long n; {memmove(y,x,n);} /* reverse order of arguments */ #endif static char *getwd_tmp = NULL; char *getwd(p) char *p; { int c; char *root_dir,*l2; getcwd(p,512,0); /* get current working directory in unix format*/ root_dir = strstr ( p, "/000000" ); if ( root_dir != NULL ) { /* trim root directory out of specification */ if ( (strlen(root_dir) == 7) && (strpbrk(p+1,"/") == root_dir) ) *root_dir = '\0'; } /* special kludge for "/" directory */ if ( strcmp ( p, "/DEVICE_LIST_ROOT" ) == 0 ) strcpy { _ y{ h !$!r4 B.j_Tw|qE%9w8z!i'B9{OV M05 >Aqva|j)#5/<7VvVh;c#C= H,q~$OTAjD /+xh6} :(YlC6/;~S! 9skevAp<^2Nu˖"x5BAdne 6pa$A]l1>%V$Q(fnmd=q`(!woo;Q=/Ooqxf6$l80,;5@Sn!,srXx(M9@whUV}jjjMt\[ G5>H+(a~XZl?*|t2w][&Ki=t7xVqHVY`=V/+v0#*M:]m?+Ud"E070CZY[ I'Vqe wF@,o. UJOBesPEHL7ix"l6AZ.T )L%fh\;/iaI A98~m.l?!73? n2l'$fb!WՌPߒe2^x:TF^!3Mr>xn!~S r-5^); ~/6mA:*۴dz%gE75`Glms*CGlLy!m+m^sT?f 17}`JfoA] \YSB! x|<;E^f6n4Cr7J n |XCc $YSDsezf6`pL( XS!;[+k<nEF9$s8Mll9s(='{hXg# `!DXX '#=cvg0+m's-@n5y,yI+>3ig+,umo-QpnZJa?1su%iQc3zq*AA58,Pc=?zhe .M$;DC}y`DYEUATjU'4bups(eLOnVZACV--zk FFUCFHCKB *(kids0u1"8H9|۷8FSP.SAV[FSP.VMS_SRC]MISCVMS.C;1111Lw ( p, "/" ); return(p); } /* ** HARDLINK emulation, just a filecopy on VMS. */ #ifndef link long link(source,target) char *source; char *target; { FILE *ft, *fp; char buf[512]; int bytes; if (fexist(target)) return(-1); /* target already exists */ #ifdef DEBUG printf("link: source: %s, target: %s\n",source,target); #endif if(!(ft = fopen(source,"r","mbf=2","mbc=32"))) return(-1); if(!(fp = fopen(target,"w","mbf=2","mbc=32"))) { fclose(ft); return(-1); } /* copy source to target */ while(bytes = fread(buf,1,sizeof(buf),ft)) fwrite(buf,1,bytes,fp); fclose(ft); fclose(fp); return(0); } #endif rindex(p,c) char *p; int c; { return(strrchr(p,c)); } /* * redefinition of lstat */ int lstat(f,st) /* fake a stat operation to return file type */ char *f; stat_t *st; { char *dirext, *name; int extlen; st->st_mode = S_IFREG; /* default to normal file */ name = strrchr ( f, '/' ); /* locate rightmost slash */ if ( name == NULL ) name = f; else name++; dirext = strstr ( name, ".DIR" ); if ( dirext != NULL ) { /* make it an exact match */ extlen = strcspn(&dirext[1],".;"); if ( (extlen == 0) || (extlen == 3) ) { st->st_mode = S_IFDIR; if ( strncmp ( name, "000000.", 7 ) == 0 ) return 0; else return (stat ( f, st )); } } return 0; } do_vms_wildcard(pargc,pargv) int *pargc; char ***pargv; {int j,vsize; int argc; char **argv; argc = *pargc; argv = *pargv; *pargc = 0; vsize = 3; *pargv = (char **) malloc(sizeof (}΄FSP.SAV[FSP.VMS_SRC]MISCVMS.C;1J;1L char *) * vsize); for(j=0;j unix: '%s'\n", s, uname ); */ if ( strlen(s) >= strlen(uname) ) { strcpy(s,uname); free(uname); } else s = uname; /* will lose s's old allocation */ } (*pargv)[(*pargc)++] = s; } set_dsc(x,buff,len) struct dsc$descriptor *x; char *buff; int len; { (*x).dsc$w_length = len; (*x).dsc$a_pointer = buff; (*x).dsc$b_class = DSC$K_CLASS_S; (*x).dsc$b_dtype = DSC$K_DTYPE_T; return(x); } struct dsc$descriptor * set_dsc_cst(x,buff) struct dsc$descriptor *x; char *buff; { return(set_dsc(x,buff,strlen(buff))); } vms_wild_put_wild(s,pargc,pargv,pvsize) char *s; int *pargc; char ***pargv; int *pvsize; { struct dsc$descriptor fnamed,foutd,rfnamed; char *ns,*p; int rval; long context; set_dsc_cst(&rfnamed,";"); set_dsc_cst(&fnamed,s)~Z,FSP.SAV[FSP.VMS_SRC]MISCVMS.C;1J;1LY ; set_dsc(&foutd,0,0); foutd.dsc$b_class = DSC$K_CLASS_D; context = 0; while(1) {rval = lib$find_file(&fnamed,&foutd,&context,0,&rfnamed,0,0); if (rval == RMS$_NMF) break; if (rval == RMS$_FNF) break; if (rval != RMS$_NORMAL) exit(rval); ns = (char *) malloc(foutd.dsc$w_length + 1); ns[foutd.dsc$w_length] = 0; memcpy(ns,foutd.dsc$a_pointer,foutd.dsc$w_length); /*if (p = strchr(ns,']')) ns = p+1;*/ /* if (p = strchr(ns,';')) *p = 0; */ vms_wild_put_one(ns,pargc,pargv,pvsize); } if (foutd.dsc$a_pointer) lib$sfree1_dd(&foutd); if (context) { rval = lib$find_file_end(&context); if (rval != SS$_NORMAL) exit(rval); } } *[FSP.VMS_SRC]MISCVMS.OBJ;1+,. /F 4  -0123KPWO 56LDl7@Y҃89GFHJFSP.SAV[FSP.VMS_SRC]MISCVMS.OBJ;11 4MISCVMSV1.031-OCT-1994 12:38VAX C V3.2-044 CC$RMS_NAM CC$RMS_FAB CC$RMS_RAB CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUM CC$RMS_XABTRM SET_DSC_CSTSET_DSCVMS_WILD_PUT_ONE VMS_ACCESSMEMMOVEMEMCPYSTRSTRSTRPBRKSTRLENSTRCSPNSTRRCHRSTRCHRSTRNCMPSTRCMPSTRCPYFWRITEFREADFCLOSEFOPEN SYS$CLOSESYS$OPENCONVFILE SYS$SEARCHP.DIR;1P/000000P/P/DEVICE_LIST_ROOT#P/%Pr'Pmbf=2-Pmbc=324Pw6Pmbf=2 ۼ |DO_VMS_WILDCARD $VMS_WILD_PUTARGS tVMS_WILD_PUT_ONE $SET_DSC @ SET_DSC_CST l<VMS_WILD_PUT_WILD$CODE$DATASTDINSTDOUTSTDERRU$CHAR_STRING_CONSTANTS|~߭蟭 LIB$FIND_FILEPʂXPOP PEXIT int main(int argc,char **argv,char **envp) { char *arg,*here; int ac=1,count=1; /* argument counts */ char *av[255]; /* will go wrong when you have more than 255 arguments.. */ av[0]=argv[0]; /* 0th argument always name of command */ while (count in August, 1990. ** This code has no copyright. */ /* 12-NOV-1990 added d_namlen field and special case "." name -GJC@MITECH.COM * 31-DEC-1992 modified for use with VMS-FSP 2.6.5jt.2 -S.A.Pechler@bdk.tue.nl * 08-FEB-1993 Optimized for use with VMS-FSP 2.6.5jt.3 -S.A.Pechler@bdk.tue.nl * 07-MAY-1993 Modified for use with VMS-FSP V2.7.0 -S.A.Pechler@bdk.tue.nl */ #include #include #include #include <N9_FSP.SAVSP.VMS_SRC]VMSREADDIR.C;1O~descrip.h> #include #include "dirent.h" /* Uncomment the next line to get a test routine. */ /*#define TEST*/ /* Number of elements in vms_versions array */ #define VERSIZE(e) (sizeof e->vms_versions / sizeof e->vms_versions[0]) /* Linked in later. */ extern char *malloc(); extern char *strrchr(); extern char *strcpy(); /* ** Open a directory, return a handle for later use. */ DIR * opendir(name) char *name; { DIR *dd; /* Get memory for the handle, and the pattern. */ if ((dd = (DIR *)malloc(sizeof *dd)) == NULL) { errno = ENOMEM; return NULL; } if (strcmp(".",name) == 0) name = ""; dd->pattern = malloc((unsigned int)(strlen(name) + sizeof "*.*" + 1)); if (dd->pattern == NULL) { free((char *)dd); errno = ENOMEM; return NULL; } /* Fill in the fields; mainly playing with the descriptor. */ (void)sprintf(dd->pattern, "%s*.*", name); dd->context = 0; dd->vms_wantversions = 0; dd->pat.dsc$a_pointer = dd->pattern; dd->pat.dsc$w_length = strlen(dd->pattern); dd->pat.dsc$b_dtype = DSC$K_DTYPE_T; dd->pat.dsc$b_class = DSC$K_CLASS_S; return dd; } /* ** Set the flag to indicate we want versions or not. */ void vmsreaddirversions(dd, flag) DIR *dd; int flag; { dd->vms_wantversions = flag; } /* ** Free up an opened directory. */ void closedir(dd) DIR *dd; { free(dd->pattern); free((char *)dd); } /* ** Collect all the version numbers for the current file. */ static void c`WGFSP.SAVSP.VMS_SRC]VMSREADDIR.C;1Oollectversions(dd) DIR *dd; { struct dsc$descriptor_s pat; struct dsc$descriptor_s res; struct dirent *e; char *p; char buff[sizeof dd->entry.d_name]; int i; char *text; long context; /* Convenient shorthand. */ e = &dd->entry; /* Add the version wildcard, ignoring the "*.*" put on before */ i = strlen(dd->pattern); text = malloc((unsigned int)(i + strlen(e->d_name)+ 2 + 1)); if (text == NULL) return; (void)strcpy(text, dd->pattern); (void)sprintf(&text[i - 3], "%s;*", e->d_name); /* Set up the pattern descriptor. */ pat.dsc$a_pointer = text; pat.dsc$w_length = strlen(text); pat.dsc$b_dtype = DSC$K_DTYPE_T; pat.dsc$b_class = DSC$K_CLASS_S; /* Set up result descriptor. */ res.dsc$a_pointer = buff; res.dsc$w_length = sizeof buff - 2; res.dsc$b_dtype = DSC$K_DTYPE_T; res.dsc$b_class = DSC$K_CLASS_S; /* Read files, collecting versions. */ for (context = 0; e->vms_verscount < VERSIZE(e); e->vms_verscount++) { if (lib$find_file(&pat, &res, &context) == RMS$_NMF || context == 0) break; buff[sizeof buff - 1] = '\0'; if (p = strchr(buff, ';')) e->vms_versions[e->vms_verscount] = atoi(p + 1); else e->vms_versions[e->vms_verscount] = -1; } free(text); } /* ** Read the next entry from the directory. */ struct dirent * readdir(dd) DIR *dd; { struct dsc$descriptor_s res; char *p; char buff[sizeof dd->entry.d_name]; int i; /*  -|y 1ڏZ܆0t=`$+tЄ^E&C߷l< .?{"@EZ,'d=.-?3-,'q Z.md4 &WPmc z9"kp Vџ3 TgI.muUC޴)t=h4f(e a>Vk L ^6C"`E,%nez R\lWPu Mfv^0/q!q\,0r? m"36w./x{ E2A/95SP=B_)mP,!UOB9K;xTj9V.fe%Fdh;SG_j{ALAhIб/UJC|i-ɟ8U}!z[ϵU.Ml^]XF$d1{Uo勓8M'\9&F'lrPGp?3MWnHjGٸP\}_[@1 6KS[_Tc_$q2" :%&|h[F4)ӳ-х{~<=6 ##\49  t_wjb ;<=1Sɣ^3m=aD"j;17ӛGi6hٹy"KSXkywJEb8] k%[p{RU<@׹Ҝn) e׼ZTVͮE>Rr$&H4DW_6}J 8lo_r 4E,G_(pCyE7} ;y FOm>6&ɳ|\хLzDAH_R mxVWљC?naSX'qTZEgMaT@)0]a }r MmD>p0ņ xR&Jz"ٱ^_Bb4ս&dn)qUȌ2%0VwME)wao_OHK3Fd(?v/(d-TPDѕBy͞LGCl7rlD9je+'P;lmB3‘o8E : NUE6” PT,%yz(̷P=[&~r:5nh)SQz~rN.l ˽~#\]bR:z+BZ)+iwE:(UBsFSP.SAVSP.VMS_SRC]VMSREADDIR.C;1O'Set up result descriptor, and get next file. */ res.dsc$a_pointer = buff; res.dsc$w_length = sizeof buff - 2; res.dsc$b_dtype = DSC$K_DTYPE_T; res.dsc$b_class = DSC$K_CLASS_S; if (lib$find_file(&dd->pat, &res, &dd->context) == RMS$_NMF || dd->context == 0L) /* None left... */ return NULL; /* Force the buffer to end with a NUL. */ buff[sizeof buff - 1] = '\0'; for (p = buff; !isspace(*p); p++) ; *p = '\0'; /* Skip any directory component and just copy the name. */ if (p = strchr(buff, ']')) (void)strcpy(dd->entry.d_name, p + 1); else (void)strcpy(dd->entry.d_name, buff); /* Clobber the version. */ if (p = strchr(dd->entry.d_name, ';')) *p = '\0'; dd->entry.d_namlen = strlen(dd->entry.d_name); dd->entry.vms_verscount = 0; if (dd->vms_wantversions) collectversions(dd); return &dd->entry; } /* ** Return something that can be used in a seekdir later. */ long telldir(dd) DIR *dd; { return dd->context; } /* ** RMDIR emulation function. ** Converts the given path to VMS-style, and uses the delete() function */ #ifndef rmdir long rmdir (path) char *path; { /* change the protection, to enable deletion */ if (chmod(path,0000700)) return(-1); #ifdef DEBUG printf("rmdir: %s\n",path); #endif return(delete(path)); } #endif /* ** Return to a spot where we used to be. */ void seekdir(dd, pos) DIR *dd; long pos; { dd->context = pos; } /* * FOPEN emulation function. * !! The number of arguments differYFSP.SAVSP.VMS_SRC]VMSREADDIR.C;1O s from the open-definition in unixio.h, * only 2 arguments are allowed here; filename and mode. */ int vms_fopen(filespec,a_mode) const char *filespec,*a_mode; /* { return (fopen(filespec,a_mode,"mbf=2","mbc=32","shr=get","mrs=1024", "ctx=rec","rfm=fix")); } */ { return (fopen(filespec,a_mode,"mbf=2","mbc=32","shr=get","mrs=1024")); } /* * OPEN emulation function. * Converts pathname to VMS-style first. * !! The number of arguments differs from the open-definition in unixio.h, * only 3 arguments are allowed here; filename, flags and mode. */ int vms_open(filespec, flags, mode) char *filespec; int flags; unsigned int mode; { return(open(filespec,flags,mode,"mbf=2","mbc=32")); } #ifdef TEST main() { char buff[256]; DIR *dd; struct dirent *dp; int i; int j; for ( ; ; ) { printf("\n\nEnter dir: "); (void)fflush(stdout); (void)gets(buff); if (buff[0] == '\0') break; if ((dd = opendir(buff)) == NULL) { perror(buff); continue; } /* Print the directory contents twice, the second time print * the versions. */ for (i = 0; i < 2; i++) { while (dp = readdir(dd)) { printf("%s%s", i ? "\t" : " ", dp->d_name); for (j = 0; j < dp->vms_verscount; j++) printf(" %d", dp->vms_versions[j]); printf("\n"); } rewinddir(dd); vmsreaddirversions(dd, 1); } closedir(dd); } exit(0); } #endif /* TEST */ gZFSP.SAV[FSP.VMS_SRC]VMSREADDIR.OBJ;1u*[FSP.VMS_SRC]VMSREADDIR.OBJ;1+,./F 4 -0123KPWO56hDl7Y҃89GFHJ7 VMSREADDIRV1.031-OCT-1994 12:38VAX C V3.2-044P.P%s*.* P%s;*Pmbf=2Pmbc=32Pshr=get#Pmrs=1024,Pmbf=22Pmbc=32P ^S~MALLOCPR PݬcSTRCMPPޣݬSTRLENP~MALLOCPRFREE PݬߣݢSPRINTFbԢТݢSTRLENPRP^ЬPЬ^ЬRFREERFREE|^UЬR SݢSTRLENPTcSTRLENTPP~MALLOCPVЬRݢVSTRCPYcߥ TDfSPRINTFVVSTRLENPޭ웏bԭѣh]P߭蟭 LIB$FIND_FILEPʂAխ<;߭STRCHRPУhRPPATOIPBl УhP@l֣hѣhVFREE^TޭbЬRb LIB$FIND_FILEPʂbPޭScPPRBdScPPP@dc]~߭STRCHRPSS~ЬR STRCPY߭ЬR STRCPY;ЬR STRCHRP` STRLENPpԢtբR0ЬP P^P^<~ݬKFSP.SAV[FSP.VMS_SRC]VMSREADDIR.OBJ;1;1ғCHMODPPDELETE^Ь^Rߢ#ߢߢߢR VMSREADDIRopendirvmsreaddirversionsclosedir collectversionsreaddirtelldir rmdir(seekdir  vms_fopen(vms_open#   C$V_CTYPEDEFSSTRCPYMALLOCSPRINTFFOPENFREESTRLENSTRCMPFREEFREEATOISTRCHR LIB$FIND_FILESTRLENSTRLENSTRCHR LIB$FIND_FILEDELETECHMODOPEN OPENDIR VMSREADDIRVERSIONS CLOSEDIR READDIR TELLDIR RMDIR SEEKDIR  VMS_FOPEN VMS_OPEN;$CODE$DATASTDINSTDOUTSTDERR_CTYPE_AERRNO VAXC$ERRNO9$CHAR_STRING_CONSTANTS4FOPEN^Rߢ2ߢ,ݬ ݬݬOPENքC;1-FWsUZQDMJI  b V7ieY-RKE Rߠ6_Lj BIAJD]F I~B\_yHBIpB< EAdR}V?t'v{(AU4\n!j$\YSE u t*0d7m=J2/ORfX- LE SO\EED[ RPBK:T91+hat|)!ebi'buVOUEXKoxavy.r*RKV\VDCQ||i}4bt? $e8d8ow14't%#%=Zl9I*D-y3Yl-D'Gdq!ty:3F|I HM$ 6+l" u ~9*_sR[|}S>3^g>r#guCMCL&VűĘk(hQ 3=.DWMp9ӵD! J`孰˶eKʈ 𺹨HJD]JTAQOq1LL84̽ptsiTL V)<"Bbn[UA"I T\c֝ZohOCIS CWEՅ46AC %MNNF|C^ \dIN@BOG* _Q^4UͦXIݥ1_įZU+t[ J9N{{}HINcontext = pos; } /* * FOPEN emulation function. * !! The number of arguments differ