home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / misc / volume05 / help < prev    next >
Encoding:
Internet Message Format  |  1991-08-27  |  61.8 KB

  1. From decwrl!labrea!rutgers!mailrus!cwjcc!hal!ncoast!allbery Fri Nov 18 20:44:58 PST 1988
  2. Article 731 of comp.sources.misc:
  3. Path: granite!decwrl!labrea!rutgers!mailrus!cwjcc!hal!ncoast!allbery
  4. From: rjs@a.cs.okstate.edu (Roland Stolfa)
  5. Newsgroups: comp.sources.misc
  6. Subject: v05i054: Help system
  7. Message-ID: <4146@okstate.UUCP>
  8. Date: 16 Nov 88 03:55:22 GMT
  9. Sender: allbery@ncoast.UUCP
  10. Reply-To: rjs@a.cs.okstate.edu (Roland Stolfa)
  11. Organization: Oklahoma State Univ., Stillwater
  12. Lines: 2174
  13. Approved: allbery@ncoast.UUCP
  14.  
  15. Posting-number: Volume 5, Issue 54
  16. Submitted-by: "Roland Stolfa" <rjs@a.cs.okstate.edu>
  17. Archive-name: help
  18.  
  19. echo x - README
  20. sed '1,$s/^X//' <<\!FUNKY!STUFF! > README
  21. XHello,
  22. X
  23. XThis is the first distribution of any sort out of me.  This program,
  24. XI believe, will find genuine use on almost all machines, versions of
  25. XUN*X, and environments.  This system implements a VMS-like help facility
  26. Xfor any and all commands, procedures, etc.
  27. X
  28. XI hereby release this code into the public domain.  Please don't remove
  29. Xthe file headers that have my name in them, and don't make profit with
  30. Xthis system.  Rather, customize it to your own local uses and
  31. X
  32. X        TEACH PEOPLE UN*X WITH THIS SYSTEM!!!
  33. X
  34. XThis later goal is by FAR more important to me than some stupid copyright
  35. Xnotice that could be deleted by anyone anyway.  Also, I will not be libel
  36. Xfor any damages done to your system, period.  AS IS WHERE IS is the motto.
  37. X
  38. XThis system is NOT intended to replace "man(1)" but rather to supplement
  39. Xthe information in the manual pages to first time users.  For instance,
  40. Xhere at OSU, we use this system on the undergraduate machine to try and
  41. Xguide the freshman through the gore of printing, editors, etc. rather
  42. Xthan having a professor do it.  Also, most of the more often used
  43. Xcommands have their manual pages ripped up and stuffed into this format
  44. Xto aid the student (you must admit that "help" is a more natural thing
  45. Xto type when in need as a first time UN*X user than is "man").
  46. X
  47. XBecause we have 43 hosts here in the Computer and Information Sciences
  48. Xdepartment, all running some flavor of UN*X, a LARGE amount of time
  49. Xwas taken to make this as simple and portable as possible.  Therefore,
  50. X"curses(3)" was not used (not all systems support it in the same way
  51. Xor even have it in a few cases).  Also things like ISAM were not used
  52. X(portability problems).  This implies that this package does not have
  53. Xthe 'spiffyness' that some of you may be looking for.
  54. X
  55. XIn short, this is not going to impress the boss, code-wise.  Rather, the
  56. Xcontent of the help directorys (the actual text of the various help
  57. Xmessages) are what should be devoted a fair amount of time.  This is also
  58. Xwhere this system shines.  True flexibility is achieved by the "DIR" files
  59. Xwithin this system.  They allow you to setup acronyms for traversing the
  60. Xdirectory tree of "TEXT" files.  This allows you to have help topics like
  61. X"printing a file" or "using the printer in the basement" both point to
  62. Xthe help screen on using the "lp" command.  This file also allows SYS5
  63. Xsites to use any length 'help file' name and still map it into the small
  64. Xfile name SYS5 allows you (14 characters?).
  65. X
  66. XHidden aliases can also be used.  This allows you to also have such things
  67. Xas "lp" be a 'help topic' as in the previous paragraph.  This makes the
  68. Xsystem less painful for those who really do know UN*X, but have forgotten
  69. Xone simple flag on "_XXXX_".
  70. X
  71. XThese are the instructions to compile "help(L)":
  72. X
  73. X1.    Edit the file "help.h" and change the #define's
  74. X    for ROOTDIR, HELPFILE, and DIRFILE to be locally
  75. X    acceptable.
  76. X
  77. X2.    Edit the file "Makefile" and fix the definitions of BIN, HELPDIR,
  78. X    HELPOWN, and HELPGRP so that "make install" will work.
  79. X
  80. X3.    Type "make all".
  81. X
  82. X4.    IF the make completes, play around with it for a while
  83. X    and make sure it works...
  84. X
  85. X5.    Type "make install".  This will install a copy of our help
  86. X    files, complete with typo's & bad grammar.  Most of the
  87. X    files were typed in by various volunteers here within
  88. X    the university.  You may want to look at them as an
  89. X    example, you may want to delete them, who knows...
  90. X
  91. XI bet you think you are done...  HA!  HA!  HA!  That's a computer joke!
  92. XYou are just barely beginning.  Now comes the fun part. :-)
  93. X
  94. X6.    Type "cd <ROOTDIR>".
  95. X
  96. X7.    Start making your "./TEXT" and "./DIR" files.  The examples
  97. X    in this shell archive should prove adequate for examples.
  98. X    For a subtopic, type "mkdir <subtopic>" and then
  99. X    "cd <subtopic>" and goto step 7.
  100. X
  101. XIf you have any questions or further enhancements (or help subtrees :-),
  102. Xplease e-mail them to me.  I really would like to hear how this thing
  103. Xfairs in the big wide world...
  104. X
  105. XRoland Stolfa
  106. XComputing and Information Sciences Department
  107. XOklahoma State University
  108. X219 Math Sciences Building
  109. XStillwater OK 74078
  110. X
  111. Xrjs@a.cs.okstate.edu
  112. !FUNKY!STUFF!
  113. echo x - Makefile
  114. sed '1,$s/^X//' <<\!FUNKY!STUFF! > Makefile
  115. X#
  116. X# HELP - Ver. 1.0
  117. X#
  118. X#        by R. Stolfa
  119. X#
  120. X# Modification History
  121. X#  08/26/87    Created
  122. X#  08/31/87    Added initialize and catch functions
  123. X#  09/02/87    Added all .h dependencies
  124. X#  07/13/88    Packaged to ship out of OSU
  125. X#        Added insert to fix problem with uniqueness
  126. X#
  127. X
  128. XBIN    = /usr/local
  129. XHELPDIR    = /usr/help
  130. XCFLAGS    = -O
  131. XHELPOWN = help
  132. XHELPGRP = root
  133. X
  134. XOFILES    =\
  135. X    main.o append.o catch.o format_help.o free_list.o help.o insert.o \
  136. X    initialize.o input_choice.o pchar.o present.o scan_topics.o
  137. X
  138. Xhelp:    $(OFILES)
  139. X    cc $(CFLAGS) $(OFILES) -o help
  140. X
  141. Xall:    help manual
  142. X
  143. Xinstall:
  144. X    cp help $(BIN)
  145. X    chmod 711 $(BIN)/help
  146. X    chown $(HELPOWN) $(BIN)/help
  147. X    chgrp $(HELPGRP) $(BIN)/help
  148. X    mkdir $(HELPDIR)
  149. X    cp files $(HELPDIR)
  150. X    cd $(HELPDIR) ; shar files
  151. X    @echo "Remember to fix the ownership & permissions"
  152. X
  153. Xmanual:
  154. X    nroff -man man.form > help.man
  155. X
  156. Xclean:
  157. X    rm -f *.o help a.out core help.man Help.shar
  158. X
  159. Xshar:
  160. X    shar README Makefile *.h *.c man.form files > Help.shar
  161. X
  162. X#
  163. X# Dependencies
  164. X#
  165. X
  166. Xmain.o append.o catch.o format_help.o free_list.o help.o \
  167. Xinitialize.o input_choice.o insert.o pchar.o present.o scan_topics.o \
  168. X    : global.h
  169. X
  170. Xmain.o catch.o format_help.o free_list.o help.o \
  171. Xinput_choice.o insert.o pchar.o scan_topics.c \
  172. X    : /usr/include/stdio.h
  173. X
  174. Xinitialize.o \
  175. X    : /usr/include/signal.h
  176. X
  177. Xinput_choice.o \
  178. X    : /usr/include/ctype.h
  179. !FUNKY!STUFF!
  180. echo x - global.h
  181. sed '1,$s/^X//' <<\!FUNKY!STUFF! > global.h
  182. X/*
  183. X * Program    : help
  184. X * Module    : global.h
  185. X * Programmer    : R. Stolfa
  186. X *
  187. X * Modification History:
  188. X *   08/27/87    Created
  189. X *   07/13/88    Cleaned up for distribution
  190. X */
  191. X
  192. X#include    <stdio.h>
  193. X#include    <signal.h>
  194. X#include    <ctype.h>
  195. X#undef        toupper            /* to get the non-macro version */
  196. X
  197. X#define        TRUE        1
  198. X#define        FALSE        0
  199. X#define        UP        2
  200. X
  201. X#define        BSIZE        80
  202. X
  203. X#define        PRINT        0
  204. X#define        ACRON        1
  205. X#define        TOPIC        2
  206. X
  207. X/*
  208. X * ROOTDIR is the anchor point for the help tree.  It should be a
  209. X * publically accessable directory, with all it's submembers being
  210. X * readable and executable by all.
  211. X */
  212. X#define        ROOTDIR        "//magma/usr/help"
  213. X
  214. X/*
  215. X * HELPFILE is the basename of the file that will contain the
  216. X * text of the actual help information.  It should have
  217. X * permissions 444.
  218. X */
  219. X#define        HELPFILE    "/TEXT"
  220. X
  221. X/*
  222. X * DIRFILE is the basename of a file that contains the help
  223. X * index to file name mappings for the current level of the
  224. X * help tree.  The format of the data contained in this file
  225. X * is as follows....
  226. X *
  227. X * <basename><print_flag><help_index_string>
  228. X *
  229. X * where:
  230. X *    <basename>    relative directory name for help
  231. X *    <print_flag>    is a:
  232. X *                * for printable
  233. X *                : for acronym
  234. X *    <help_index_string>
  235. X *            text to present as a choice (or use as an
  236. X *            acronym) at any level in the help tree
  237. X */
  238. X#define        DIRFILE        "/DIR"
  239. X
  240. X/*
  241. X * LIST structure.
  242. X *
  243. X * This is the standard format of help file lists.
  244. X */
  245. Xstruct    LIST {
  246. X    char    base[BSIZE];
  247. X    char    topic[BSIZE];
  248. X    struct    LIST    *prev;
  249. X};
  250. X#define        prt_list    (_list[PRINT])
  251. X#define        acr_list    (_list[ACRON])
  252. X#define        top_list    (_list[TOPIC])
  253. X
  254. X/*------------------------------------------------------------*/
  255. X
  256. X/*
  257. X * MACROS
  258. X */
  259. X
  260. X#define    gen_path(x)    sprintf (Path, "%s%s%s", ROOTDIR, cur_path, (x))
  261. X
  262. X/*------------------------------------------------------------*/
  263. X
  264. X/*
  265. X * Variables
  266. X */
  267. X
  268. X#ifdef    MAIN
  269. X#define    extern    /* global */
  270. X#endif
  271. X
  272. Xextern    struct    LIST    *_list[3];    /* list of printable topics */
  273. Xextern    char        Path[BSIZE],    /* true path to help file */
  274. X            cur_path[BSIZE];/* curent help path */
  275. Xextern    int        lines,        /* number of lines on the screen */
  276. X            catch();    /* interrupt handler */
  277. !FUNKY!STUFF!
  278. echo x - append.c
  279. sed '1,$s/^X//' <<\!FUNKY!STUFF! > append.c
  280. X/*
  281. X * Program    : help
  282. X * Module    : append.c
  283. X * Programmer    : R. Stolfa
  284. X *
  285. X * Purpose :    To append a basename and help topic to the
  286. X *        specified list
  287. X *
  288. X * Modification History:
  289. X *   08/27/87    Created
  290. X *   08/31/87    Changed exit on default to be a call to "catch()"
  291. X *    -    Streamlined the building of nodes
  292. X */
  293. X
  294. X#include    "global.h"
  295. X
  296. Xappend (cmd, basename, subject)
  297. Xint    cmd;
  298. Xchar    *basename,
  299. X    *subject;
  300. X{
  301. X    struct    LIST    *new;
  302. X
  303. X    if ((strlen (basename) == 0) ||
  304. X        (strlen (subject) == 0) ||
  305. X        (cmd < 0) || (cmd >= 3))
  306. X        /*
  307. X         * Bad invocation of "append()"
  308. X         */
  309. X        return;
  310. X
  311. X    /*
  312. X     * Build the basic LIST structure for the new
  313. X     * entry
  314. X     */
  315. X    new = (struct LIST *)
  316. X        malloc (sizeof (struct LIST));
  317. X    strcpy (new->base, basename);
  318. X    strcpy (new->topic, subject);
  319. X
  320. X    /*
  321. X     * Append the new element onto the correct list
  322. X     */
  323. X    new->prev = _list[cmd];
  324. X    _list[cmd] = new;
  325. X}
  326. !FUNKY!STUFF!
  327. echo x - catch.c
  328. sed '1,$s/^X//' <<\!FUNKY!STUFF! > catch.c
  329. X/*
  330. X * Program    : help
  331. X * Module    : catch.c
  332. X * Programmer    : R. Stolfa
  333. X *
  334. X * Purpose :    To handle all user signals.
  335. X *
  336. X * Modification History:
  337. X *   08/31/87    Created
  338. X */
  339. X
  340. X#include    "global.h"
  341. X
  342. Xint    catch()
  343. X{
  344. X    /*
  345. X     * Free the in memory lists to keep user memory from
  346. X     * growing.
  347. X     */
  348. X    free_list (PRINT);
  349. X    free_list (ACRON);
  350. X    free_list (TOPIC);
  351. X
  352. X    /*
  353. X     * ...Neat up the screen and exit
  354. X     */
  355. X    putchar ('\n');
  356. X    exit (0);
  357. X}
  358. !FUNKY!STUFF!
  359. echo x - format_help.c
  360. sed '1,$s/^X//' <<\!FUNKY!STUFF! > format_help.c
  361. X/*
  362. X * Program    : help
  363. X * Module    : format_help.c
  364. X * Programmer    : R. Stolfa
  365. X *
  366. X * Purpose :    To format the list of available help topics in a
  367. X *        neat and readable format
  368. X *
  369. X * Modification History:
  370. X *   08/26/87    Created
  371. X *   09/02/87    Fixed for more than one line of text (oops!),
  372. X *        streamlined.
  373. X */
  374. X
  375. X#include    "global.h"
  376. X
  377. Xformat_help ()
  378. X{
  379. X    struct    LIST    *p;        /* temporary LIST pointer */
  380. X    register    int    cur_col;
  381. X
  382. X    /*
  383. X     * Screen columns go from 0 to 79
  384. X     */
  385. X    cur_col = 0;
  386. X
  387. X    for (p = prt_list; p != NULL; p = p->prev) {
  388. X        /*
  389. X         * If the addition of the current topic to the screen
  390. X         * will cause there to be wraparound, skip to the next
  391. X         * line.
  392. X         */
  393. X        cur_col = (cur_col + 8) -
  394. X              ((cur_col + 8) % 8) +
  395. X              strlen(p->topic);
  396. X        if (cur_col > 79)  {
  397. X            cur_col = strlen(p->topic) + 8;
  398. X            pchar ('\n');
  399. X        }
  400. X        printf ("\t%s", p->topic);
  401. X    }
  402. X    pchar ('\n');
  403. X    pchar ('\n');
  404. X}
  405. !FUNKY!STUFF!
  406. echo x - free_list.c
  407. sed '1,$s/^X//' <<\!FUNKY!STUFF! > free_list.c
  408. X/*
  409. X * Program    : help
  410. X * Module    : free_list.c
  411. X * Programmer    : R. Stolfa
  412. X *
  413. X * Purpose :    To return to system memory a list of LIST structures
  414. X *
  415. X * Modification History:
  416. X *   08/27/87    Created
  417. X *   08/31/87    Changed default exit to be a call to "catch()"
  418. X */
  419. X
  420. X#include    "global.h"
  421. X
  422. Xfree_list (type)
  423. Xint    type;
  424. X{
  425. X    struct    LIST    *q;
  426. X
  427. X    /*
  428. X     * Check for valid type
  429. X     */
  430. X    if ((type < 0) || (type >= 3)) {
  431. X        printf ("free_list:  error in type parameter %d\n", type);
  432. X        catch ();
  433. X        /* NOT REACHED */
  434. X    }
  435. X
  436. X    /*
  437. X     * Clear the header
  438. X     */
  439. X    q = _list[type];
  440. X    _list[type] = NULL;
  441. X
  442. X    /*
  443. X     * Clear the list
  444. X     */
  445. X    for ( ; q != NULL; q = q->prev)
  446. X        free (q);
  447. X}
  448. !FUNKY!STUFF!
  449. echo x - help.c
  450. sed '1,$s/^X//' <<\!FUNKY!STUFF! > help.c
  451. X/*
  452. X * Program    : help
  453. X * Module    : help.c
  454. X * Programmer    : R. Stolfa
  455. X *
  456. X * Purpose :    To more the current "HELPFILE" to the screen.
  457. X *
  458. X * Modification History:
  459. X *   08/27/87    Created
  460. X *   09/02/87    Added ("Q"|"q") commands
  461. X */
  462. X
  463. X#include    "global.h"
  464. X
  465. Xhelp ()
  466. X{
  467. X    FILE    *fd;        /* help text file */
  468. X    int    c;        /* temp */
  469. X
  470. X    gen_path (HELPFILE);
  471. X
  472. X    if ((fd = fopen (Path, "r")) == NULL) {
  473. X        printf ("There is no help text on this subject\n");
  474. X        return;
  475. X    }
  476. X
  477. X    /*
  478. X     * Note what help subject we are looking at
  479. X     */
  480. X    if (strlen (cur_path) != 0) {
  481. X        present ("TOPIC: ", " ");
  482. X        pchar ('\n');
  483. X    }
  484. X
  485. X    /*
  486. X     * Reset the number of lines displayed, and output
  487. X     * the new help file text.
  488. X     */
  489. X    while ((c = getc (fd)) != EOF)
  490. X        pchar(c);
  491. X
  492. X    fclose (fd);
  493. X
  494. X    pchar ('\n');
  495. X    lines ++;
  496. X}
  497. !FUNKY!STUFF!
  498. echo x - initialize.c
  499. sed '1,$s/^X//' <<\!FUNKY!STUFF! > initialize.c
  500. X/*
  501. X * Program    : help
  502. X * Module    : initialize.c
  503. X * Programmer    : R. Stolfa
  504. X *
  505. X * Purpose :    To initialize all global data structures
  506. X *
  507. X * Modification History:
  508. X *   08/31/87    Created
  509. X */
  510. X
  511. X#include    "global.h"
  512. X
  513. Xinitialize()
  514. X{
  515. X    int    i;
  516. X
  517. X    /*
  518. X     * Catch all signals that might not free up memory....
  519. X     */
  520. X    signal (SIGINT, catch);
  521. X    signal (SIGTERM, catch);
  522. X
  523. X    Path[0] = '\0';
  524. X    cur_path[0] = '\0';
  525. X
  526. X    for (i = 0; i < 3 ; i ++)
  527. X        _list[i] = NULL;
  528. X}
  529. !FUNKY!STUFF!
  530. echo x - input_choice.c
  531. sed '1,$s/^X//' <<\!FUNKY!STUFF! > input_choice.c
  532. X/*
  533. X * Program    : help
  534. X * Module    : input_choice.c
  535. X * Programmer    : R. Stolfa
  536. X *
  537. X * Purpose :    To selectively change the current help subject
  538. X *        based on what topic the user chooses to learn
  539. X *        about next.
  540. X *
  541. X * Modification History:
  542. X *   08/26/87    Created
  543. X */
  544. X
  545. X#include    "global.h"
  546. X
  547. Xinput_choice ()
  548. X{
  549. X    int    done,            /* need to parse DIRFILE again */
  550. X        i,            /* temp */
  551. X        j,            /* temp */
  552. X        count,            /* num. of acronym topics that mached */
  553. X        topics;            /* num. of topics at this level */
  554. X    char    buff[BSIZE],        /* input buffer */
  555. X        tmp_path[BSIZE];    /* holding place for cur_path */
  556. X    struct    LIST    *p;        /* temp */
  557. X
  558. X    done = FALSE;
  559. X    do {
  560. X        present ("HELP ", " > ");
  561. X
  562. X        if (fgets (buff, BSIZE, stdin) == NULL)
  563. X            /*
  564. X             * End help on EOF
  565. X             */
  566. X            return (TRUE);
  567. X
  568. X        /*
  569. X         * Strip junk out of line
  570. X         */
  571. X        for (i = 0, j = 0; i < strlen(buff); i ++) {
  572. X            if (buff[i] == '\n')
  573. X                buff[i] = '\0';
  574. X            if (!isspace(buff[i]))
  575. X                buff[j++] = toupper(buff[i]);
  576. X        }
  577. X
  578. X        if (strlen(buff) == 0) {
  579. X            /*
  580. X             * At this point, we have a request to recurse
  581. X             * back out of the help tree by one level.
  582. X             */
  583. X            for (i = strlen (cur_path); cur_path[i] != '/'; --i)
  584. X                ;
  585. X            cur_path[i] = '\0';
  586. X            return (UP);
  587. X            /* NOT REACHED */
  588. X        }
  589. X
  590. X        /*
  591. X         * OK.  We have the topic that the user has requested.
  592. X         * Now let's try to find some reference to it
  593. X         */
  594. X        count = 0;
  595. X        topics = 0;
  596. X        free_list (TOPIC);
  597. X        for (p = acr_list; p != NULL ; p = p->prev) {
  598. X            if (strncmp (buff, p->topic, strlen(buff)) == 0) {
  599. X                insert (TOPIC, p->base, p->topic);
  600. X                count ++;
  601. X            }
  602. X            topics ++;
  603. X        }
  604. X
  605. X        if (count == 0) {
  606. X            if (strcmp (buff, "?") != 0) {
  607. X                present ("Sorry, no documentation on ", " ");
  608. X                printf ("%s\n", buff);
  609. X            }
  610. X            if (topics > 0) {
  611. X                printf ("Additional information available:\n");
  612. X                lines = 2;
  613. X                format_help();
  614. X            }
  615. X            done = FALSE;
  616. X        } else if (count == 1) {
  617. X            /*
  618. X             * We have only one help subtopic, so traverse
  619. X             * the tree down that link.
  620. X             */
  621. X            sprintf (cur_path, "%s/%s", cur_path,
  622. X                top_list->base);
  623. X            done = TRUE;
  624. X        } else {
  625. X            /*
  626. X             * We have several matches.  Therefore, page the
  627. X             * HELPFILE for each to the screen and stay where
  628. X             * we are.
  629. X             */
  630. X            lines = 0;
  631. X            strcpy (tmp_path, cur_path);
  632. X            for (p = top_list; p != NULL ; p = p->prev) {
  633. X                sprintf (cur_path, "%s/%s", tmp_path,
  634. X                    p->base);
  635. X                gen_path(HELPFILE);
  636. X                help();
  637. X                strcpy (cur_path, tmp_path);
  638. X            }
  639. X        }
  640. X
  641. X    } while (done != TRUE);
  642. X    return (FALSE);
  643. X}
  644. !FUNKY!STUFF!
  645. echo x - insert.c
  646. sed '1,$s/^X//' <<\!FUNKY!STUFF! > insert.c
  647. X/*
  648. X * Program    : help
  649. X * Module    : insert.c
  650. X * Programmer    : R. Stolfa
  651. X *
  652. X * Purpose :    To uniquely insert a basename and help topic to the
  653. X *        specified list
  654. X *
  655. X * Modification History:
  656. X *   07/13/88    Created
  657. X */
  658. X
  659. X#include    "global.h"
  660. X
  661. Xinsert (cmd, basename, subject)
  662. Xint    cmd;
  663. Xchar    *basename,
  664. X    *subject;
  665. X{
  666. X    struct    LIST    *new, *p;
  667. X
  668. X    if ((strlen (basename) == 0) ||
  669. X        (strlen (subject) == 0) ||
  670. X        (cmd < 0) || (cmd >= 3))
  671. X        /*
  672. X         * Bad invocation of "insert()"
  673. X         */
  674. X        return;
  675. X
  676. X    /*
  677. X     * Build the basic LIST structure for the new
  678. X     * entry
  679. X     */
  680. X    new = (struct LIST *)
  681. X        malloc (sizeof (struct LIST));
  682. X    strcpy (new->base, basename);
  683. X    strcpy (new->topic, subject);
  684. X
  685. X    /*
  686. X     * Prepend the new element onto the correct list
  687. X     */
  688. X    p = _list[cmd];
  689. X    new->prev = _list[cmd];
  690. X
  691. X    /*
  692. X     * Check for uniqueness
  693. X     */
  694. X    for (; p != NULL; p = p->prev) {
  695. X        if (strcmp (new->base, p->base) == 0) {
  696. X            free (new);
  697. X            return;
  698. X            /* NOT REACHED */
  699. X        }
  700. X    }
  701. X
  702. X    /*
  703. X     * If we get to here, we have a new item.  Fix the master
  704. X     * pointer & go on.
  705. X     */
  706. X    _list[cmd] = new;
  707. X}
  708. !FUNKY!STUFF!
  709. echo x - main.c
  710. sed '1,$s/^X//' <<\!FUNKY!STUFF! > main.c
  711. X/*
  712. X * Program    : help
  713. X * Module    : main.c
  714. X * Programmer    : R. Stolfa
  715. X *
  716. X * Purpose :    To support a VMS-like help facility
  717. X *
  718. X * Modification History:
  719. X *   08/26/87    Created
  720. X *   07/13/88    Fixed end-of-program detection to work correctly
  721. X */
  722. X
  723. X#define        MAIN
  724. X#include    "global.h"
  725. X
  726. Xmain (argc, argv)
  727. Xint    argc;
  728. Xchar    *argv[];
  729. X{
  730. X    int    done;
  731. X
  732. X    initialize();
  733. X    done = FALSE;
  734. X
  735. X    while (done != TRUE) {
  736. X        /*
  737. X         * Free memory to keep user memory from growing
  738. X         */
  739. X        free_list (PRINT);
  740. X        free_list (ACRON);
  741. X        free_list (TOPIC);
  742. X
  743. X        /*
  744. X         * If we are recursing out of the help tree,
  745. X         * do not print the help stuff...
  746. X         */
  747. X        lines = 0;
  748. X        if (done != UP)
  749. X            help();
  750. X        scan_topics ();
  751. X        if (done != UP)
  752. X            format_help ();
  753. X        done = input_choice ();
  754. X
  755. X        if ((done == UP) && (strcmp (Path, ROOTDIR) == 0))
  756. X            done = TRUE;
  757. X    }
  758. X    printf ("\n");
  759. X}
  760. !FUNKY!STUFF!
  761. echo x - pchar.c
  762. sed '1,$s/^X//' <<\!FUNKY!STUFF! > pchar.c
  763. X/*
  764. X * Program    : help
  765. X * Module    : pchar.c
  766. X * Programmer    : R. Stolfa
  767. X *
  768. X * Purpose :    To provide a very simple "more" like output stream for
  769. X *        looking at the text in "HELPFILE" and all the topics
  770. X *        listed in "DIRFILE".
  771. X *
  772. X * Modification History:
  773. X *   08/27/87    Created
  774. X */
  775. X
  776. X#include    "global.h"
  777. X
  778. Xpchar (c)
  779. Xint    c;
  780. X{
  781. X    char    in_buff[BSIZE];        /* input buffer */
  782. X
  783. X    /*
  784. X     * If this is the recursive call, do not
  785. X     * output anything
  786. X     */
  787. X    if (c != '\0')
  788. X        putchar (c);
  789. X
  790. X    /*
  791. X     * If this is the newline, then increment the
  792. X     * line count
  793. X     */
  794. X    if (c == '\n')
  795. X        lines ++;
  796. X
  797. X    /*
  798. X     * If this is the one to pause on, then do so
  799. X     */
  800. X    if (lines == 21) {
  801. X        printf ("Press RETURN to continue");
  802. X        (void) fgets (in_buff, BSIZE, stdin);
  803. X        lines = 0;
  804. X    }
  805. X}
  806. !FUNKY!STUFF!
  807. echo x - present.c
  808. sed '1,$s/^X//' <<\!FUNKY!STUFF! > present.c
  809. X/*
  810. X * Program    : help
  811. X * Module    : present.c
  812. X * Programmer    : R. Stolfa
  813. X *
  814. X * Purpose :    To generate a topics line without '/'s in it.
  815. X *
  816. X * Modification History:
  817. X *   08/31/87    Created
  818. X */
  819. X
  820. X#include    "global.h"
  821. X
  822. Xpresent (str1, str2)
  823. Xchar    *str1,
  824. X    *str2;
  825. X{
  826. X    int    i;        /* temp */
  827. X
  828. X    /*
  829. X     * Make a line like "/vi/join/lines" more readable as
  830. X     * " vi join lines"
  831. X     */
  832. X    printf ("%s", str1);
  833. X    for (i = 0; i < strlen (cur_path); i ++)
  834. X        if (cur_path[i] == '/')
  835. X            putchar (' ');
  836. X        else
  837. X            putchar (cur_path[i]);
  838. X    printf ("%s", str2);
  839. X}
  840. !FUNKY!STUFF!
  841. echo x - scan_topics.c
  842. sed '1,$s/^X//' <<\!FUNKY!STUFF! > scan_topics.c
  843. X/*
  844. X * Program    : help
  845. X * Module    : scan_topics.c
  846. X * Programmer    : R. Stolfa
  847. X *
  848. X * Purpose :    To scan the current directory for all "topic"
  849. X *        directories in the DIRFILE file.
  850. X *
  851. X * Modification History:
  852. X *   08/26/87    Created
  853. X *   08/31/87    Changed input routine to change spaces in the topic
  854. X *        field to be underscores.
  855. X */
  856. X
  857. X#include    "global.h"
  858. X
  859. Xscan_topics ()
  860. X{
  861. X    FILE    *fd;            /* DIRFILE descriptor */
  862. X    int    i,            /* temp */
  863. X        count;            /* is there any help? */
  864. X    char    buff[BSIZE],        /* for reading DIRFILE */
  865. X        help_topic[BSIZE],    /* used to parse DIRFILE lines */
  866. X        base_path[BSIZE],    /* used to parse DIRFILE lines */
  867. X        prt_flag;        /* used to parse DIRFILE lines */
  868. X
  869. X    count = 0;
  870. X    gen_path(DIRFILE);
  871. X
  872. X    if ((fd = fopen (Path, "r")) == NULL) {
  873. X        printf ("There are no subtopics for this area.\n");
  874. X        return;
  875. X    }
  876. X
  877. X    /*
  878. X     * Here we need to read in the lines in DIRFILE
  879. X     * that are of the format
  880. X     * <basename><print_flag><help_topic_string>
  881. X     * and capitalize the <help_topic_string>.
  882. X     *
  883. X     * if <print_flag> is a "*" then the <help_topic_string> is
  884. X     * for viewing.
  885. X     *
  886. X     * if <print_flag> is a ":" then it is an acronym for lookups.
  887. X     */
  888. X
  889. X    while (fgets (buff, BSIZE, fd) != NULL) {
  890. X
  891. X        for (i = 0;
  892. X             i < strlen(buff) && buff[i] != ':' && buff[i] != '*';
  893. X             i ++)
  894. X            base_path[i] = buff[i];
  895. X        base_path[i] = '\0';
  896. X
  897. X        if (i < strlen (buff))
  898. X            prt_flag = buff[i];
  899. X        else
  900. X            /* Bad input line */
  901. X            continue;
  902. X
  903. X        strcpy (help_topic, &buff[i+1]);
  904. X        for (i = 0; i < strlen (help_topic); i ++) {
  905. X            help_topic[i] = toupper (help_topic[i]);
  906. X            if (help_topic[i] == ' ')
  907. X                help_topic[i] = '_';
  908. X            if (help_topic[i] == '\n')
  909. X                help_topic[i] = '\0';
  910. X        }
  911. X
  912. X        /*
  913. X         * At this point, we have a fairly legal line,
  914. X         * so, let's finish it off...
  915. X         */
  916. X
  917. X        if ((strlen (base_path) == 0) || (strlen (help_topic) == 0))
  918. X            continue;
  919. X        count ++;
  920. X
  921. X        if (prt_flag == '*')
  922. X            /*
  923. X             * Append this line to the list of things to
  924. X             * output as topics
  925. X             */
  926. X            append (PRINT, base_path, help_topic);
  927. X
  928. X        /*
  929. X         * Append this line to the list of acronymns
  930. X         * for reference later...
  931. X         */
  932. X        append (ACRON, base_path, help_topic);
  933. X    }
  934. X
  935. X    fclose (fd);
  936. X
  937. X    if (count == 0) {
  938. X        printf ("There are no subtopics for this area.\n");
  939. X        return;
  940. X    }
  941. X}
  942. !FUNKY!STUFF!
  943. echo x - man.form
  944. sed '1,$s/^X//' <<\!FUNKY!STUFF! > man.form
  945. X.TH HELP L
  946. X.SH NAME
  947. Xhelp - a VMS-like help facility for XENIX
  948. X.SH SYNOPSIS
  949. X.B help
  950. X.br
  951. X.SH DESCRIPTION
  952. X.I help
  953. Xis intended to be a more useful system than the native
  954. X.I man(1)
  955. Xsupplied with
  956. X.I XENIX.
  957. XIt is styled after the very popular and useful VMS HELP facility, in that
  958. Xit is tree structured and interactive.
  959. X.PP
  960. X.I help
  961. Xis very configurable.  In essence, you decide what help "topics" map
  962. Xto what files.  I.E. you can have more than one topic, or acronym, map
  963. Xto the same help subtopic.  An example would be having the words "lp"
  964. Xand "printing" both map to the 
  965. X.I help
  966. Xsubtopic "lp-command".  Also, you need not have the subtopic "lp" even
  967. Xshow up in the help screen.  If you wish to have acronyms, as described
  968. Xabove, it is site taylorable using the DIRFILE (as described below in
  969. XINTERNALS).
  970. X.PP
  971. XAll of the files and directories contained in the system are all plain
  972. Xtext files, with an easy format that can be used to your advantage.
  973. X.sp 1
  974. X.SH "INTERNALS"
  975. X.I help
  976. Xuses a tree structured file data-base to store all help.  Each node (or
  977. Xdirectory) has at least one file.  This file, called
  978. X.I ./TEXT
  979. Xcontains the actual text of the help message for this subtopic.  If there
  980. Xare any subtopics below this one, their
  981. X.I ./TEXT
  982. Xfiles are held in subdirectories of this one, and then there is a file
  983. X.I ./DIR
  984. Xthat maps the directory name to the subtopic to display.  This will allow
  985. X.I SYSV
  986. Xsystems with limited directory name lengths map much longer descriptions
  987. Xto shorter file names.
  988. X.PP
  989. XAlso contained in the
  990. X.I ./DIR
  991. Xfile is a similar mapping for acronyms of the subsequent subtopics.  In the
  992. Xexample above with lp, a sample portion of a help file would be
  993. X.sp 1
  994. X    lp-command*lp
  995. X.br
  996. X    lp-command:printing
  997. X.br
  998. X    lp-command:getting output
  999. X.sp 1
  1000. XWhere the "*" in the first line implies that the "topic" name "lp" is to
  1001. Xbe printed as a possible topic for help, and the subtopics "printing" and
  1002. X"getting output" are acronyms for traversing the to the "lp-command"
  1003. Xsubdirectory to get at the next
  1004. X.I ./TEXT
  1005. Xfile.
  1006. X.sp 1
  1007. X.SH "FILES"
  1008. X"/usr/help/...."    - Root directory for help
  1009. X.br
  1010. X"./TEXT"            - Help text
  1011. X.br
  1012. X"./DIR"            - Directory files for next subtopic
  1013. X.PP
  1014. X.SH DIAGNOSTICS
  1015. XThere are no real diagnostics.  However, if you reach a point in the
  1016. Xhelp system where you know you have a "subtopic" but cannot reach it,
  1017. Xsearch for correct premissions (0444 for
  1018. X.I ./TEXT
  1019. Xfiles, and (0555 for
  1020. X.I ./DIR
  1021. Xfiles).
  1022. X.sp 1
  1023. X.SH AUTHOR
  1024. XRoland J. Stolfa
  1025. X.br
  1026. XDepartment of Computing and Information Sciences
  1027. X.br
  1028. XOklahoma State University
  1029. X
  1030. !FUNKY!STUFF!
  1031. echo x - files
  1032. sed '1,$s/^X//' <<\!FUNKY!STUFF! > files
  1033. Xecho x - DIR
  1034. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR
  1035. XXcancel*stop a print job
  1036. XXcancel:cancel
  1037. XXcat*look at a file
  1038. XXcat:cat
  1039. XXcd*change directory
  1040. XXcd:cd
  1041. XXfiles*xenix file struture
  1042. XXfiles:files
  1043. XXhelp*help
  1044. XXkermit*kermit
  1045. XXkermit:upload
  1046. XXkermit:download
  1047. XXless*viewing a stream
  1048. XXless:less
  1049. XXlp*printing
  1050. XXlp:lp
  1051. XXlpstat*show queue
  1052. XXlpstat:lpstat
  1053. XXls*directory
  1054. XXls:ls
  1055. XXmail*sending mail
  1056. XXmail:mail
  1057. XXmkdir*making a subdirectory
  1058. XXmkdir:mkdir
  1059. XXmore*scan a file
  1060. XXmore:more
  1061. XXod*looking at a non-text file
  1062. XXod:od
  1063. XXpassword*changing your password
  1064. XXpassword:password
  1065. XXpassword:passwd
  1066. XXrm*deleting a file
  1067. XXrm:rm
  1068. XXrmdir*removing a directory
  1069. XXrmdir:rmdir
  1070. XXusers*who is logged on to which machine
  1071. XXusers:users
  1072. XXwho*who is logged on to what port
  1073. XXwho:who
  1074. XXwrite*talking with other users
  1075. XXwrite:write
  1076. X!FUNKY!STUFF!
  1077. Xecho x - TEXT
  1078. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1079. XX
  1080. XXThis is the help facility for the Computer Science Undergraduate
  1081. XXComputing Facility (running on Intel 286/310's).  In response to
  1082. XXthe "HELP >" prompt, you can:
  1083. XX
  1084. XX    + Type any help topic that you see listed for further
  1085. XX      help on that subject.
  1086. XX
  1087. XX    + Press return to back out of the help facility by
  1088. XX      one level (or back to the shell).
  1089. XX
  1090. XX    + Press <DEL> or <ctrl-D> to get back to the shell.
  1091. X!FUNKY!STUFF!
  1092. Xmkdir cancel
  1093. Xcd cancel
  1094. Xecho x - TEXT
  1095. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1096. XX"cancel" cancels line printer requests that were made by the "lp(1)"
  1097. XXcommand.  The command line arguments may be either request ids (as
  1098. XXreturned by "lp(1)") or printer names (as given by "lpstat(1)").
  1099. XX
  1100. XXSpecifying a request id cancels the associated request even if it
  1101. XXis currently printing.  Specifying a printer cancels the request
  1102. XXwhich is currently printing on that printer.
  1103. XX
  1104. XXThe general syntax is:
  1105. XX
  1106. XX    cancel [ids] [printers]
  1107. X!FUNKY!STUFF!
  1108. Xcd ..
  1109. Xmkdir cat
  1110. Xcd cat
  1111. Xecho x - DIR
  1112. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR
  1113. XXcopying*copying files
  1114. XXpiping*piping files
  1115. X!FUNKY!STUFF!
  1116. Xecho x - TEXT
  1117. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1118. XX
  1119. XXThis XENIX facility allows you to look at the contents of a file.
  1120. XXYou do this by typing:
  1121. XX
  1122. XX    % cat <filename>
  1123. XX
  1124. XXThis will display to your screen the entire contents of the file <filename>.
  1125. XX
  1126. XXNOTE:    You will probably want to use "more(1)" or "less(l)" to view
  1127. XX    the contents of a file.  These commands page the data to your
  1128. XX    screen rather than just list it like "cat(1)".
  1129. X!FUNKY!STUFF!
  1130. Xmkdir copying
  1131. Xcd copying
  1132. Xecho x - TEXT
  1133. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1134. XX
  1135. XXYou can use "cat (1)" to copy any file that you have read access to.
  1136. XXThis is done using the file redirection capabilities of UNIX in the following
  1137. XXmanor...
  1138. XX
  1139. XX    If you want to copy the file "//magma/usr/joe/a.out" to
  1140. XX    a new file "//magma/usr/joe/prog1", you can type the following...
  1141. XX
  1142. XX    $ cat <//magma/usr/joe/a.out >//magma/usr/joe/prog1
  1143. XX    $
  1144. XX
  1145. XX    OR if you are already in the directory
  1146. XX    "//magma/usr/joe", you can type
  1147. XX
  1148. XX    $ cat <a.out >prog1
  1149. XX    $
  1150. XX
  1151. XXNOTE:    Several better methods exist.  See Also "mv(1)" and "cp(1)".
  1152. X!FUNKY!STUFF!
  1153. Xcd ..
  1154. Xmkdir piping
  1155. Xcd piping
  1156. Xecho x - TEXT
  1157. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1158. XX
  1159. XXAnother use for "cat (1)" is to be the source of a file for a pipe.
  1160. XXUsing "cat (1)" in this way works, but is not necessary the best way to
  1161. XXget the job done.
  1162. XX
  1163. XX    Lets say that the file "//magma/usr/joe/prog1.dat" is the
  1164. XX    source input file for the program "//magma/usr/joe/prog1".
  1165. XX    Also, let's assume you are already in the directory
  1166. XX    "//magma/usr/joe".  To use the data file as input to the
  1167. XX    program you COULD do the following...
  1168. XX
  1169. XX    $ cat prog1.dat | prog1
  1170. XX    $
  1171. XX
  1172. XXNOTE:    A better way of doing this is the following
  1173. XX
  1174. XX    $ prog1 < prog1.dat
  1175. XX    $
  1176. X!FUNKY!STUFF!
  1177. Xcd ..
  1178. Xcd ..
  1179. Xmkdir cd
  1180. Xcd cd
  1181. Xecho x - DIR
  1182. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR
  1183. XXdot*Going nowhere
  1184. XXdot-dot*going up
  1185. XXdown*moving down
  1186. XXsideways*moving sideways
  1187. XXup*moving up
  1188. X!FUNKY!STUFF!
  1189. Xecho x - TEXT
  1190. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1191. XX
  1192. XXUnder UNIX, the entire  directory structure is an inverted tree.  This
  1193. XXstructure is shown in the file names that are used to access everything
  1194. XXin the system.  For example
  1195. XX
  1196. XX    //magma/usr/joe/foo/a.out
  1197. XX
  1198. XXdescribes a file on machine "magma",  under the first level directory
  1199. XXheading "usr", under the second level directory heading "joe", under
  1200. XXthe third level directory heading "foo", NAMED "a.out". I.E.
  1201. XX
  1202. XX    //<Machine>/<Directory 1>/.../<Directory N>/<File name>
  1203. XX
  1204. XXTo traverse this type of directory structure, the standard UNIX command
  1205. XX"cd (1)" is used.  This command allows you to 'walk' a directory from point
  1206. XX'a' to point 'b' easily.
  1207. XX
  1208. XXIt will also allow you to go from machine to machine.
  1209. XX
  1210. XXAbsolute paths may also be used to get from a place in sub-sub-directory
  1211. XX'a' to a place in sub-directory 'b' (for example) without having to
  1212. XXtraverse the entire path between these two directories.
  1213. X!FUNKY!STUFF!
  1214. Xmkdir dot
  1215. Xcd dot
  1216. Xecho x - TEXT
  1217. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1218. XX
  1219. XXThere are several unique names in the XENIX file structure.  One of these
  1220. XXare "."  This file name refers to the current directory file.  Therefore
  1221. XX"file1" refers to the same file as "./file1"
  1222. X!FUNKY!STUFF!
  1223. Xcd ..
  1224. Xmkdir dot-dot
  1225. Xcd dot-dot
  1226. Xecho x - TEXT
  1227. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1228. XX
  1229. XXThere are several unique names in the XENIX file structure.  One of these
  1230. XXis ".."  This file name refers to the current directory's parent directory
  1231. XXfile.  Therefore if "foo" is the parent directory of "bar" (i.e.
  1232. XX"/usr/foo/bar" say), then the directories "/usr/foo" and "/usr/foo/bar/.."
  1233. XXboth refer to the same directory.
  1234. X!FUNKY!STUFF!
  1235. Xcd ..
  1236. Xmkdir down
  1237. Xcd down
  1238. Xecho x - TEXT
  1239. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1240. XX
  1241. XXIf you were in the _directory_ "//magma/usr/joe/foo" looking
  1242. XXat the file "a.out", and you wanted to descend to the subdirectory
  1243. XX"bar" you have to type
  1244. XX
  1245. XX    $ cd bar
  1246. XX    $
  1247. XX
  1248. XXThis will move you down the directory link to the subdirectory specified
  1249. XXby the complete path
  1250. XX
  1251. XX    "//magma/usr/joe/foo/bar"
  1252. XX
  1253. XXSimilarly, if you know that the directory path
  1254. XX
  1255. XX    "//magma/usr/joe/foo/bar/sue/ann/bob"
  1256. XX
  1257. XXexists, and you are at the directory
  1258. XX
  1259. XX    "//magma/usr/joe"
  1260. XX
  1261. XXand you wish to get to the before mentioned directory, you can type
  1262. XX
  1263. XX    $ cd foo/bar/sue/ann/bob
  1264. XX    $
  1265. XX
  1266. XXThis is called a "relative path" to the file
  1267. XX"//magma/usr/joe/foo/bar/sue/ann/bob" and this will put you in the
  1268. XXdescribed directory just as if you had typed
  1269. XX
  1270. XX    $ cd //magma/usr/joe/foo/bar/sue/ann/bob
  1271. X!FUNKY!STUFF!
  1272. Xcd ..
  1273. Xmkdir sideways
  1274. Xcd sideways
  1275. Xecho x - TEXT
  1276. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1277. XX
  1278. XXIn this example, if you want to jump from the directory
  1279. XX
  1280. XX    "//magma/usr/joe/foo"
  1281. XX
  1282. XXto a directory 
  1283. XX
  1284. XX    "//earth/usr/sue/ann/bob"
  1285. XX
  1286. XXYou can type the following to get you there
  1287. XX
  1288. XX    $ cd //earth/usr/sue/ann/bob
  1289. XX    $
  1290. XX
  1291. XXPlease note that you do not even have to be on the same physical machine
  1292. XXto descend to a subdirectory of that machine.  All that is required is that
  1293. XXyou know the path to the subdirectory that you want AND that you have the
  1294. XXaccess permission of who ever owns that file/directory.
  1295. X!FUNKY!STUFF!
  1296. Xcd ..
  1297. Xmkdir up
  1298. Xcd up
  1299. Xecho x - TEXT
  1300. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1301. XX
  1302. XXIf you were in the _directory_ "//magma/usr/joe/foo" looking
  1303. XXat the file "a.out", and you wanted to return to the directory
  1304. XX"//magma/usr/joe", all you have to type
  1305. XX
  1306. XX$ cd ..
  1307. XX$
  1308. XX
  1309. XXThis will move you up the return link to the directory above you.
  1310. X!FUNKY!STUFF!
  1311. Xcd ..
  1312. Xcd ..
  1313. Xmkdir files
  1314. Xcd files
  1315. Xecho x - TEXT
  1316. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1317. XXThere are several unique problems that are related to Open-Net,
  1318. XXthe software package that gives the Intel's their collective identity.
  1319. XXThese relate to the fact that if you have a program that tries to open
  1320. XXa file "foo" in your current working directory, the "open(2)" call will
  1321. XXwork.  However, if you try to open a file "/usr/joe/foo", this will FAIL.
  1322. XXThe reason is that the local machine that you have logged onto will try
  1323. XXto find a file "/usr/joe/foo" on IT'S file system, rooted from the top,
  1324. XXand will FAIL.  To get the above example to function, you should have your
  1325. XXopen call try to open "//machine/usr/joe/foo".
  1326. X!FUNKY!STUFF!
  1327. Xcd ..
  1328. Xmkdir help
  1329. Xcd help
  1330. Xecho x - TEXT
  1331. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1332. XXThis is a VMS style help facility.  It is intended to be more helpful
  1333. XXfor first time users of the XENIX (or UNIX) operating system than is the
  1334. XXnative "man (1)" help system that normally comes with this operating system.
  1335. XXIn addition to being more helpful, we don't have the "man (1)" system
  1336. XXon XENIX, so I had to come up with something...
  1337. XX
  1338. XXIn any case, this system is a tree-like help facility.  For each entry
  1339. XXin the help tree, there can be many children below each entry.
  1340. XXTo move around in the tree, you go to each point in the tree and then
  1341. XXgo down one level.  To go back up, you travel the link from the child
  1342. XXto the parent.  I.E.
  1343. XX
  1344. XX            ------- Main Subject --------- ...
  1345. XX            /      \            \...\
  1346. XX               /       \
  1347. XX        Child Subject      Other Child Subjects      ...
  1348. XX             / | \        / | \
  1349. XX    Grand Children Subjects      Grand Children Subjects    ...
  1350. XX
  1351. XXTo exit the help facility, just type <CR> enough times to move up the
  1352. XXchildren links to exit the "Main Subject" node, type <CTRL-D>, or <DEL>.
  1353. XX
  1354. XXIn addition, this help system runs over Open-Net, an Intel software package
  1355. XXthat gives the Intel 310's their collective identity.  This allows there to
  1356. XXbe only one copy of the help system on the collective six machines of the
  1357. XXIntel system.
  1358. X!FUNKY!STUFF!
  1359. Xcd ..
  1360. Xmkdir kermit
  1361. Xcd kermit
  1362. Xecho x - TEXT
  1363. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1364. XX                       THE KERMIT FILE TRANSFER PROTOCOL
  1365. XX
  1366. XX                                 November 1986
  1367. XX
  1368. XX
  1369. XX
  1370. XXKermit  is  an  error-correcting protocol for transferring sequential files be-
  1371. XXtween computers of  all  sizes  over  ordinary  asynchronous  telecommunication
  1372. XXlines.  Kermit is non-proprietary, thoroughly documented, and in wide use.  The
  1373. XXprotocol and the original implementations were developed at Columbia University
  1374. XXand  have  been shared with thousands of other institutions all over the world,
  1375. XXmany of which have made significant contributions of  their  own.    Kermit  is
  1376. XXpresently available for more than 200 different machines and operating systems,
  1377. XXand additional versions are always under development.
  1378. XX
  1379. XXAll Kermit programs perform  file  transfer  using  the  Kermit  file  transfer
  1380. XXprotocol.    In  addition,  Kermit programs for personal computers also provide
  1381. XXterminal emulation, usually of the DEC VT52, VT100, or  similar  terminal,  and
  1382. XXsome  of  the  mainframe Kermit programs are capable of initiating connections,
  1383. XXacting as dumb terminals to remote systems.  Kermit  programs  work  only  over
  1384. XXasynchronous  RS-232 direct or dialup connections, or connections that simulate
  1385. XXthem.  For file transfer to take place, there must be a Kermit program  running
  1386. XXon each end of the connection, one on each computer.
  1387. XX
  1388. XXThere are Kermit programs for most popular "generic" operating systems, includ-
  1389. XXing UNIX, MS-DOS, and CP/M, and for  mainframes  and  minicomputers  from  Bur-
  1390. XXroughs,   Cray,  CDC,  Data  General,  DEC,  Gould  (SEL),  Harris,  Honeywell,
  1391. XXHewlett-Packard, IBM, Perkin-Elmer (Concurrent), Prime, Sperry/Univac, and Tan-
  1392. XXdem,  and  for  particular  microcomputers and workstations from Apple, Apollo,
  1393. XXAtari, Commodore, IBM, Tandy, and many others, written in  a  wide  variety  of
  1394. XXlanguages  including  many different assemblers, plus high-level languages like
  1395. XXAlgol, Basic, Bliss, C, Forth, Fortran, Lisp, Mumps, Pascal, PL/I, and  Ratfor.
  1396. XXA complete list of currently available Kermit programs accompanies this flyer.
  1397. XX
  1398. XXHere  are some details about the several most popular Kermit programs.  Most of
  1399. XXthe following implementations are capable of both local and  remote  operation,
  1400. XXserver  and  client  modes,  text  and binary file transfer, and support a full
  1401. XXrange of communications options -- speed, parity, duplex, flow  control,  hand-
  1402. XXshake  --  to  allow  adaptation  to  a  wide  variety  of hosts (including IBM
  1403. XXmainframes) and communication media.
  1404. XX
  1405. XX   - IBM PC Kermit Version 2.29 runs under PC-DOS version 2.0 and later on
  1406. XX     the entire IBM PC family, as well as on IBM "clones" and compatibles.
  1407. XX     It provides nearly complete DEC VT102 terminal emulation at speeds up
  1408. XX     to  38.4K  baud  fully  buffered and interrupt driven -- and includes
  1409. XX     support for  color  displays,  compatibility  with  various  "desktop
  1410. XX     organizers,"  and selectable emulation of other terminals.  There are
  1411. XX     also versions of Kermit specifically tailored for a variety of  other
  1412. XX     MS-DOS  systems,  including the DEC Rainbow, Zenith-100, Victor 9000,
  1413. XX     and many others, and there is a "generic" MS-DOS Kermit  for  systems
  1414. XX     not explicitly covered.
  1415. XX
  1416. XX   - Macintosh  Kermit  Version 0.8(34) runs on the entire Apple Macintosh
  1417. XX     family, from the original 128K Mac to the Mac/XL, to the  fully  con-
  1418. XX     figured  Macintosh-Plus.  It provides fairly complete VT102 emulation
  1419. XX     at speeds up to 9600 baud, and file transfer speeds up to 56Kb.
  1420. XX
  1421. XX   - UNIX Kermit is distributed only in C-language source form.  It may be
  1422. XX     built  for  nearly any machine running practically any post-V6 varia-
  1423. XX     tion of UNIX, including V7, Berkeley 2.x and 4.x, AT&T System III and
  1424. XX     System  V, Xenix, Venix, and so on.  The same source also serves as a
  1425. XX     basis for Macintosh, Amiga, and other Kermit programs.
  1426. XX
  1427. XX   - VAX/VMS Kermit is written in Bliss, but it  is  also  distributed  in
  1428. XX     Macro-32  and  hex  form,  so  that a Bliss compiler is not required.
  1429. XX     Other versions exist in C and Pascal.
  1430. XX
  1431. XX   - IBM mainframe Kermit  programs  for  VM/CMS  and  MVS/TSO  work  with
  1432. XX     asynchronous  ASCII  TTY connections through 3705 or equivalent front
  1433. XX     ends, or through Series/1, 7171, or similar protocol converters  that
  1434. XX     support  the Yale ASCII Communications System; beyond this exception,
  1435. XX     Kermit cannot be  used  to  transfer  files  in  the  IBM  3270-style
  1436. XX     full-screen  terminal  environment.  There are no Kermit programs for
  1437. XX     DOS/VSE, or IBM minis like the System/34 and System/38, because these
  1438. XX     systems do not support asynchronous ASCII communications.  Currently,
  1439. XX     IBM mainframe Kermits run only in remote mode.
  1440. XX
  1441. XXThe Kermit software -- including source code -- is furnished free  and  without
  1442. XXlicense, and without warranty of any kind, and neither Columbia University, nor
  1443. XXthe individual  authors,  nor  any  institution  that  has  contributed  Kermit
  1444. XXmaterial, acknowledge any liability for any claims arising from the use of Ker-
  1445. XXmit.  Furthermore, it must be stated that the quality of  the  Kermit  programs
  1446. XXvaries  --  some are polished, well-documented professional products and others
  1447. XXare not.  Kermit programs are contributed by  public-spirited  volunteers,  and
  1448. XXColumbia  University does not wish to discourage such contributions by subject-
  1449. XXing them to a rating system.  Since source code is provided for  all  implemen-
  1450. XXtations, users may make improvements or write documentation where it is lacking
  1451. XXand are encouraged to contribute their work back to Columbia for  further  dis-
  1452. XXtribution.    Under  certain  conditions  (described  in  a  separate document)
  1453. XXsoftware producers may include Kermit protocol in their products.
  1454. XX
  1455. XXAlthough the Kermit software is free and unlicensed, Columbia University cannot
  1456. XXafford  to  distribute  it for free because the demand is too great.  To defray
  1457. XXour costs for media, printing, postage, labor, and computing resources, we  re-
  1458. XXquire  moderate  distribution  fees from those who request Kermit directly from
  1459. XXus.  The schedule is given on the accompanying Kermit Order Form.  You may also
  1460. XXobtain  Kermit  programs  from  many other sources, including user groups, net-
  1461. XXworks, dialup bulletin boards, and you may copy them from  friends,  neighbors,
  1462. XXand  colleagues.    In  fact, you may obtain Kermit programs from anyone who is
  1463. XXwilling to share them with you, just as you may share them yourself.
  1464. XX
  1465. XXKermit is distributed by Columbia  University  primarily  on  9-track  magnetic
  1466. XXtape,  suitable for reading on most mainframe and minicomputers.  It is assumed
  1467. XXthat Kermit will be ordered in this form  by  institutional  computer  centers,
  1468. XXwhose  professional  staff will take the responsibility for "bootstrapping" the
  1469. XXmicrocomputer versions from the tape to diskettes for their users.   The  tapes
  1470. XXinclude  source  code and any available documentation for each Kermit implemen-
  1471. XXtation, and in some cases also binaries (usually encoded in hex or other print-
  1472. XXable format).  Selected microcomputer versions are also available from Columbia
  1473. XXon diskette, and from diskette services, user  groups,  and  individual  volun-
  1474. XXteers, some of whom are listed on a separate flyer.
  1475. XX
  1476. XXDocumentation  includes  the  Kermit  User  Guide  (about 250pp) and the Kermit
  1477. XXProtocol Manual (90pp); one printed copy of each is included free with any tape
  1478. XXorder.  Other documents may be ordered separately, including addition copies of
  1479. XXthe manuals, the manuscript from the Kermit article that appeared in  the  June
  1480. XXand  July  1984 issues of BYTE Magazine (36pp), and the new book Kermit, A File
  1481. XXTransfer Protocol by Frank da Cruz, 400pp, Digital Press (1987).
  1482. XX
  1483. XXThe Kermit book is a comprehensive introduction and guide  to  Kermit;  it  in-
  1484. XXcludes  an  overview  of what Kermit is for and how it works, with tutorials in
  1485. XXcomputer file systems and data communications, a generalized command reference,
  1486. XXa  troubleshooting  guide,  a  complete protocol specification with program ex-
  1487. XXamples, a glossary, an index, and numerous tables, figures, and  illustrations.
  1488. XXThe User Guide contains detailed, specific instructions for the use of the most
  1489. XXpopular Kermit programs (MS-DOS, VMS, UNIX, Apple, etc).  The  Protocol  Manual
  1490. XXis  an  older  description of the Kermit protocol, which lacks the organization
  1491. XXand program examples from the book.  If you have the book, you don't  need  the
  1492. XXProtocol Manual but you will still need the User Guide.
  1493. XX
  1494. XXOnce  you  receive Kermit, you are encouraged to copy and redistribute it, with
  1495. XXthe following stipulations: Kermit should not be sold for profit; credit should
  1496. XXbe  given  where  it  is  due; and new material should be sent back to Columbia
  1497. XXUniversity so that we can maintain a definitive and comprehensive set of Kermit
  1498. XXimplementations  for further distribution.  And finally, please use Kermit only
  1499. XXfor peaceful and humane purposes.
  1500. XX
  1501. XXORDERING INFORMATION:
  1502. XX
  1503. XXAll Kermit material is available on magnetic tape as described below.  Selected
  1504. XXKermit programs may also be ordered on diskette; see the order form.  Tapes in-
  1505. XXclude program source code, diskettes generally do not have room for source.
  1506. XX
  1507. XXThere are 3 separate Kermit tapes: A, B, and C. There are too many Kermit files
  1508. XXto  fit  on fewer tapes.  All tapes are half-inch, 2400-foot, 9-track, 1600bpi,
  1509. XXodd parity.  They are available ONLY in the following formats:
  1510. XX
  1511. XX  ANSI:   ANSI labeled ASCII, format D (variable length records, VMS COPY)
  1512. XX  TAR:    UNIX TAR format (written on a VAX with 4.2BSD or Ultrix-32)
  1513. XX  OS:     IBM OS standard labeled EBCDIC, format VB (variable length records)
  1514. XX  CMS:    IBM VM/CMS VMFPLC2 format (unlabeled)
  1515. XX  DEC-10: DECsystem-10 Backup/Interchange format (unlabeled)
  1516. XX  DEC-20: DECSYSTEM-20 DUMPER format (unlabeled)
  1517. XX
  1518. XXTape blocksizes, when applicable, are our choice and in the range  8K-10K  (use
  1519. XXof  smaller  blocksizes could overflow the tapes).  NO OTHER FORMATS ARE AVAIL-
  1520. XXABLE.  We can NOT make 800bpi or 6250bpi  tapes,  unlabeled  tapes  (except  as
  1521. XXnoted  above),  fixed-block tapes, or custom tapes of any kind.  If none of the
  1522. XXabove formats looks familiar to you, then specify ANSI -- this is  an  industry
  1523. XXstandard format that should be readable by any computer system (ANSI specifica-
  1524. XXtions are provided on paper).  VAX/VMS sites should specify ANSI.
  1525. XX
  1526. XXTAPE "A" CONTAINS:
  1527. XX   - The more popular microcomputer  (PC,  workstation)  Kermit  implemen-
  1528. XX     tations.
  1529. XX
  1530. XXTAPE "B" CONTAINS:
  1531. XX   - The more popular mainframe and minicomputer Kermit implementations.
  1532. XX
  1533. XXTAPE "C" CONTAINS:
  1534. XX   - Esoteric, less popular, or redundant Kermit implementations.
  1535. XX   - Text formatter source for the Kermit User Guide and Protocol Manual.
  1536. XX   - Archives of old mail, other large documents.
  1537. XX
  1538. XXEXCEPTIONS:
  1539. XX   - C-Kermit  is  the basis of all Unix Kermit implementations, mainframe
  1540. XX     and micro, and also for Commodore Amiga and Apple Macintosh  Kermits.
  1541. XX     It is on tape B.
  1542. XX
  1543. XX
  1544. XX
  1545. XX
  1546. XX         TO ORDER KERMIT, fill out the Kermit Order Form and send it to:
  1547. XX               __________________________________________________
  1548. XX
  1549. XX                               Kermit Distribution
  1550. XX               Columbia University Center for Computing Activities
  1551. XX                              612 West 115th Street
  1552. XX                            New York, NY 10025 (USA)
  1553. XX               __________________________________________________
  1554. XX
  1555. XX
  1556. XXPrepayment  by  check  is encouraged; an additional order processing fee is re-
  1557. XXquired if we must issue an invoice.   North  American  orders  are  shipped  by
  1558. XXdelivery  service  or first class US mail, with shipping costs included.  Over-
  1559. XXseas orders are shipped first class US (air) mail, with an additional  shipping
  1560. XXcharge  required.    Orders are normally processed within 2-4 weeks of receipt,
  1561. XXbut firm delivery schedules or methods cannot be guaranteed.  USA rush  service
  1562. XXis available for an extra fee (see order form *).
  1563. X!FUNKY!STUFF!
  1564. Xcd ..
  1565. Xmkdir less
  1566. Xcd less
  1567. Xecho x - TEXT
  1568. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1569. XX
  1570. XXTyping less <filename> at the command prompt will cause the computer to
  1571. XXdisplay the file one screen at a time.  The computer will not go to the
  1572. XXnext page of text until you press the spacebar.  You may also scroll
  1573. XXtext one line at a time with the return key, but you must press the
  1574. XXreturn key for each new line of text.  To get out of "less" you must
  1575. XXpress "q" to quit.
  1576. XX
  1577. XX"less(L)" is different from "more(1)" in that you may scroll backwards
  1578. XXwith "less(L)".  The 'help' key in "less(L)" is 'h'.
  1579. XX
  1580. XXFor example, the command
  1581. XX
  1582. XX% less foo
  1583. XX
  1584. XXwould display the file named foo one screen at a time, or until you
  1585. XXtype 'q'.
  1586. X!FUNKY!STUFF!
  1587. Xcd ..
  1588. Xmkdir lp
  1589. Xcd lp
  1590. Xecho x - TEXT
  1591. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1592. XX"lp(1)" is the command to print a file.  Currently there are several
  1593. XXdifferent printer queue's supported.  A current list of the available
  1594. XXprinters can be seen by giving the "lpstat -p" command.
  1595. XX
  1596. XXTypical printers that are usually available for CSUG users are:
  1597. XX    ag    - Ag Hall 241 printer
  1598. XX    parker    - The basement of the Parker Residence hall
  1599. XX    ms222    - The CIS cluster of AT&T Unix PC's in Math Sciences 222
  1600. XX          (ms222 is available 8am-5pm M-F only).
  1601. XX    ms214    - The CIS graduate cluster of AT&T PC's in Math Sciences
  1602. XX          214
  1603. XX    bus    - Business Building 009
  1604. XX    es1    - Engineering South 113
  1605. XX    es3    - Engineering South 413
  1606. XX    iba    - Iba Hall 111-A
  1607. XX    ps    - Physical Sciences 102
  1608. XX    stout    - Stout Hall 043
  1609. XX    ucat    - University Center - Tulsa
  1610. XX    ucc2    - Math Sciences Basement cluster MS-013
  1611. XX    
  1612. XX
  1613. XXThese printers are designated by the following syntax
  1614. XX
  1615. XX    lp -d<queue>
  1616. XX
  1617. XXWhere <queue> is one of the printers shown to be available by the
  1618. XX"lpstat -p" command.
  1619. XX
  1620. XXFor example, to print a file named foo on the 'parker' printer, you type 
  1621. XXthe following command:
  1622. XX
  1623. XX    lp -dparker < foo
  1624. X!FUNKY!STUFF!
  1625. Xcd ..
  1626. Xmkdir lpstat
  1627. Xcd lpstat
  1628. Xmkdir -r
  1629. Xcd -r
  1630. Xecho x - TEXT
  1631. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1632. XXThe "-r" option to "lpstat(1)" gives the current status of the
  1633. XXline printer scheduler.  If "lpstat(1)" returns with 
  1634. XX
  1635. XX    scheduler is not running
  1636. XX
  1637. XXYou should contact the secretaries in MS-218 and report the
  1638. XXname of the machine you are logged into, as well as the fact
  1639. XXthat the scheduler is not running
  1640. X!FUNKY!STUFF!
  1641. Xcd ..
  1642. Xmkdir -t
  1643. Xcd -t
  1644. Xecho x - TEXT
  1645. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1646. XXThe "-t" option to the "lpstat(1)" command will give you the
  1647. XXstatistics for the entire "lp(1)" family of commands as well
  1648. XXas the current status of the print queue, which jobs are currently
  1649. XXbeing serviced, and which printer queue's are accepting jobs
  1650. XXcurrently.
  1651. X!FUNKY!STUFF!
  1652. Xcd ..
  1653. Xmkdir -u
  1654. Xcd -u
  1655. Xecho x - TEXT
  1656. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1657. XXThe "-u" option of the "lpstat(1)" allows you to cut down the
  1658. XXlist of queue'ed jobs to those belonging to a particular user.
  1659. XX
  1660. XXAn example is in order...
  1661. XX
  1662. XX    lpstat -uroot
  1663. XX
  1664. XXWould give a complete list of all jobs owned by the user "root"
  1665. XXto any destination on the current machine.
  1666. X!FUNKY!STUFF!
  1667. Xcd ..
  1668. Xecho x - DIR
  1669. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR
  1670. XX-r*scheduler
  1671. XX-t*everything
  1672. XX-u*by user
  1673. XX-r:-r
  1674. XX-t:-t
  1675. XX-u:-u
  1676. X!FUNKY!STUFF!
  1677. Xecho x - TEXT
  1678. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1679. XX"lpstat(1)" is the command that will check on the printer system.
  1680. XXIt reports the overall list of jobs in the print queue (for each
  1681. XXprinter), the status of the scheduler, and several other statistics.
  1682. X!FUNKY!STUFF!
  1683. Xcd ..
  1684. Xmkdir ls
  1685. Xcd ls
  1686. Xecho x - TEXT
  1687. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1688. XX
  1689. XX"ls" stands for "list directory".  For you VMS users, this is "DIRECTORY".
  1690. XXThe several options listed below are useful mostly in shell scripts
  1691. XX(NOTE: see the help page on your shell for further details).  There are
  1692. XXseveral that are of prime help during the usual running.  They are
  1693. XXthe "-a" and "-l" options.
  1694. X!FUNKY!STUFF!
  1695. Xcd ..
  1696. Xmkdir mail
  1697. Xcd mail
  1698. Xecho x - DIR
  1699. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR
  1700. XXreading*reading
  1701. XXwriting*writing
  1702. X!FUNKY!STUFF!
  1703. Xecho x - TEXT
  1704. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1705. XXThe "mail(L)" command is used to transfer messages from one user to
  1706. XXanother.  There are two command line invocations of mail that
  1707. XXdo vastly different things.  They are for reading and writing mail.
  1708. X!FUNKY!STUFF!
  1709. Xmkdir reading
  1710. Xcd reading
  1711. Xecho x - TEXT
  1712. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1713. XXTo read your mail, you should use the following command line...
  1714. XX
  1715. XX    % mail
  1716. XX
  1717. XXWhat this will present you with is either the list of mail message
  1718. XXheaders that you have not read (or have saved) or the message
  1719. XX
  1720. XX    No mail
  1721. XX
  1722. XXif you have no new mail.
  1723. XX
  1724. XX
  1725. XXThe commands that are in effect during this mode of operation are
  1726. XXvery well covered in the internal help facility of mail as accessed
  1727. XXby the "?" command.
  1728. X!FUNKY!STUFF!
  1729. Xcd ..
  1730. Xmkdir writing
  1731. Xcd writing
  1732. Xecho x - TEXT
  1733. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1734. XXTo write mail to a user, you must have their address.  Once you have
  1735. XXthat, you can send them mail by the following command line
  1736. XX
  1737. XX    % mail bob
  1738. XX    <your message here>
  1739. XX        .
  1740. XX        .
  1741. XX        .
  1742. XX    <control-D as the first character of a line>
  1743. XX        <A SHORT PAUSE>
  1744. XX    %
  1745. XX
  1746. XXThis will send some message to the user "bob" on the Intel system.
  1747. X!FUNKY!STUFF!
  1748. Xcd ..
  1749. Xcd ..
  1750. Xmkdir mkdir
  1751. Xcd mkdir
  1752. Xecho x - TEXT
  1753. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1754. XX
  1755. XX
  1756. XX
  1757. XX
  1758. XX          Name
  1759. XX
  1760. XX            mkdir - Make Directory
  1761. XX
  1762. XX          Format
  1763. XX
  1764. XX            mkdir directory-name
  1765. XX
  1766. XX          Description
  1767. XX
  1768. XX              The mkdir command will create a directory in the current
  1769. XX            directory that the user is in if the user has write and
  1770. XX            execute access permission to the parent directory of the
  1771. XX            directory that the user is creating.
  1772. XX              The mkdir command can also create the subdirectories at the
  1773. XX            same time that it creates the main directory.  For example
  1774. XX
  1775. XX                          mkdir foo/foo1/foo2
  1776. XX
  1777. XX            would create a directory named foo with subdirectories named
  1778. XX            foo1 and foo2.
  1779. XX
  1780. XX
  1781. X!FUNKY!STUFF!
  1782. Xcd ..
  1783. Xmkdir more
  1784. Xcd more
  1785. Xecho x - TEXT
  1786. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1787. XX
  1788. XX
  1789. XX
  1790. XX
  1791. XX
  1792. XX
  1793. XX             Name 
  1794. XX
  1795. XX               more - Views files one page at a time.
  1796. XX
  1797. XX             Description:
  1798. XX
  1799. XX                 Typing more <filename> at the command prompt
  1800. XX              will cause the computer to display the file one
  1801. XX              screen at a time.  The computer will not go to
  1802. XX              the next page of text until you press the spacebar.
  1803. XX              You may also scroll text one line at a time with    
  1804. XX              the return key, but you must press the return key
  1805. XX              for each new line of text.
  1806. XX                 To get out of "more" you can either view the 
  1807. XX              whole file or press the delete key.
  1808. XX
  1809. XX              For example, the command
  1810. XX
  1811. XX                   % more foo
  1812. XX           
  1813. XX              would display the file named foo one screen at a
  1814. XX              time.
  1815. XX
  1816. X!FUNKY!STUFF!
  1817. Xcd ..
  1818. Xmkdir od
  1819. Xcd od
  1820. Xmkdir -c
  1821. Xcd -c
  1822. Xecho x - TEXT
  1823. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1824. XX
  1825. XX
  1826. XX
  1827. XX             Utility
  1828. XX
  1829. XX                od - octal dump
  1830. XX
  1831. XX             Option
  1832. XX
  1833. XX                -c
  1834. XX
  1835. XX             Description
  1836. XX
  1837. XX                The -c option of the od utility will produce
  1838. XX               a character dump.  od will display certain 
  1839. XX               nonprintable characters as characters preceded
  1840. XX               by a backslash.  Any nonprinting characters that
  1841. XX               are not in the following list will appear as
  1842. XX               3-digit octal numbers.
  1843. XX
  1844. XX                   symbol      character
  1845. XX                   ------      ---------
  1846. XX                     \O         null
  1847. XX                     \b         backspace
  1848. XX                     \f         formfeed
  1849. XX                     \n         newline
  1850. XX                     \r         return
  1851. XX                     \t         tab
  1852. XX
  1853. X!FUNKY!STUFF!
  1854. Xcd ..
  1855. Xmkdir -d
  1856. Xcd -d
  1857. Xecho x - TEXT
  1858. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1859. XX
  1860. XX
  1861. XX
  1862. XX            Utility
  1863. XX
  1864. XX               od - octal dump
  1865. XX
  1866. XX            Option
  1867. XX
  1868. XX               -d
  1869. XX
  1870. XX            Description
  1871. XX
  1872. XX                The -d option used with the od utility will 
  1873. XX              produce a decimal dump of your file.
  1874. XX  
  1875. X!FUNKY!STUFF!
  1876. Xcd ..
  1877. Xmkdir -x
  1878. Xcd -x
  1879. Xecho x - TEXT
  1880. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1881. XX
  1882. XX
  1883. XX
  1884. XX
  1885. XX             Utility
  1886. XX
  1887. XX                od - octal dump
  1888. XX
  1889. XX             Option
  1890. XX
  1891. XX                -x
  1892. XX
  1893. XX             Description
  1894. XX
  1895. XX                 The -x option used with the od utility will
  1896. XX               produce a hexidecimal dump of your file.
  1897. XX
  1898. X!FUNKY!STUFF!
  1899. Xcd ..
  1900. Xecho x - DIR
  1901. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR
  1902. XX-c*ascii
  1903. XX-d*decimal
  1904. XX-x*hex
  1905. XX-c:-c
  1906. XX-d:-d
  1907. XX-x:-x
  1908. X!FUNKY!STUFF!
  1909. Xecho x - TEXT
  1910. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1911. XX
  1912. XX
  1913. XX
  1914. XX            Name
  1915. XX
  1916. XX              od - Short for octal dump
  1917. XX
  1918. XX            Description:
  1919. XX
  1920. XX               The od utility will dump the contents of an
  1921. XX              executable or object file into a file so that 
  1922. XX              you may view the contents.  The syntax for the
  1923. XX              od utility is
  1924. XX
  1925. XX                      od <-option> file
  1926. XX  
  1927. XX              where file is the pathname of the file that od
  1928. XX              dumps.  If you do not specify an option, the        
  1929. XX              utility will default to  an octal dump.  
  1930. X!FUNKY!STUFF!
  1931. Xcd ..
  1932. Xmkdir password
  1933. Xcd password
  1934. Xecho x - TEXT
  1935. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1936. XX
  1937. XX
  1938. XX
  1939. XX          Name
  1940. XX     
  1941. XX            passwd - Change Password
  1942. XX
  1943. XX          Description
  1944. XX
  1945. XX            The command passwd will allow the user to change his/her
  1946. XX           password into the computer.  The format for the command passwd
  1947. XX           is as follows:
  1948. XX
  1949. XX
  1950. XX               1) Type "passwd" at the command prompt.
  1951. XX
  1952. XX               2) The computer will respond with "Old Password:" 
  1953. XX                  You should then type in your old password and hit
  1954. XX                  return.
  1955. XX
  1956. XX               3) The computer will respond with "New Password:".  
  1957. XX                  You should then type in your new password and hit
  1958. XX                  return.
  1959. XX
  1960. XX               4) The computer will respond with "Re-enter new password:".
  1961. XX                  You should then re-enter your password and hit return.
  1962. XX                  If the new password and the re-entered password do not
  1963. XX                  match, then the computer will prompt you again for the
  1964. XX                  new password.
  1965. XX
  1966. X!FUNKY!STUFF!
  1967. Xcd ..
  1968. Xmkdir rm
  1969. Xcd rm
  1970. Xmkdir -f
  1971. Xcd -f
  1972. Xecho x - TEXT
  1973. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1974. XXUsing the -f option with the rm command will remove a file
  1975. XXthat you don't have write permission to without asking for
  1976. XXyour consent.
  1977. X!FUNKY!STUFF!
  1978. Xcd ..
  1979. Xmkdir -i
  1980. Xcd -i
  1981. Xecho x - TEXT
  1982. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1983. XXUsing the -i option with the rm command will make the rm
  1984. XXcommand prompt you before the file is removed.  If you
  1985. XXuse the -r option with the -i option, rm will prompt you
  1986. XXbefore examining each directory.
  1987. X!FUNKY!STUFF!
  1988. Xcd ..
  1989. Xmkdir -r
  1990. Xcd -r
  1991. Xecho x - TEXT
  1992. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  1993. XXUsing the -r option with the rm command will delete all files
  1994. XXin a directory as well as the directory itself.  Be careful
  1995. XXusing the -r option.
  1996. X!FUNKY!STUFF!
  1997. Xcd ..
  1998. Xecho x - DIR
  1999. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR
  2000. XX-f*force
  2001. XX-i*inquire
  2002. XX-r*recursively
  2003. XX-f:-f
  2004. XX-i:-i
  2005. XX-r:-r
  2006. X!FUNKY!STUFF!
  2007. Xecho x - TEXT
  2008. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  2009. XX
  2010. XX
  2011. XX
  2012. XX         Name
  2013. XX
  2014. XX           rm - Remove File
  2015. XX
  2016. XX         Use
  2017. XX
  2018. XX           rm (option) filename
  2019. XX
  2020. XX         Description 
  2021. XX
  2022. XX               Using the rm command you can remove unnecessary files from
  2023. XX            a directory.  The command itself is easy to use, for 
  2024. XX            example 
  2025. XX
  2026. XX                         rm foo
  2027. XX        
  2028. XX             would remove the file foo from the directory you are in if
  2029. XX             you have write permission in the directory.
  2030. XX                With the right option you can remove all files in a 
  2031. XX             directory that have certain attributes.  For example
  2032. XX
  2033. XX                         rm *.c
  2034. XX 
  2035. XX             would remove all files that end in .c in the directory
  2036. XX             which you are in.
  2037. XX
  2038. XX
  2039. XX
  2040. XX
  2041. X!FUNKY!STUFF!
  2042. Xcd ..
  2043. Xmkdir rmdir
  2044. Xcd rmdir
  2045. Xecho x - TEXT
  2046. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  2047. XX
  2048. XX
  2049. XX
  2050. XX             Name
  2051. XX 
  2052. XX               rmdir
  2053. XX
  2054. XX             Format
  2055. XX
  2056. XX               rmdir directory-name
  2057. XX
  2058. XX             Description
  2059. XX
  2060. XX                  The command rmdir removes directories by removing the
  2061. XX                links that connect the directories to the tree.  A
  2062. XX                directory, however, must first be empty before it can be
  2063. XX                removed from the tree. Please consult the help facility
  2064. XX                for more information on the rm command.
  2065. XX                   The following examples will show common use of the
  2066. XX                rmdir command.
  2067. XX
  2068. XX                             rmdir foo
  2069. XX
  2070. XX                                or
  2071. XX
  2072. XX                           rmdir foo/foo1
  2073. XX
  2074. XX                   The first example will remove the directory called
  2075. XX                 foo and the second will remove the subdirectory called
  2076. XX                 foo1.
  2077. XX
  2078. XX
  2079. X!FUNKY!STUFF!
  2080. Xcd ..
  2081. Xmkdir users
  2082. Xcd users
  2083. Xecho x - TEXT
  2084. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  2085. XXWhen you type "users" at the command prompt, the computer will respond
  2086. XXwith a list of users on the system and the computer that they are loged
  2087. XXonto.  For example:
  2088. XX
  2089. XX    % users    
  2090. XX    //magma:  root
  2091. XX    //earth:
  2092. XX    //sand:
  2093. XX    //soil:
  2094. XX    //mud:
  2095. XX    //dirt:
  2096. XX    %
  2097. XX
  2098. X!FUNKY!STUFF!
  2099. Xcd ..
  2100. Xmkdir who
  2101. Xcd who
  2102. Xecho x - TEXT
  2103. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  2104. XX"who(1)" is the command to find out who is logged on, when they
  2105. XXlogged on, and onto which machine they logged on.
  2106. XX
  2107. XX    % who
  2108. XX    sue      magma    ttym0   Sep 24 11:08
  2109. XX    bob      earth    ttym0   Sep 24 11:37
  2110. XX    root     magma    ttym6   Sep 24 11:13
  2111. XX    %
  2112. X!FUNKY!STUFF!
  2113. Xcd ..
  2114. Xmkdir write
  2115. Xcd write
  2116. Xecho x - DIR
  2117. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR
  2118. XXusers*finding someone to talk to
  2119. XXusers:users
  2120. XXwho*check for locked up
  2121. XXwho:who
  2122. X!FUNKY!STUFF!
  2123. Xecho x - TEXT
  2124. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  2125. XX"write(1)" is a command to allow two simultaneously logged on users
  2126. XXto communicate directly from their terminals (without having to "mail(1)"
  2127. XXthings back and forth).  This facility is of great use between team
  2128. XXmembers for talking over ideas.  However, it can get abusive.
  2129. XX
  2130. XXA short example is in order...
  2131. XX
  2132. XX    % write root            <------ This happens at bobs terminal
  2133. XX
  2134. XX    <while at "root"'s terminal, the following message INTERRUPTS
  2135. XX    whatever was currently on the screen>
  2136. XX
  2137. XX    <bel><bel> Message from bob on magma ttym0... Thu Sept 24 11:48:15 1987
  2138. XX
  2139. XX    <at this point, "root" must get out of whatever facility, job, vi
  2140. XX    session, etc. to get back to a shell prompt to answer the write.>
  2141. XX
  2142. XX    $ write bob            <------ Note the reverse of users
  2143. XX
  2144. XX    <back at "bob"'s terminal, a similar message is displayed>
  2145. XX
  2146. XX    <bel><bel>Message from root on dirt ttym6... Thu Sept 24 11:52:15 1987
  2147. XX
  2148. XXAt this point, both parties can type messages to each other's screen.
  2149. XXIt is suggested that you follow some sort of protocol so that you don't
  2150. XXinterrupt each other's typing.  I.E....
  2151. XX
  2152. XX    <after having received a message that "root" was online, bob
  2153. XX    SHOULD type first as the first party to interrupt>
  2154. XX
  2155. XX    Hi there root.  What's up?
  2156. XX    cts                <------ Note this stands for
  2157. XX                        clear to send
  2158. XX    <"root" now can type back to "bob">
  2159. XX
  2160. XX    Not too much...
  2161. XX    cts                <------ "root" is saying it
  2162. XX                        is ok for "bob" to
  2163. XX                        write now.
  2164. XX
  2165. XXAt the end of the conversation, both parties must type <control-D>
  2166. XXto exit this facility.  That is the "end of file" character for XENIX
  2167. X!FUNKY!STUFF!
  2168. Xmkdir users
  2169. Xcd users
  2170. Xecho x - TEXT
  2171. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  2172. XXThe "users(L)" command is one way to find out which users
  2173. XXare logged on were.  This can be used with "write" to have
  2174. XXa conversation.
  2175. X!FUNKY!STUFF!
  2176. Xcd ..
  2177. Xmkdir who
  2178. Xcd who
  2179. Xecho x - TEXT
  2180. Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT
  2181. XXThe "who(1)" command is used to find out when a person logged on.
  2182. XX
  2183. XXIF A PERSON HAS BEEN LOGGED ON FOR MORE THAN ONE DAY, DO NOT "write(1)"
  2184. XXTO THAT PERSON!
  2185. X!FUNKY!STUFF!
  2186. Xcd ..
  2187. Xcd ..
  2188. !FUNKY!STUFF!
  2189.  
  2190.  
  2191.