home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / EDITNL.ZIP / EDITNL.PRN < prev    next >
Encoding:
Text File  |  1988-05-01  |  20.9 KB  |  595 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.                                        
  23.  
  24.  
  25.                                        
  26.  
  27.  
  28.                             EditNL -- Version 4.00                            EditNL -- Version 4.00
  29.                                        
  30.                             NODELIST Editor Program                            NODELIST Editor Program
  31.                                        
  32.                                        
  33.                                        
  34.                                        
  35.                                        
  36.                                  by Ben Baker                                 by Ben Baker
  37.                                        
  38.                                        
  39.                                        
  40.                                        
  41.                                        
  42.                                        
  43.                                        
  44.                      Copyright 1988 -- All Rights Reserved                     Copyright 1988 -- All Rights Reserved
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                                        
  74.  
  75.  
  76.                                Table of Contents
  77.  
  78.  
  79.  
  80.        1. Introduction                                                 1
  81.           1.1 Notation                                                 2
  82.  
  83.        2. EditNL Command Line                                          2
  84.           2.1 Path/File Specifiers                                     2
  85.           2.2 /OLD=<spec>                                              3
  86.           2.3 /NEW=<spec>                                              3
  87.           2.4 /EDIT=<spec>                                             3
  88.           2.5 /ARCHIVE[=<spec>]                                        3
  89.           2.6 /KILL                                                    3
  90.           2.7 /CLEAN                                                   3
  91.           2.8 /PK[=<pkxarc_alias>[,<pkarc_alias>]]                     4
  92.           2.9 Abbreviations                                            4
  93.  
  94.        3. Editing Error Detection                                      5
  95.  
  96.        4. Error Return Codes                                           5
  97.  
  98.        5. Examples                                                     6
  99.  
  100.        6. The Shareware Concept                                        7
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                         i
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.                                 1. Introduction                                1. Introduction
  143.  
  144.  
  145.        EditNL is  a program designed to edit an old nodelist with a dis-       EditNL                                                           
  146.        tributed difference file to create a new up-to-date nodelist.  If
  147.        you don't  know what  a nodelist  or a  difference file  are, you
  148.        probably don't have much use for this program.  Detailed descrip-
  149.        tions of  these files  may be  found in  a  document  file  named
  150.        FSC002-x.PRN ("x" is the release number) maintained by the Inter-
  151.        national FidoNet  Association (IFNA),  and will  not be belabored
  152.        here.
  153.  
  154.        EditNL makes the following assumptions about its input files:       EditNL                                                       
  155.  
  156.             1)   Input files are created, published and distributed
  157.                  on Friday of each week.
  158.  
  159.             2)   An input  file name  has a file extension which is
  160.                  the day-of-year of its publication.
  161.  
  162.             3)   An input  file may  be contained within an archive
  163.                  file bearing  the same  name as  the file  it con-
  164.                  tains, except  that  the  file  extension's  first
  165.                  character is an "A" instead of a digit.
  166.  
  167.             4)   Nodelist and difference files conform to the spec-
  168.                  ifications of the above mentioned IFNA document.
  169.  
  170.        These assumptions  are based  on the standard practice of several
  171.        amateur communications networks and sub-networks presently in ex-
  172.        istence.
  173.  
  174.        When executed,  EditNL will  search for  a nodelist not more than                       EditNL                                           
  175.        six weeks old to edit.  On finding it, it will search for younger
  176.        difference files  a week  at a  time until has either reached the
  177.        current week,  or cannot  find a difference file for a particular
  178.        week.   In these searches it will, if necessary, unpack archives.
  179.        Finally it  will apply  the difference  files it found to the old
  180.        nodelist to  create the newest nodelist it can.  If more that one
  181.        difference file  is involved  (as many as six are possible), they
  182.        are applied in parallel.  No intermediate lists are created.
  183.  
  184.        There are options available to tell EditNL to delete any files it                                           EditNL                       
  185.        unpacks from  archives, or  even to  delete all old files, and to
  186.        create a  distribution archive  of the  newly generated  nodelist
  187.        file.
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.        EditNL                                                     Page 2       EditNL                                                     Page 2
  203.  
  204.  
  205.        1.1 Notation       1.1 Notation
  206.  
  207.        The following  notation is used to describe EditNL's command line                                                   EditNL               
  208.        and its various parameters:
  209.  
  210.        UPPER_CASE represents fixed items.  They are entered exactly       UPPER_CASE                                                  
  211.             as shown, except that switch names may be abbreviated.
  212.  
  213.        <lower_case> items  enclosed  in  angle  brackets  represent       <lower_case>                                                
  214.             variable items.   You  substitute actual  values (eg. a
  215.             real file name) for them.
  216.  
  217.        [OPTIONAL] items are enclosed in square brackets.       [OPTIONAL]                                       
  218.  
  219.        CHOICE1 |  CHOICE2 Choices  are separated by a vertical bar.       CHOICE1 |  CHOICE2                                          
  220.             You select one or the other, not both.
  221.  
  222.  
  223.  
  224.                             2. EditNL Command Line                            2. EditNL Command Line
  225.  
  226.  
  227.        EditNL is invoked with the following command line:       EditNL                                            
  228.  
  229.             EDITNL [/OLD=<spec>] [/NEW=<spec>] [/EDIT=<spec>]            EDITNL [/OLD=<spec>] [/NEW=<spec>] [/EDIT=<spec>]
  230.                  [/ARCHIVE[=<spec>]] [/KILL | /CLEAN]                 [/ARCHIVE[=<spec>]] [/KILL | /CLEAN]
  231.                  [/PK[=<pkxarc_alias>[,<pkarc_alias>]]]                 [/PK[=<pkxarc_alias>[,<pkarc_alias>]]]
  232.  
  233.        All parameters  are optional,  and may appear in any order.  Case
  234.        is unimportant. Upper, lower or mixed case may be used.  Executed
  235.        without parameters, EditNL will create a new NODELIST.nnn from an                           EditNL                                       
  236.        old NODELIST.nnn  and NODEDIFF.nnn files found in the current di-
  237.        rectory.
  238.  
  239.        2.1 Path/File Specifiers       2.1 Path/File Specifiers
  240.  
  241.        <spec> is a path/file specifier, and is used to define a path for
  242.        a class  of files  and/or override the default name stem for that
  243.        class.  It has the following form:
  244.  
  245.             <path>[\<name_stem>.]            <path>[\<name_stem>.]
  246.                  
  247.                  or                 or
  248.  
  249.             <name_stem>.            <name_stem>.
  250.  
  251.        In the  first form,  <path> defines  a relative  or absolute path
  252.        name (see  your DOS manual for more information about path names)
  253.        of the directory where a class of files may be found.
  254.  
  255.        <name_stem> followed  by a  period (.) overrides the default name                   followed  by a  period (.)                           
  256.        stem for  a class  of files.  "Name stem" is defined here to mean
  257.        that portion  of a  file name,  exclusive of path, which precedes
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.        EditNL                                                     Page 3       EditNL                                                     Page 3
  269.  
  270.  
  271.        the period  (.) and  extension.   EditNL's default name stems are                                         EditNL                         
  272.        NODELIST and NODEDIFF.
  273.  
  274.        2.2 /OLD=<spec>       2.2 /OLD=<spec>
  275.  
  276.        The /OLD  parameter defines  path to  the directory where the old
  277.        nodelist file may be found.  It may also be used to define an al-
  278.        ternate name  stem for  the nodelist  class of files.  (There are
  279.        two ways to do this.  See /NEW.)
  280.  
  281.        2.3 /NEW=<spec>       2.3 /NEW=<spec>
  282.  
  283.        The /NEW  parameter defines  path to  the directory where the new
  284.        nodelist file  is to be placed.  It may also be used to define an
  285.        alternate name  stem for the nodelist class of files.  (There are
  286.        two ways to do this.  See /OLD.)
  287.  
  288.        Note that  only one  nodelist name  stem is used for both old and
  289.        new nodelist  files.   If /OLD  and /NEW both define <name_stem>,
  290.        only the last one is used.
  291.  
  292.        2.4 /EDIT=<spec>       2.4 /EDIT=<spec>
  293.  
  294.        The /EDIT  parameter defines path to the directory where the dif-
  295.        ference files may be found.  It may also be used to define an al-
  296.        ternate name stem for the difference class of files.
  297.  
  298.        2.5 /ARCHIVE[=<spec>]       2.5 /ARCHIVE[=<spec>]
  299.  
  300.        The /ARCHIVE  parameter tells  EditNL to  create  a  distribution                                      EditNL                            
  301.        archive containing the newly created nodelist file.  If <spec> is
  302.        given, it  defines the  directory path  where the archive will be
  303.        placed.   (NOTE: The  syntax will accept a name stem, but in this
  304.        case it  is ignored.   The plan in a subsequent version of EditNL                                                                  EditNL
  305.        is to  deal with  both list and difference archives, hence a name
  306.        stem here would be ambiguous.)
  307.  
  308.        2.6 /KILL       2.6 /KILL
  309.  
  310.        The /KILL  parameter tells  EditNL to  delete any  input files it                                   EditNL                               
  311.        created by  unpacking archives.   If a "free standing" input file
  312.        is found,  it is  not deleted,  even if  there is  an  equivalent                         not                                            
  313.        archive file available.
  314.  
  315.        2.7 /CLEAN       2.7 /CLEAN
  316.  
  317.        The /CLEAN parameter is similar to the /KILL parameter, but tells
  318.        EditNL to  "clean up  the  debris"  by  deleting  all  files  and       EditNL                                                           
  319.        archives that are no longer needed on successful completion.
  320.  
  321.        /CLEAN implies  /KILL, so  both parameters need not be specified.
  322.        This gets  a little  tricky when  a CRC  error occurs.   When the
  323.        /CLEAN parameter  is given,  unpacked files  are always  deleted.
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.        EditNL                                                     Page 4       EditNL                                                     Page 4
  335.  
  336.  
  337.        Free standing files and archives are deleted only if no error oc-                                                    only if no error oc-
  338.        curred.       curred 
  339.  
  340.        2.8 /PK[=<pkxarc_alias>[,<pkarc_alias>]]       2.8 /PK[=<pkxarc_alias>[,<pkarc_alias>]]
  341.  
  342.        EditNL deals  with archive  files by  using external utility pro-       EditNL                                                           
  343.        grams.     By  default,  it  uses  ARC  from  System  Enhancement
  344.        Associates.
  345.  
  346.        Phil Katz  has published  a pair  of utilities, PKARC for archive
  347.        creation and  updating, and  PKXARC for  archive extraction.  The
  348.        /PK parameter  instructs EditNL  to use version 3.5 of these pro-                                EditNL                                  
  349.        grams instead of ARC.  (Because command line syntax of these pro-
  350.        grams have  presented a  moving target, neither earlier nor later
  351.        versions are guaranteed to work!)
  352.  
  353.        It seems to be a common practice to rename these programs, giving
  354.        them short  one- or  two-character names, hence the /PK parameter
  355.        may optionally include alias names for these programs.  Note that
  356.        PKXARC's alias  must be  defined first,  and if both are defined,
  357.        they must  be separated  by a  comma (,).  No white space.  If an                                                  No white space.       
  358.        alias is  given for  PKARC, EditNL assumes it is because you wish                                   EditNL                               
  359.        to create  an output archive.  In this case, the /ARCHIVE parame-
  360.        ter need  only be  given if a path other than the /OUT path is to
  361.        be used.   In  other words, defining an alias for PKARC forces an
  362.        output archive to be generated.  It will go in the same directory
  363.        with the output file unless /ARCHIVE directs otherwise.
  364.  
  365.        I cannot  recommend the use of the Katz utilities, merely to save
  366.        a few seconds (faster is not necessarily better).  It has been my
  367.        experience that  they tend  to be ill behaved in a cramped memory
  368.        environment.   More than once, they have crashed DoubleDOS on me,
  369.        usually when  called from  within another  program, as  they  are
  370.        here.  However, if you insist, EditNL will support you.                                      EditNL                  
  371.  
  372.        For compatibility with earlier versions of EditNL, /X is an alias                                                  EditNL                
  373.        for, and may be used interchangeably with /PK.
  374.  
  375.        2.9 Abbreviations       2.9 Abbreviations
  376.  
  377.        All parameters  may be  abbreviated.   Since they all have unique
  378.        initial letters, they may be abbreviated to as few as one charac-
  379.        ter.   Longer representations of the parameter names will be rec-
  380.        ognized, but  only if correctly spelled.  In other words, any ab-
  381.        breviation of  one of EditNL's parameters must be a proper prefix                             EditNL              must be a proper prefix
  382.        of that parameter's name.       of that parameter's name.
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.        EditNL                                                     Page 5       EditNL                                                     Page 5
  401.  
  402.  
  403.                           3. Editing Error Detection                          3. Editing Error Detection
  404.  
  405.  
  406.        The first  line of  every difference file is an exact copy of the
  407.        first line  of the  old nodelist  file used to generate it.  As a
  408.        first level  confidence check,  EditNL compares  these lines.  If                                       EditNL                           
  409.        they do  not compare exactly, the assumption is that the old file
  410.        EditNL is  using is  not the  old file  MakeNL used to create the       EditNL               not                MakeNL                   
  411.        difference file.   In  that event, EditNL generates a fatal error                                          EditNL                        
  412.        and terminates without creating a new nodelist file.
  413.  
  414.        The first  line of  every nodelist file contains a 5-digit number
  415.        which is  the decimal representation of a cyclic redundancy check
  416.        word (CRC)  generated by  that file.  EditNL accumulates a CRC on                                             EditNL                     
  417.        the output file as it is produced.  If the generated CRC does not
  418.        match the one in the first line of the file, a warning message is
  419.        issued and  another is appended to the output file.  Earlier ver-
  420.        sions of  EditNL treated a CRC error as fatal, but experience has                 EditNL                                                 
  421.        shown that  bad CRC's are frequently program errors, not data er-
  422.        rors.   However, a CRC error message is cause for concern.  If an
  423.        input file has been edited, the generated file could contain ser-
  424.        ious errors.   You  should satisfy  yourself that this is not the
  425.        case before  using any  file with  a bad  CRC.   If there  is any                          any                                           
  426.        doubt, obtain a copy of the full nodelist.
  427.  
  428.  
  429.  
  430.                              4. Error Return Codes                             4. Error Return Codes
  431.  
  432.  
  433.        On termination, EditNL sets the ERRORLEVEL return code, which can                       EditNL                                           
  434.        then be  tested in  a batch  file.  (See your DOS manual for more
  435.        information on ERRORLEVEL return codes.)
  436.  
  437.        These are the codes and their meanings:
  438.  
  439.             0    A new nodelist was successfully created.
  440.             1    A CRC error was reported.  Investigate before using the
  441.                       output file.
  442.             2    A fatal error occurred.  No list created.
  443.           255    Command line error.  Displays help screen.
  444.  
  445.        There are  four kinds of fatal error.  The confidence check error
  446.        mentioned in  the previous section; an inconsistency in a differ-
  447.        ence file (edit command not found when expected, or an unexpected
  448.        EOF); I/O errors while opening, reading or writing files; and er-
  449.        ror return codes from an archive utility program.
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.        EditNL                                                     Page 6       EditNL                                                     Page 6
  467.  
  468.  
  469.                                   5. Examples                                  5. Examples
  470.  
  471.  
  472.        Update NODELIST.001  with NODEDIFF.008 and NODEDIFF.015 to create
  473.        NODELIST.015.  All files are in the current directory:
  474.  
  475.             EDITNL            EDITNL
  476.  
  477.        
  478.  
  479.        As above,  but difference  files are in archives in the directory
  480.        MAILFILE.  Don't keep files unpacked from the archives:
  481.  
  482.             EDITNL /E=MAILFILE /K            EDITNL /E=MAILFILE /K
  483.  
  484.        
  485.  
  486.        As above,  but create  an output  NODELIST.A15 in  the  directory
  487.        DOWNLOAD and  delete all  old files.   (will  not delete files in
  488.        DOWNLOAD):
  489.  
  490.             EDITNL /E=MAILFILE /A=DOWNLOAD /C            EDITNL /E=MAILFILE /A=DOWNLOAD /C
  491.  
  492.        
  493.  
  494.        As above, but file stems are ANETLIST and ANETDIFF.  Use the Katz
  495.        archive utilities:
  496.  
  497.             EDITNL /N=ANETLIST. /E=MAILFILE\ANETDIFF. /A=DOWNLOAD /C /PK            EDITNL /N=ANETLIST. /E=MAILFILE\ANETDIFF. /A=DOWNLOAD /C /PK
  498.  
  499.             
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.        EditNL                                                     Page 7       EditNL                                                     Page 7
  533.  
  534.  
  535.                            6. The Shareware Concept                           6. The Shareware Concept
  536.  
  537.  
  538.        EditNL is  distributed under  the "shareware" concept.  It may be       EditNL                                                           
  539.        freely copied  and distributed provided the program and its docu-
  540.        mentation are distributed as a unit.  But EditNL is NOT FREE.                                                 EditNL    NOT FREE 
  541.  
  542.        If you are a non-commercial user of EditNL, you are asked to sup-                                           EditNL                       
  543.        port its  development and  maintenance both with your suggestions
  544.        and bug  reports and with your dollars.  No particular fee is set
  545.        for non-commercial use.  Let your conscience be your guide.
  546.  
  547.        Commercial users, and users participating in a commercial network
  548.        are required  to pay a license fee of twenty five (25) U. S. dol-
  549.        lars for each computer on which EditNL is installed for use.                                       EditNL                      
  550.  
  551.        The Coordinator  of a commercial network may obtain a network li-
  552.        cense for  a one-time  fee of  $1,500 US.   This will license all
  553.        current and  future nodes  of the  network for the use of EditNL.                                                                 EditNL 
  554.        MakeNL and  EditNL may be licensed as a set for a one-time fee of       MakeNL      EditNL                                               
  555.        $2,250.
  556.  
  557.        Please address all correspondence to:
  558.  
  559.                    Ben Baker
  560.                    Baker's Acre
  561.                    RR 1, Box 637
  562.                    E. Alton, IL 62024
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.