home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / p / pb920430.zip / PBSELDOC.TXT < prev    next >
Text File  |  1992-04-28  |  55KB  |  1,748 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                  ____________________                                 PB Select Equations.                                 ____________________                                 PB Select Equations.                                 ____________________                                 PB Select Equations.
  9.  
  10.  
  11.  
  12.  
  13.           Contents.          Contents.          Contents.
  14.  
  15.               Contents.............................................1
  16.           1   Introduction.........................................2
  17.           2  What Are Select Equations?............................2
  18.           3  Writing Select Equations - Part 1.....................3
  19.               The Equation Syntax..................................4
  20.               Example Select Equation Creation.....................6
  21.           4  Writing Select Equations - Part 2.....................8
  22.               The Equation Syntax..................................8
  23.               Constant Substitution................................9
  24.           5  Reading Select Equations..............................12
  25.           6  Reference Section.....................................13
  26.               Equation Syntax Summary..............................13
  27.               Parser Directives....................................15
  28.               PFH Item Values......................................17
  29.               Parser Error Messages................................18
  30.               PB Default Select Equations..........................19
  31.               Example Select Equations.............................20
  32.               Address for problems and comments....................21
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.           1   Introduction.          1   Introduction.          1   Introduction.
  40.  
  41.           The Pacsat Broadcast Protocol (PBP)  defines what a Pacsat File
  42.           Header (PFH) is and how it is used to handle messages aboard a
  43.           Pacsat File Server. The PFH contains information fields written
  44.           mostly by the sender of the message. The PFH is used by receiving
  45.           stations to generate a directory of server files, from which the
  46.           appropriate files can be downloaded. The contents of the PFH is
  47.           clearly important in getting a message from its source to its
  48.           destination.
  49.  
  50.           Most users of a Pacsat server use the most widespread
  51.           implementation of the PBP, the program PB, written by G0K8KA. The
  52.           program allows users to receive a directory from the server,
  53.           showing which files are currently stored, and then to request a
  54.           file from the directory. The server deals with each user's request
  55.           in turn, sending the actual file contents. The broadcast nature of
  56.           sending data in this way means that users will automatically
  57.           collect messages of  general interest (if they wish), but a message
  58.           must be requested by its intended recipient to ensure its
  59.           reception.
  60.  
  61.           The increasing number of files carried by servers and the
  62.           increasing level of automation of groundstations demands that files
  63.           should be reliably selected and also requested as efficiently as
  64.           possible.  The select equation mechanism is designed to improve
  65.           both the efficiency and the automation of message selection and
  66.           hence transfer.
  67.  
  68.  
  69.  
  70.  
  71.           2  What Are Select Equations?          2  What Are Select Equations?          2  What Are Select Equations?
  72.  
  73.           (In describing what select equations are, the next paragraph
  74.           briefly reviews what the PFH is for.)
  75.  
  76.           The PFH is the Pacsat File Header, a block of data at the beginning
  77.           of every file kept on the server. It contains items of information
  78.           about the file such as its name, length, data checksums and so on,
  79.           which are used by the server and other routing computers to ensure
  80.           correct handling of the file. Other items contain information such
  81.           as the callsigns of the sender and intended recipient, the subject
  82.           of the file and keywords describing its contents. Those items are
  83.           used to ensure that users of the server can see that the file is
  84.           intended for them or that it may be interesting to them.
  85.  
  86.           Select equations are used to search through the directory for files
  87.           which the user could be interested in.  An 'equation' is simply a
  88.           list of tests which a PFH must pass before its file is selected. A
  89.           select equation specifies which PFH items to test and what they
  90.           should be. Select equations can be used to filter the directory
  91.           display or to automatically mark files for downloading.
  92.  
  93.           To filter the directory display, each PFH in the directory is
  94.           compared with the equation and those that match can be displayed.
  95.           The download equations test each PFH and automatically select files
  96.  
  97.  
  98.                                                                             2
  99.  
  100.  
  101.  
  102.  
  103.  
  104.           to download, leaving the user free to 'browse' though the directory
  105.           manually.
  106.  
  107.           The program PB already uses select equations in the directory view
  108.           screen where the user can select a subset of files to see by
  109.           choosing a function key. Each key is associated with a different
  110.           subset of files described by a select equation, but these equations
  111.           are built into the program.
  112.  
  113.           PB has now been extended to allow users to create their own
  114.           equations.
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.                                                                             3
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.           3  Writing Select Equations - Part 1.          3  Writing Select Equations - Part 1.          3  Writing Select Equations - Part 1.
  172.  
  173.           A select equation can be as simple or as complex as required. To
  174.           get an idea of what the equations can look like, see the examples
  175.           below. For a concise list of features see the reference guide. This
  176.           section explains how select equations are written and includes a
  177.           syntax definition, explanations of what each term means and lists
  178.           of all terms and symbols recognised.
  179.  
  180.           Select equations are kept in a file called the equation file which
  181.           is read by PB when it starts up. It is an ASCII text file and can
  182.           be created using any text editor.  The equation file can contain up
  183.           to fifteen equations: twelve are associated with the function keys
  184.           and the other three are called download equations because they
  185.           control the automatic download selections. Not all equations need
  186.           be defined and it is possible to begin experimenting with only one
  187.           equation in the file. The file may contain comments on lines which
  188.           begin with a ';' as in the PB configuration file.
  189.  
  190.           Each equation may all be on one line or spread over several lines
  191.           and may be indented or separated by any number of spaces, tabs,
  192.           newlines, etc. Any layout which does not change the meaning of any
  193.           part of the equation is acceptable to the equation parser. Its
  194.           layout should make it as readable as possible, just as in (most)
  195.           programming languages.
  196.  
  197.  
  198.           Some Example Select Equations.
  199.  
  200.                ( F1 (destination = foobar)  )
  201.  
  202.                ( F2 (destination = ALL) and (title = image) )
  203.  
  204.                ( F3
  205.                     (
  206.                          (destination = ALL)
  207.                          or
  208.                          (destination = mycall)
  209.                     )
  210.                     and (file_type != 1)
  211.                     and (file_type != 2)
  212.                )
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.                                                                             4
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.           The Equation Syntax.          The Equation Syntax.          The Equation Syntax.
  238.  
  239.  
  240.           All equations are surrounded by brackets: an open bracket to start
  241.           and a close bracket to finish. Between the brackets there must be
  242.           the equation 'name' and the equation itself.
  243.  
  244.           This rule is written formally like this:
  245.  
  246.                '('  NAME   EQUATION  ')'
  247.  
  248.  
  249.           Here NAME should be replaced by one of the 15 possible equation
  250.           names and EQUATION should be replaced by a list of tests. The
  251.           brackets should be used as shown but without the quote marks.
  252.  
  253.           The equation name should be chosen from:
  254.  
  255.                F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 auto priority never
  256.  
  257.  
  258.           The twelve function key names are for the equations which filter
  259.           the directory display. The remaining three are to define a set of
  260.           equations which control the automatic downloading of files.  PB
  261.           will check every incoming PFH if it matches these equations and act
  262.           accordingly. If the PFH matches one of the equations 'priority' or
  263.           'auto', the file will be marked for automatic downloading. If the
  264.           PFH matches the equation 'never', it will never be downloaded or
  265.           'grabbed'.
  266.  
  267.           One important feature to note is the order in which an incoming PFH
  268.           is tested with each equation. The PFH begins with the default
  269.           download status 'grab'. First the 'never' equation is tested
  270.           followed by the 'priority' and 'auto' equations. If a PFH were to
  271.           match both the 'never' and the 'auto' equations, for example, it
  272.           would still be downloaded. This is so that the 'never' equation may
  273.           be coarse and exclude many files which are then selectively
  274.           included by the 'auto' equation.
  275.  
  276.  
  277.           The syntax for EQUATION can in turn be described formally like
  278.           this:
  279.  
  280.                TEST  {  COMBINATION   TEST  }
  281.  
  282.  
  283.           Here TEST should be replaced by a single test clause and
  284.           COMBINATION should be replaced by one of the combination operators
  285.           which combine the result of two tests. The curly brackets indicate
  286.           that what they enclose can be repeated any number of times,
  287.           including zero.
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.                                                                             5
  297.  
  298.  
  299.  
  300.  
  301.  
  302.           The syntax definition above means that it is possible to have just
  303.           one test, but as soon as more tests are used, they should be joined
  304.           together with combination operators.
  305.  
  306.           The combination operators are:
  307.  
  308.                and  &  &&          or  |  ||
  309.  
  310.  
  311.           There are actually only two types: the 'and' type and the 'or' type
  312.           - the other symbols grouped with them are alternatives, supplied to
  313.           allow users to write equations which are either concise or
  314.           readable. There are alternatives for other symbols recognised by
  315.           the select equation parser, intended to make writing select
  316.           equations easier.
  317.  
  318.  
  319.           Now we come to the syntax of the TEST clause itself:
  320.  
  321.                '('  PFH_ITEM    COMPARISON    CONSTANT  ')'
  322.  
  323.  
  324.           Here PFH_ITEM should be replaced by the name of the PFH item which
  325.           is being tested, COMPARISON should be replaced by one of the
  326.           comparison operators and finally CONSTANT should be replaced with
  327.           the actual value that the PFH item is to be compared with.
  328.  
  329.           The COMPARISON operators are:
  330.  
  331.                Symbol   Meaning
  332.  
  333.                =        equals
  334.                ==       equals
  335.                !=       not equal
  336.                <>       not equal
  337.                >        greater than
  338.                <        less than
  339.                >=       greater or equal
  340.                <=       less than or equal
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.                                                                             6
  363.  
  364.  
  365.  
  366.  
  367.  
  368.           The PFH_ITEM name can be chosen from the following list:
  369.  
  370.            PFH ITEM                  Type    Description
  371.  
  372.            file_number               number  server internal file
  373.                                              number
  374.            file_name                 string  server internal file name
  375.            file_ext                  string  server internal file
  376.                                              extension
  377.            file_size                 number  file length in bytes
  378.            create_time               time    time when file first
  379.                                              created
  380.            last_modified_time        time    time file last modified,
  381.                                              e.g. SEU
  382.            seu_flag                  number  flag set if SEU detected
  383.            file_type                 number  code describing file
  384.                                              type*
  385.            source                    string  callsign of sending
  386.                                              station
  387.            ax25_uploader             string  callsign of uplink
  388.                                              station
  389.            upload_time               time    time when file uploaded
  390.            download_count            number  number of acknowledged
  391.                                              downloads
  392.            expire_time               time    time when file is deleted
  393.                                              from server
  394.            precedence                number  arbitrary message urgency
  395.                                              classifier
  396.            compression_type          number  code describing
  397.                                              compression type*
  398.            bbs_message_type          charac  coded char. used by BBS
  399.                                      ter     operators
  400.            bulletin_id_number        string  unique name used by BBS
  401.                                              operators
  402.            title                     string  arbitrary message title
  403.            keywords                  string  words describing message
  404.                                              contents
  405.            file_description          string  extended description of
  406.                                              file type
  407.            compression_description   string  extended description of
  408.                                              compression
  409.            user_file_name            string  original filename used by
  410.                                              sender
  411.  
  412.                *These items have several agreed values which are listed in
  413.           the reference guide.
  414.  
  415.           There is a fuller description of each item and what it is used for
  416.           in the PBP documentation, but in practice the select equations must
  417.           test those PFH items actually used by sending stations.
  418.  
  419.           The final term left to be defined is CONSTANT. The constant can be
  420.           a string, a character, a time or a number. The type should match
  421.           that of the PFH item being tested, as indicated in the list above.
  422.           A constant is any sequence of characters excluding space, tab and
  423.           newline and also excluding any characters from any of the operators
  424.           and the brackets. If a string constant must include any of the
  425.  
  426.  
  427.  
  428.                                                                             7
  429.  
  430.  
  431.  
  432.  
  433.  
  434.           forbidden characters it should be enclosed in double quotes. Here
  435.           are some examples of valid constants:
  436.  
  437.                foo  BAR  Fly2High  42  10%   *PB*   "frog(s)"   "Seeing*s?"
  438.  
  439.           All constants are basically string constants, except that character
  440.           constants should be just one character long. Number constants
  441.           should contain numeric characters, although the constant may be a
  442.           hexadecimal number if it begins with '0x' (zero x). String
  443.           constants may also contain the wildcard characters '?' and '*'. The
  444.           wildcard '?' will match any single character and the wildcard '*'
  445.           will match any number of any character. Time constants should also
  446.           be numbers and may be hex numbers.
  447.  
  448.           The term CONSTANT is described in more detail in the section
  449.           Writing Select Equations (2). The extended description also covers
  450.           special time symbols which represent time numbers and other
  451.           facilities for creating time values.
  452.  
  453.  
  454.  
  455.           Example Select Equation Creation.          Example Select Equation Creation.          Example Select Equation Creation.
  456.  
  457.           The preceding explanation of the select equation syntax is now
  458.           explained by way of an example. The starting point is at the end of
  459.           the syntax definition, with the TEST clause.
  460.  
  461.           Suppose the equation should match any file addressed to the
  462.           callsign 'foobar'. The PFH item to test is clearly 'destination'.
  463.           Its type is string, so the constant must be a string constant.  The
  464.           callsign might be used as part of an address string, so wildcard
  465.           characters are used to search for an occurrence of the callsign
  466.           anywhere in the PFH item.
  467.  
  468.                PFH_ITEM       destination
  469.                COMPARISON          =
  470.                CONSTANT       *foobar*
  471.  
  472.           The TEST clause can now be assembled:
  473.  
  474.                ( destination = *foobar* )
  475.  
  476.           There is only one test in this equation, so there is no COMBINATION
  477.           operator required and the TEST clause becomes the EQUATION.
  478.  
  479.           The EQUATION is assembled into a complete definition with the
  480.           chosen equation NAME 'F1'.
  481.  
  482.                The first complete select equation, assigned to function key
  483.           1.
  484.  
  485.                ( F1  ( destination = *foobar* ) )
  486.  
  487.  
  488.           More complex equations such as those in the examples can be built
  489.           up following the same procedure. The next stage is to add a second
  490.           TEST clause and to combine the two TESTs with one of the
  491.  
  492.  
  493.  
  494.                                                                             8
  495.  
  496.  
  497.  
  498.  
  499.  
  500.           COMBINATION operators 'and' or 'or'. The derivation will look
  501.           something like this:
  502.  
  503.  
  504.           The first TEST is taken from the previous example:
  505.  
  506.                PFH_ITEM       destination
  507.                COMPARISON          =
  508.                CONSTANT       *foobar*
  509.  
  510.                TEST           ( destination = *foobar* )
  511.  
  512.  
  513.           Now a second TEST is added:
  514.  
  515.                PFH_ITEM       keywords
  516.                COMPARISON          =
  517.                CONSTANT       *news*
  518.  
  519.                TEST           ( keywords = *news* )
  520.  
  521.  
  522.  
  523.           The two tests can be combined with a COMBINATION operator:
  524.  
  525.                COMBINATION    and
  526.  
  527.                EQUATION       (destination=*foobar*) and (keywords=*news*)
  528.  
  529.                NAME           F2
  530.  
  531.  
  532.                (F2 (destination = *foobar*) and (keywords = *news*) )
  533.  
  534.                The second complete select equation, assigned to function key
  535.           2.
  536.  
  537.  
  538.  
  539.           The features described in this section, together with the above
  540.           examples should be enough to create almost all the select equations
  541.           required. There are further facilities for forming more complex (
  542.           and powerful) equations but they can be used as and when required.
  543.           The next section covers the extra facilities and will give an idea
  544.           of what is available, but it need not be understood to get the
  545.           equations above working.
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.                                                                             9
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.           4  Writing Select Equations - Part 2.          4  Writing Select Equations - Part 2.          4  Writing Select Equations - Part 2.
  568.  
  569.           In Part 1,  the basic syntax for defining the equations was
  570.           explained. Some facilities were omitted for clarity and are
  571.           described here in full.
  572.  
  573.  
  574.           The Equation Syntax.          The Equation Syntax.          The Equation Syntax.
  575.  
  576.  
  577.           The syntax for the full definition was stated as: '('   NAME
  578.           EQUATION   ')'
  579.  
  580.           A  more accurate  definition is this:   '('   NAME    [ KEYTITLE ]
  581.           [ MASKS ]    EQUATION   ')'
  582.  
  583.  
  584.           Here the terms NAME and EQUATION are known and remain as before.
  585.           The two extra terms are optional (denoted by the square brackets)
  586.           which is why they could be omitted from earlier explanations. The
  587.           first, KEYTITLE is used to assign a title string with a function
  588.           key definition, just like in the default equations which PB now
  589.           uses.
  590.  
  591.           The syntax for a KEYTITLE is:      CONSTANT   'keytitle'
  592.  
  593.           Here CONSTANT is replaced by any string and the command 'keytitle'
  594.           is used as shown without the quotes.  Note that the actual title
  595.           goes before the command. The result is that the string is displayed
  596.           on the message line of the display each time the function key is
  597.           chosen. This is useful for reminding the user of what the selection
  598.           represents, useful now that this can be easily changed.
  599.  
  600.           An example:
  601.  
  602.                ( F1 "This is F1" keytitle [EQUATION] )
  603.  
  604.  
  605.           Here EQUATION has been written to represent the actual select
  606.           equation. Note that if a keytitle is given, then the equation is
  607.           optional. If the equation is absent then it will always match all
  608.           files.
  609.  
  610.  
  611.           The other term in the full definition is MASKS,  it is optional and
  612.           is used to modify the result of the equation. The equation can only
  613.           be used to test PFH items but the MASKS can be used to test the
  614.           download status of each file. If an equation contains any MASKS
  615.           then it will only match files which satisfy both the select
  616.           equation and which have any of the download status flags named in
  617.           MASKS.
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.                                                                            10
  627.  
  628.  
  629.  
  630.  
  631.  
  632.           The MASKS can be one or more of the following:
  633.  
  634.                MASKS           Description
  635.  
  636.                maskdone        Files completely downloaded
  637.                maskauto        Files requested for auto
  638.                                download
  639.                maskpriority    Files requested for priority
  640.                                download
  641.                masknever       Files marked to never download
  642.  
  643.  
  644.           An example:
  645.  
  646.                (F1 Requests keytitle maskauto maskpriority [EQUATION] )
  647.  
  648.           Again EQUATION is optional when MASKS are used and if it is absent
  649.           it will match all files.
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.                                                                            11
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.           Constant Substitution.          Constant Substitution.          Constant Substitution.
  700.  
  701.           In part 1, the term CONSTANT was defined to be a sequence of
  702.           characters which formed a number or string, which is a
  703.           simplification of the true definition. The formal definition of
  704.           CONSTANT is rather complicated and would not show its
  705.           possibilities. There are several features which can be used
  706.           independently or combined to form a CONSTANT:
  707.  
  708.                1  constant can be specified explicitly as defined already
  709.                2  constants can come from configuration variables
  710.                3  constants can come from environment variables
  711.                4  constants can come from day/time values
  712.                5  constants can come from an arithmetic expression containing
  713.           other constants
  714.                6 constants can come from 'unit conversion' expressions
  715.  
  716.           Wherever the term CONSTANT has been used in formal syntax
  717.           definitions, any of the above alternatives are valid. Each
  718.           alternative is now explained in more detail.
  719.  
  720.           1.  Explicit constants
  721.  
  722.           These are what was described as a constant before and refers to a
  723.           sequence of valid characters to form a number or a string.
  724.  
  725.           2.  Configuration variable substitution.
  726.  
  727.           The configuration file contains settings for variables such as
  728.           'mycall' and 'alias' which are used by PB to identify the user's
  729.           callsign. These variables may be referred to in the select
  730.           equations where a CONSTANT term is expected. Any occurrence of the
  731.           string 'mycall' is replaced with the string used in the
  732.           configuration file. The purpose of this is to be able to exchange
  733.           equations more easily with other users without having to change
  734.           callsigns in many different places. Similarly the variable 'alias'
  735.           (or 'myaddr') may be used and will be replaced by the 'alias'
  736.           string in the config file.
  737.  
  738.           An example:
  739.  
  740.           (F1 mycall keytitle (destination=mycall) or (destination=alias))
  741.  
  742.  
  743.           3.  Environment variable substitution.
  744.  
  745.           It is possible to use the contents of environment variables as
  746.           CONSTANTs in select equations. The syntax can be described formally
  747.           as:
  748.                               VARIABLE   'getenvar'
  749.  
  750.           Here VARIABLE is replaced with the name of an environment variable
  751.           to be searched for and 'getenvar' is used as shown. If the variable
  752.           can be found its value is used to replace the above expression and
  753.           form a CONSTANT. If it cannot be found an empty string is used.
  754.  
  755.  
  756.  
  757.  
  758.                                                                            12
  759.  
  760.  
  761.  
  762.  
  763.  
  764.           An example:
  765.  
  766.           (F1 Local keytitle  (destination = COUNTRY getenvar) )
  767.  
  768.           In this example the environment variable 'COUNTRY' (DOS variables
  769.           are always in upper case) could contain a callsign prefix with
  770.           wildcard, such as 'G*' or 'P*' and the equation would match
  771.           callsigns of a certain country. This substitution can be used so
  772.           that the user need not alter the equation (possibly in several
  773.           places) and setting the environment variable could be done by a
  774.           program or batch file.
  775.  
  776.           4.  Day and time values.
  777.  
  778.           Most computers keep track of the date and time by counting the
  779.           number of seconds since an agreed 'epoch' or beginning. Any given
  780.           number specifies both a date and time and is therefore called a
  781.           'datime'. The server uses datimes and hence so do the select
  782.           equations. The PFH items which are of type 'time' are just a number
  783.           representing a datime. PFH datime items are tested by comparing
  784.           them with a CONSTANT which could be given as a number in either
  785.           decimal or hex form. However, PFH datimes are most likely to be
  786.           involved in tests which are relative to 'today', such as finding
  787.           files which were sent today or yesterday, for example. If the
  788.           constant used the actual number, then it would need to be altered
  789.           every day. For this reason there is a constant called 'today' which
  790.           is recognised by the equation parser and automatically replaced by
  791.           the appropriate number of seconds. In this way, the equation need
  792.           not be altered and will always work.
  793.  
  794.           An example:
  795.  
  796.                (F1 "Fresh Today" keytitle (upload_time >= today) )
  797.  
  798.           The constant 'today' is replaced by the datime value of midnight
  799.           this morning. Its usefulness in select equations is also greatly
  800.           enhanced by the facilities which are explained in the next section.
  801.  
  802.  
  803.           5.  Arithmetic expressions.
  804.  
  805.           This enhancement to the term CONSTANT introduces the ability to use
  806.           constants in arithmetic expressions which are evaluated to form a
  807.           final value used in the comparison.
  808.  
  809.           The syntax for such an expression is:
  810.  
  811.                CONSTANT   {  ADDSUB    CONSTANT  }
  812.  
  813.           Here the term CONSTANT can mean an explicit constant as defined
  814.           previously but any of the constant substitution mechanisms may be
  815.           used. The term ADDSUB is replaced by one of these symbols:
  816.  
  817.                     +  -
  818.  
  819.           The curly brackets indicate that any number of constants may be
  820.           added or subtracted. A sequence of addition or subtraction is
  821.  
  822.  
  823.  
  824.                                                                            13
  825.  
  826.  
  827.  
  828.  
  829.  
  830.           evaluated from right to left but the evaluation order may be
  831.           controlled using round brackets, just as in ordinary arithmetic.
  832.  
  833.           An example:
  834.  
  835.                ( F1 bigfiles keytitle (file_size > (32767 - 42 + 3) ))
  836.  
  837.           The expression inside the innermost brackets will be evaluated to a
  838.           constant 32722 before being compared with the PFH item 'file_size'.
  839.           The above example is not very useful, it simply demonstrates the
  840.           idea of adding and subtracting constants.
  841.  
  842.           A more complicated example:
  843.  
  844.                ( never (file_size > (MAX_FILE_SIZE getenvar - 1024) ))
  845.  
  846.           The order in which terms are evaluated is important to get the
  847.           correct result. The constant substitutions such as 'today' take
  848.           priority and some use the term immediately before the substitution
  849.           command, such as 'getenvar'. Then the arithmetic operations are
  850.           performed from right to left but brackets can control the exact
  851.           order.
  852.  
  853.  
  854.  
  855.           6.  Unit Conversions.
  856.  
  857.           This is a form of constant substitution designed to enhance
  858.           expressions involving datimes. The value of 'today' can be modified
  859.           by simply subtracting or adding another number. For example, to
  860.           test for files uploaded yesterday, the number of seconds in a day
  861.           (86400) can be subtracted.
  862.  
  863.           An example:
  864.  
  865.           (F1 "yesterday & today" keytitle (upload_time >= today - 86400) )
  866.  
  867.           This demonstrates how different datimes can be created from the one
  868.           substitution 'today'. This technique is enhanced by a number of
  869.           'unit conversion' substitutions which convert one number into
  870.           another, such as days into seconds. The above example could be
  871.           written as:
  872.  
  873.           (F1 "yesterday & today" keytitle (upload_time >= today - 1 day) )
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.                                                                            14
  891.  
  892.  
  893.  
  894.  
  895.  
  896.           Here the term 'day' takes the number before it (1) and converts
  897.           this number of days into a number of seconds. The result is then
  898.           substituted back into the equation for the test. The conversions
  899.           recognised are:
  900.  
  901.                minutes  multiplies by 60
  902.                hours    multiplies by 60*60
  903.                days     multiplies by
  904.                         60*60*24
  905.                weeks    multiplies by
  906.                         60*60*24*7
  907.  
  908.           These terms are recognised with or without their last 's'.
  909.  
  910.           The conversions may be used in conjunction with other
  911.           substitutions, as in this example:
  912.  
  913.           (F1 "3 days" keytitle
  914.                (upload_time >= today - OLDEST getenvar days)
  915.                and
  916.                (upload_time <= today - (OLDEST getenvar + 3) days)
  917.           )
  918.  
  919.  
  920.           Here the bracketing is important to ensure that the number of days
  921.           subtracted from 'today' is the sum of 3 and value of the
  922.           environment variable OLDEST.
  923.  
  924.           This is perhaps the most complex form of substitution used to
  925.           arrive at a single constant and these facilities should cover the
  926.           search requirements of most users.
  927.  
  928.           Two more examples:
  929.  
  930.                (F1 "Last week" keytitle (upload_time >= today - 1 week) )
  931.  
  932.                (F1 "This morning" keytitle
  933.                   (upload_time >= today) and (upload_time < today + 12 hours)
  934.                )
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.                                                                            15
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.           5  Reading Select Equations.          5  Reading Select Equations.          5  Reading Select Equations.
  964.  
  965.  
  966.  
  967.           Changes to PB Configuration File.
  968.  
  969.           The select equations are defined in an ASCII file called the
  970.           equation file.  The configuration file for PB should contain the
  971.           following line to identify the equation file:
  972.  
  973.                select pb.eqn
  974.  
  975.           Here 'pb.eqn' is the filename of the example file supplied with PB.
  976.           Any other filename may be specified for PB to read the equations
  977.           from. A filename must be specified - there is no default filename.
  978.           If the whole line is absent, PB will not read the equation file and
  979.           it will use the default set of built-in equations. The equations
  980.           which are used for the defaults are listed in the reference
  981.           section.
  982.  
  983.  
  984.           Error messages.
  985.  
  986.           The parser checks the input select equation when the equation file
  987.           is read by PB when it starts. If the parser reaches the end of the
  988.           equations file without any errors it prints the message:
  989.  
  990.                select: OK
  991.  
  992.           in the list of messages which appear when PB reads its
  993.           configuration file. If an error is detected, the parser will print
  994.           out which equation it was processing at the time, an error message,
  995.           the contents of the line which caused the error and at which line
  996.           of the file the line is from. There is a list of error messages and
  997.           potential problems in the reference section.
  998.  
  999.  
  1000.  
  1001.           Default Directory View.
  1002.  
  1003.           One of the equations can be chosen to automatically filter the
  1004.           directory display when going into directory view mode. This is done
  1005.           by adding the following line in the configuration file:
  1006.  
  1007.                defaultsel F4
  1008.  
  1009.           The word following 'defaultsel' can be any of the equation names
  1010.           used to define the select equations. If the name is recognised the
  1011.           following message is printed:
  1012.  
  1013.                defaultsel: OK
  1014.  
  1015.           If the default selection fails, then the equation associated with
  1016.           'F1' is used.
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.                                                                            16
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.           6  Reference Section.          6  Reference Section.          6  Reference Section.
  1030.  
  1031.           This section covers the complete equation syntax definitions, a
  1032.           list of terms with explanations, a list of error messages with
  1033.           potential problem causes.
  1034.  
  1035.  
  1036.  
  1037.           Equation Syntax Summary.          Equation Syntax Summary.          Equation Syntax Summary.
  1038.  
  1039.           The syntax for defining select equations is usually best understood
  1040.           from the examples but here the formal grammar is given for
  1041.           reference. The grammar may appear to be a mixture of infix and
  1042.           postfix*. This is because the definition specifies the equation
  1043.           itself in infix form with infix sub-expressions but it also has
  1044.           extra features which are implemented in postfix.  The postfix
  1045.           commands are those which operate on the item (or expression)
  1046.           immediately before them. All the postfix commands currently
  1047.           implemented are unary operators (they operate on one item).
  1048.  
  1049.           The syntax definitions here may sometimes appear to contradict
  1050.           those used in earlier explanations. In such cases the syntax used
  1051.           before was a simplification and the form given here is correct.
  1052.  
  1053.           The words in upper case are syntactical terms defined in the
  1054.           grammar, items in single quotes are literals (they should be used
  1055.           as shown but without the quotes), square brackets enclose an
  1056.           optional term, curly brackets denote repetition and vertical bars
  1057.           denote alternatives.
  1058.  
  1059.  
  1060.           *The terms 'infix' and 'postfix' refer to two types of grammar. In
  1061.           an infix grammar an operator is placed between the items it
  1062.           operates on, such as '( a + b )'. In a postfix grammar the operator
  1063.           follows the items it operates on, for example '( a b +)'. More
  1064.           information on grammatical terms and practices can be found in most
  1065.           programming textbooks. The ideas of postfix programming in
  1066.           particular are used in programming languages such as FORTH.
  1067.  
  1068.  
  1069.  
  1070.           SELECT_EQUATION:         Defines an equation or directive.
  1071.  
  1072.                '('  NAME   EQUATION  ')'       |
  1073.                '('  NAME   KEYTITLE  [EQUATION]  ')'       |
  1074.                '('  NAME   MASKS  [EQUATION]  ')'       |
  1075.                '('  NAME   KEYTITLE   MASKS  [EQUATION]  ')'     |
  1076.                '('  [{ DIRECTIVE }]  ')'
  1077.  
  1078.  
  1079.           NAME:                    Specifies which function key to associate
  1080.           with the equation.
  1081.  
  1082.                'F1'  |  'F2'  |  'F3'  |  'F4'  |  'F5'  |  'F6'  |  'F7'  |
  1083.           'F8'  |  'F9'  |  'F10  |  'F11'  |  'F12'  |
  1084.                'auto'  |  'priority'  |  'never'
  1085.  
  1086.  
  1087.  
  1088.                                                                            17
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.           MASKS:              Specifies download status flags to search for.
  1096.  
  1097.                'maskauto'  |  'maskpriority'  |  'masknever'  |  'maskdone'
  1098.           |  CONSTANT  'extramask'
  1099.  
  1100.  
  1101.           KEYTITLE:           Associates a textual title with a function key.
  1102.  
  1103.                CONSTANT  'keytitle'
  1104.  
  1105.  
  1106.           EQUATION:           An expression for a select equation.
  1107.  
  1108.                TEST {  COMBINATION  TEST  }
  1109.  
  1110.  
  1111.           TEST:                    An infix test of a PFH item.
  1112.  
  1113.                '('   PFH_ITEM   COMPARISON   CONSTANT  ')'
  1114.  
  1115.  
  1116.           COMBINATION:        An infix operator for combining tests.
  1117.  
  1118.                'and'  |  '&'  |  '&&'  |
  1119.                'or'  |  '|'  |  '||'
  1120.  
  1121.  
  1122.           COMPARISON:         An infix operator for making comparisons.
  1123.  
  1124.                '='  |  '=='  |
  1125.                ' !='  |  '<>'  |
  1126.                '>'  |  '<'  |  '>='  |  '<='
  1127.  
  1128.  
  1129.           PFH_ITEM:           The names of PFH items which can be tested.
  1130.  
  1131.                'file_number' | 'file_name' | 'file_ext' | 'file_size' |
  1132.           'create_time'  |
  1133.                'last_modified_time' | 'seu_flag' | 'file_type'  | 'source' |
  1134.           'ax25_uploader'  |
  1135.                'upload_time' | 'download_count'  | 'expire_time' |
  1136.           'precedence' |
  1137.                'compression_type' | 'bbs_message_type' | 'bulletin_id_number'
  1138.           | 'title'  |
  1139.                'keywords' | 'file_description' | 'compression_description' |
  1140.           'user_file_name'
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.                                                                            18
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.           DIRECTIVE:               A postfix parser directive command.
  1161.  
  1162.                (A directive is a command which overrides the normal operation
  1163.           of the parser. It should only be used when   necessary and with
  1164.           full knowledge of the consequences.)
  1165.  
  1166.                CONSTANT  'debug'  |
  1167.                CONSTANT  'equationsize'  |
  1168.                CONSTANT  'asctime'  |
  1169.                'keypress'
  1170.  
  1171.  
  1172.           CONSTANT:           An infix expression which is evaluated to a
  1173.           constant.
  1174.  
  1175.                VALUE   { MODIFIER }  {  ADDSUB  VALUE   { MODIFIER }  }
  1176.  
  1177.  
  1178.           VALUE:              An actual value or a substitution value.
  1179.  
  1180.                SYMBOL  |  METASYMBOL
  1181.  
  1182.  
  1183.           MODIFIER:           A postfix unary operator.
  1184.  
  1185.                'minute'  |  'minutes'  |
  1186.                'hour'  |  'hours'  |
  1187.                'day'  |  'days'  |
  1188.                'week'  |  'weeks'  |
  1189.                'getenvar'
  1190.  
  1191.  
  1192.  
  1193.           ADDSUB:             An infix binary operator.
  1194.  
  1195.                '+'  |  '-'
  1196.  
  1197.  
  1198.  
  1199.           METASYMBOL:         A special symbol which is replaced by its
  1200.           actual value.
  1201.  
  1202.                'mycall'  |  'myaddr'  |  'alias'  |  'today'
  1203.  
  1204.  
  1205.  
  1206.           SYMBOL:
  1207.  
  1208.           A symbol is a sequence of at least one character, up to the maximum
  1209.           number of characters allowed in a symbol (currently 32) excluding
  1210.           the following:
  1211.  
  1212.                ( ! " & - + = < > | )
  1213.  
  1214.           The above characters may be included if the whole symbol is
  1215.           enclosed in double quotes ". Symbols may represent strings or
  1216.           numbers. Numbers may be in decimal or in hex if they begin with
  1217.  
  1218.  
  1219.  
  1220.                                                                            19
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.           '0x' (zero x). The string matching wildcard characters are '*' and
  1227.           '?' and these characters will always be expanded.
  1228.  
  1229.  
  1230.           This concludes the formal syntax definition of a select equation.
  1231.  
  1232.           Note that symbol constants (strings) can be added like values
  1233.           (numbers), but not subtracted.
  1234.  
  1235.  
  1236.           Parser Directives.          Parser Directives.          Parser Directives.
  1237.  
  1238.           Directives are used to alter the normal behaviour of the equation
  1239.           parser and should only be used with understanding. The following
  1240.           directive facilities are implemented:
  1241.  
  1242.           1  Debug.
  1243.  
  1244.           This is of little value to the user, but shows the equation parser
  1245.           going through its various passes. The parameter used by debug (the
  1246.           CONSTANT which precedes it) turns debugging information on if it is
  1247.           '1' and off if it is '0'. When debugging is on, it stays on until
  1248.           turned off. An example:
  1249.  
  1250.                ( 1 debug )
  1251.                ...
  1252.                ( 0 debug )
  1253.  
  1254.  
  1255.           2  Select Equation size.
  1256.  
  1257.           This affects how much memory is allocated to each select equation.
  1258.           The input text is of unlimited length, the postfix buffer which
  1259.           fills up during the first pass of the parser has a fixed length of
  1260.           1k which cannot be altered. A copy of the postfix buffer is made
  1261.           for the appropriate equation but of the exact size. The select
  1262.           equation is formed during the second pass and uses a fixed size
  1263.           buffer. The size is set to 300 bytes but this can be altered using
  1264.           the directive. It should only be used for two reasons.
  1265.  
  1266.           Firstly if there is not enough memory for a normal size buffer a
  1267.           message will say so. The size of the buffer may then be decreased
  1268.           until it fits. Note that the buffer size will change after the
  1269.           point in the equation file where the directive is used so for
  1270.           maximum effect it should be used before any equations are defined.
  1271.  
  1272.           The second reason for using the directive may be caused by the
  1273.           first: when the select buffer is too small for the equation
  1274.           currently being parsed an error message will state the problem. In
  1275.           this case it is necessary to in crease the size of the select
  1276.           buffers. If there is plenty of memory the directive may go at the
  1277.           beginning of the file, in which case all equations will be given a
  1278.           bigger select buffer, or it may go immediately before the equation
  1279.           which caused the error message.
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.                                                                            20
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.           The directive takes one parameter (as a CONSTANT immediately before
  1293.           it). An example:
  1294.  
  1295.                (50 equationsize)
  1296.           ... short equations in here
  1297.                (500 equationsize)
  1298.           ... long equation in here
  1299.                (100 equationsize)
  1300.           ... back to average length
  1301.  
  1302.  
  1303.           3  Asctime.
  1304.  
  1305.           This directive is useful when creating select equations which
  1306.           involve datimes because a CONSTANT which is derived from an
  1307.           expression involving METASYMBOLS or other CONSTANTs can be verified
  1308.           as being the anticipated datime by putting 'asctime' after the
  1309.           expression. The time will be converted into a readable form and
  1310.           printed. This will only happen during the second pass of the
  1311.           parser, such as when the definitions are read in from the equation
  1312.           file. The position of the printed text can vary and will probably
  1313.           disturb other screen printing. This feature should only be used for
  1314.           testing select equation definitions. An example:
  1315.  
  1316.                ( today + 10 hours + 30 minutes asctime )
  1317.  
  1318.  
  1319.           4 Keypress.
  1320.  
  1321.           This directive is very much like the one above, in that it is used
  1322.           to test select equation definitions being created. The effect of
  1323.           'keypress' is that it will pause the program until the user presses
  1324.           return. This happens when an error is detected in the equation file
  1325.           but can be deliberately used at any point in the equation file to
  1326.           trace the parser's progress. An example:
  1327.  
  1328.                ( 0x679795200 asctime keypress )
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.                                                                            21
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.           PFH Item Values.          PFH Item Values.          PFH Item Values.
  1360.  
  1361.  
  1362.           The PFH items 'file_type' and 'compression_type'  have agreed
  1363.           values and when creating pacsat file headers or select equations to
  1364.           search them, the following tables should be observed.
  1365.  
  1366.  
  1367.           1   File Type.
  1368.  
  1369.           (Please note that the numbering scheme used for file_type has been
  1370.           revised and this list supersedes any earlier documentation.)
  1371.  
  1372.                File    Description
  1373.                Type
  1374.                0       ASCII uncompressed for display or
  1375.                        printing
  1376.                1       RLI/MBL single message
  1377.                2       RLI/MBI multiple message
  1378.                6       MS/PC-DOS .exe
  1379.                7       MS/PC-DOS .com
  1380.                8       Keplerian Elements in NASA format
  1381.                9       Keplerian Elements in AMSAT format
  1382.                200     UoSAT OBC Task Parameter File.
  1383.                201     UoSAT 'A' Log.
  1384.                202     UoSAT 'B' Log.
  1385.                203     UoSAT 'WOD' data.
  1386.                204     UoSAT 'ADCS' data.
  1387.                205     UoSAT 'TDE' data.
  1388.                206     UoSAT 'SCTE' data.
  1389.                207     UoSAT 'CCD' data (not images).
  1390.                208     UoSAT 'ELT' Log.
  1391.                209     UoSAT 'CP' Log.
  1392.                210     UoSAT 'BCS' data.
  1393.                211     UoSAT 'CCD' Images.
  1394.                255     Escape - none of the above. Extra
  1395.                        description follows.
  1396.  
  1397.  
  1398.  
  1399.           2   Compression Type.
  1400.  
  1401.                Code    Description
  1402.  
  1403.                0       Not compressed
  1404.                1       PKARC
  1405.                2       PKZIP
  1406.                255     Escape - none of the above. Extra
  1407.                        description follows.
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.                                                                            22
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.           Parser Error Messages.          Parser Error Messages.          Parser Error Messages.
  1426.  
  1427.           Here is a list of error messages which are likely to come out of
  1428.           the parser and some possible causes.
  1429.  
  1430.           "Stack Underflow"
  1431.           A symbol was expected on the stack which was empty. The most likely
  1432.           cause is forgetting to supply a parameter to an operator but can
  1433.           also be caused by forgetting to bracket an expression.
  1434.  
  1435.           "Stack Overflow"
  1436.           A symbol was pushed onto the stack when it was full.  The equation
  1437.           is probably too big.
  1438.  
  1439.           "Constant '...' type mismatch"
  1440.           A numeric constant was expected where a string constant was
  1441.           expected or vice-versa.
  1442.  
  1443.           "Bad length code on '...'"  or "Bad type code on '...'"
  1444.           These are internal errors which should not occur. If they do,
  1445.           please advise UoSAT.
  1446.  
  1447.           "PFH item expected for '...'"
  1448.           A PFH item was expected but the symbol printed in the message was
  1449.           not recognised as a PFH item.
  1450.  
  1451.           "Press return to continue..."
  1452.           An error causes this message and pauses the program, allowing the
  1453.           message to be read.  Also, the directive 'keypress' can been used
  1454.           to pause the parser at this point. Press return to continue.
  1455.  
  1456.           "Equation redefinition error"
  1457.           The equation name used for the current definition has already been
  1458.           used for another equation.
  1459.  
  1460.           "Empty equation definition"
  1461.           A definition did not comply with its syntax, namely that if an
  1462.           equation name is given then one or more of the three items
  1463.           KEYTITLE, MASKS or EQUATION must be defined.
  1464.  
  1465.           "Memory allocation error (... bytes for pfx buffer)"
  1466.           Not enough memory is available for a copy of the postfix definition
  1467.           of the equation.  More memory must be freed from somewhere or other
  1468.           equations must be shortened.
  1469.  
  1470.           "Memory allocation error (... bytes for eqn buffer)"
  1471.           Not enough memory is available for the select equation buffer.
  1472.           More memory must be freed from somewhere, other equations must be
  1473.           shortened or the select equation size variable must be adjusted
  1474.           using the directive 'equationsize'.
  1475.  
  1476.           "Select equation exceeds ... bytes"
  1477.           The select equation buffer is too small for the current definition.
  1478.           Either the equation must be shortened or the select buffer size
  1479.           must be increased using the directive 'equationsize'.
  1480.  
  1481.           "Unevaluated symbols remaining on stack: ..."
  1482.  
  1483.  
  1484.                                                                            23
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.           An equation definition did not leave the stack empty, indicating
  1491.           that one of the operators or modifiers used in the definition was
  1492.           not recognised or that a spurious symbol was placed on the stack.
  1493.           The symbol shown after the message is usually the cause of the
  1494.           error.
  1495.  
  1496.           "Unmatched close bracket."
  1497.           A close bracket was found which had no matching open bracket. Check
  1498.           brackets in the definition.
  1499.  
  1500.           "Unexpected character '...' in symbol '...'"
  1501.           A sequence of characters in the input did not form a proper symbol.
  1502.           The message indicates which character was unexpected and the line
  1503.           on which it was found. If the whole equation is on one line, it
  1504.           should be split into several lines to allow the error message to be
  1505.           more useful.
  1506.  
  1507.           "Can't open file '...'"  The equation file named in the
  1508.           configuration file for PB could not be opened. Check the path.
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.                                                                            24
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.           PB Default Select Equations.          PB Default Select Equations.          PB Default Select Equations.
  1558.  
  1559.           (F1 everything keytitle (file_type != 2))
  1560.  
  1561.           (F2 mycall keytitle
  1562.             (destination=(*+mycall+*))|(destination=(*+alias+*))
  1563.           )
  1564.  
  1565.           (F3 Bulletins keytitle (destination=*ALL*))
  1566.  
  1567.           (F4 Logs keytitle (file_type > 200)&(file_type != 255))
  1568.  
  1569.           (F5 Done keytitle maskdone)
  1570.  
  1571.           (F6 Requested keytitle maskauto maskpriority)
  1572.  
  1573.           (F7 Keps keytitle (file_type=8)|(file_type=9))
  1574.  
  1575.           (F8 Images keytitle (file_type=211)|(keywords=*IMAGE*))
  1576.  
  1577.           (F9 NEWS keytitle (keywords=*NEWS*))
  1578.  
  1579.           (F10 PB/PG keytitle (keywords=*PB*)|(keywords=*PG*))
  1580.  
  1581.           (F11 BBS keytitle (file_type=1)|(file_type=2))
  1582.  
  1583.           (F12 Urgent keytitle (precedence>0))
  1584.  
  1585.           (auto (destination=*ALL*)&(file_size<10000))
  1586.  
  1587.           (priority (destination=(*+mycall+*))|(destination=(*+alias+*)))
  1588.  
  1589.           ; 'never' not defined. Nothing is blocked.
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.                                                                            25
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.           Example Select Equations.          Example Select Equations.          Example Select Equations.
  1624.  
  1625.           The examples listed here are mostly from elsewhere in the
  1626.           documentation.
  1627.  
  1628.           ( F1 (destination = foobar)  )
  1629.  
  1630.           ( F2 (destination = ALL) and (title = image) )
  1631.  
  1632.           ( F3
  1633.                (
  1634.                     (destination = ALL)
  1635.                     or
  1636.                     (destination = mycall)
  1637.                )
  1638.                and (file_type != 1)
  1639.                and (file_type != 2)
  1640.           )
  1641.  
  1642.           (F1  ( destination = *foobar* ) )
  1643.  
  1644.           (F1 (destination = *foobar*) and (keywords = *news*) )
  1645.  
  1646.           (F1 mycall keytitle (destination = mycall) or (destination = alias))
  1647.  
  1648.           (F1 Local keytitle  (destination = COUNTRY getenvar) )
  1649.  
  1650.           (F1 "Fresh Today" keytitle (upload_time >= today) )
  1651.  
  1652.           (F1 bigfiles keytitle (file_size > (32767 - 42 + 3) ) )
  1653.  
  1654.           ( never (file_size > (MAX_FILE_SIZE getenvar - 1024) ) )
  1655.  
  1656.           (F1 "yesterday & today" keytitle (upload_time >= today - 86400) )
  1657.  
  1658.           (F1 "yesterday & today" keytitle (upload_time >= today - 1 day) )
  1659.  
  1660.           (F1 "3 days" keytitle
  1661.                (upload_time >= today - OLDEST getenvar days)
  1662.                and
  1663.                (upload_time <= today - (OLDEST getenvar + 3) days)
  1664.           )
  1665.  
  1666.           (F1 "Last week" keytitle (upload_time >= today - 1 week) )
  1667.  
  1668.           (F1 "This morning" keytitle
  1669.              (upload_time >= today) and (upload_time < today + 12 hours)
  1670.           )
  1671.  
  1672.           (F1 User keytitle (destination = (*+USERNAME getenvar+*)))
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.                                                                            26
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.           Address for problems and comments.          Address for problems and comments.          Address for problems and comments.
  1690.  
  1691.  
  1692.           Marcel Losekoot,
  1693.  
  1694.           G1NBR @ UOSAT5  or G1NBR @ GB3UP.gbr.eu  or
  1695.  
  1696.           UoSAT Unit,  University of Surrey
  1697.           Guildford,  SURREY  GU2 5XH
  1698.           UK
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.                                                                            27