home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / M / MacPerl 4.13 source.sit / Perl Source ƒ / Perl / Perl.r < prev    next >
Encoding:
Text File  |  1994-05-04  |  6.9 KB  |  298 lines  |  [TEXT/MPS ]

  1. /*
  2.  *    Copyright (c) 1991-94 Tim Endres & Matthias Neeracher
  3.  *
  4.  *    You may distribute under the terms of the Perl Artistic License,
  5.  *    as specified in the README file.
  6.  *
  7.  * $Log: Perl.r,v $
  8.  * Revision 1.2  1994/05/04  02:11:47  neeri
  9.  * Version 4.1.3
  10.  *
  11.  * Revision 4.0  04Dec91 TE
  12.  * 4.0 baseline.
  13.  * 
  14.  */
  15.  
  16. #include "SysTypes.r"        /* To get system types */
  17. #include "Types.r"            /* To get general types */
  18. #include "Cmdo.r"            /* For commando interface */
  19.  
  20. #define GUSI_PREF_VERSION '0110'
  21.  
  22. #include "GUSI.r"
  23.  
  24. include "Perl.rsrc";
  25.  
  26. resource 'GU∑I' (GUSIRsrcID) {
  27.     text, mpw, noAutoSpin, useChdir, approxStat, noTCPDaemon, noUDPDaemon;
  28. };
  29.  
  30. resource 'vers' (1) {
  31.     0x04, 0x13, release, 0x00, verUS,
  32.     "4.1.3",
  33.     "Perl - ported by Matthias Neeracher and Tim Endres."
  34.     };
  35.  
  36. resource 'vers' (2) {
  37.     0x04, 0x13, release, 0x00, verUS,
  38.     "4.1.3",
  39.     "Perl 4.1.3 (02May94)"
  40.     };
  41.  
  42. resource 'DLOG' (2001)    {
  43.     {  0,   0, 150, 400},
  44.     dBoxProc,
  45.     invisible,
  46.     noGoAway,
  47.     0,
  48.     2001,
  49.     ""
  50. };
  51.  
  52. resource 'DITL' (2001)    {
  53.     {
  54.         {119,  307, 137,  387}, Button         { enabled, "B1"},
  55.         {119, 8406, 137, 8486}, Button         { enabled, "B2"},
  56.         {119, 8313, 137, 8393}, Button         { enabled, "B3"},
  57.         { 13,   23,  45,   55}, Icon            {disabled, 0    },
  58.         { 13,   78, 103,  387}, StaticText    {disabled, "Prompt"}
  59.     }
  60. };
  61.  
  62. resource 'DLOG' (2002)    {
  63.     {  0,   0, 150, 400},
  64.     dBoxProc,
  65.     invisible,
  66.     noGoAway,
  67.     0,
  68.     2002,
  69.     ""
  70. };
  71.  
  72.  
  73. resource 'DITL' (2002)    {
  74.     {
  75.         {119,  307, 137,  387}, Button         { enabled, "B1"},
  76.         {119,  214, 137,  294}, Button         { enabled, "B2"},
  77.         {119, 8313, 137, 8393}, Button         { enabled, "B3"},
  78.         { 13,   23,  45,   55}, Icon        {disabled, 2    },
  79.         { 13,   78, 103,  387}, StaticText    {disabled, "Prompt"}
  80.     }
  81. };
  82.  
  83. resource 'DLOG' (2003)    {
  84.     {  0,   0, 150, 400},
  85.     dBoxProc,
  86.     invisible,
  87.     noGoAway,
  88.     0,
  89.     2003,
  90.     ""
  91. };
  92.  
  93. resource 'DITL' (2003)    {
  94.     {
  95.         {119, 307, 137, 387}, Button         { enabled, "B1"},
  96.         {119, 214, 137, 294}, Button         { enabled, "B2"},
  97.         {119, 121, 137, 201}, Button         { enabled, "B3"},
  98.         { 13,  23,  45,  55}, Icon            {disabled, 2    },
  99.         { 13,  78, 103, 387}, StaticText    {disabled, "Prompt"}
  100.     }
  101. };
  102.  
  103. resource 'DLOG' (2010) {
  104.     {0, 0, 104, 400},
  105.     dBoxProc,
  106.     invisible,
  107.     noGoAway,
  108.     0x0,
  109.     2010,
  110.     ""
  111. };
  112.  
  113. resource 'DITL' (2010, "Ask", purgeable) {
  114.     {    
  115.         {73, 307, 91, 387}, Button             { enabled, "OK"},
  116.         {73, 214, 91, 294},    Button             { enabled, "Cancel"},
  117.         {13,  13, 31, 387},    StaticText         {disabled, "^0"},
  118.         {44,  15, 60, 385}, EditText         {disabled, ""}
  119.     }
  120. };
  121.  
  122. resource 'DLOG' (2020) {
  123.     {38, 80, 245, 427},
  124.     dBoxProc,
  125.     invisible,
  126.     noGoAway,
  127.     0x0,
  128.     2020,
  129.     ""
  130. };
  131.     
  132. resource 'DITL' (2020) {
  133.     {    
  134.         {178,  30, 198,  88},    Button         { enabled, "OK"},
  135.         {178, 258, 198, 316},    Button         { enabled, "Cancel"},
  136.         {  2,   2,  19, 373},    StaticText     {disabled, "Prompt"},
  137.         { 19,   2, 168, 345},    UserItem     {disabled}
  138.     }
  139. };
  140.  
  141. resource 'cmdo' (128) {
  142.     {
  143.         295,            /* Height of dialog */
  144.         "Perl -- Practical Extraction and Report Language\n"
  145.         "by Larry Wall <lwall@netlabs.com>",
  146.         {
  147.             Or {{-2}}, Files {
  148.                 InputFile,
  149.                 OptionalFile {
  150.                     { 17,  10,  33, 115},
  151.                     { 15, 117,  35, 195},
  152.                     "Program File:",
  153.                     "", "", "",
  154.                     "Select program file. If no files are specified and no program "
  155.                     "is given on the command line, standard input will be used.",
  156.                     dim,
  157.                     "Read Standard Input",
  158.                     "Select a script to execute…",
  159.                     "",
  160.                 },
  161.                 Additional {
  162.                     "",
  163.                     ".pl",
  164.                     "Files ending with .pl",
  165.                     "All text files",
  166.                     {text}
  167.                 }
  168.             },
  169.             Or {{-1}}, RegularEntry {
  170.                 "Program:",
  171.                 { 42,  10,  58, 115},
  172.                 { 42, 120,  58, 465},
  173.                 "",
  174.                 keepCase,
  175.                 "-e",
  176.                 "Program to execute."
  177.             },
  178.             notDependent {}, MultiFiles {
  179.                 "Input File(s)…",
  180.                 "Select input files.  If no files are specified, Perl reads from standard input.",
  181.                 { 15, 300, 35, 465},
  182.                 "Input files:",
  183.                 "",
  184.                 MultiInputFiles {
  185.                     {TEXT},
  186.                     FilterTypes,
  187.                     "Only text files",
  188.                     "All files",
  189.                 }
  190.             },
  191.             notDependent {}, Redirection {
  192.                 StandardInput,
  193.                 { 75,  20}
  194.             },
  195.             notDependent {}, Redirection {
  196.                 StandardOutput,
  197.                 {110,  20}
  198.             },
  199.             notDependent {}, Redirection {
  200.                 DiagnosticOutput,
  201.                 {145,  20}
  202.             },
  203.             notDependent {}, TextBox {
  204.                 gray,
  205.                 { 70,  10, 185, 240},
  206.                 "Redirection"
  207.             },
  208.             notDependent {}, CheckOption     {
  209.                 NotSet, { 75, 270,  91, 465}, "Print Version", "-v", 
  210.                 "Print version information to standard output.",
  211.             },
  212.             notDependent {}, CheckOption     {
  213.                 NotSet, { 92, 270, 108, 465}, "Syntax Check Only", "-c", 
  214.                 "Exit after syntax checking.",
  215.             },
  216.             notDependent {}, CheckOption     {
  217.                 NotSet, {109, 270, 125, 465}, "Print warnings", "-w", 
  218.                 "Print warnings about lots of likely errors.",
  219.             },
  220.             notDependent {}, CheckOption     {
  221.                 NotSet, {126, 270, 142, 465}, "Debug", "-d", 
  222.                 "Run Perl debugger at start.",
  223.             },
  224.             notDependent {}, CheckOption     {
  225.                 NotSet, {143, 270, 159, 465}, "Inplace processing", "-i.bak", 
  226.                 "Make backup and replace file.",
  227.             },
  228.             notDependent {}, NestedDialog    {
  229.                 2,
  230.                 {165, 270, 185, 440},
  231.                 "More Options…",
  232.                 "Lots of switches to configure the behaviour of Perl."
  233.             },
  234.             notDependent {}, VersionDialog {
  235.                 VersionString {
  236.                     "4.1.3"
  237.                 },
  238.                 "Perl by Larry Wall <lwall@netlabs.com>\n"
  239.                 "MPW port by Matthias Neeracher <neeri@iis.ee.ethz.ch>\n"
  240.                 "and Tim Endres <time@ice.com>\n",
  241.                 0
  242.             },
  243.         },
  244.         270,
  245.         "",
  246.         {
  247.             notDependent {}, RadioButtons {
  248.                 {
  249.                     { 36,  20,  51, 220}, "Newline", "", set, 
  250.                     "Records are terminated with newlines.",
  251.                     { 53,  20,  68, 220}, "Null Character", "-0", notset, 
  252.                     "Records are terminated with null characters",
  253.                     { 70,  20,  85, 220}, "Paragraph", "-00", notset, 
  254.                     "Records are terminated with two consecutive newlines"
  255.                 }
  256.             },
  257.             Or {{-3}}, CheckOption {
  258.                 NotSet, { 36, 240,  52, 465}, "Automatic Loop", "-n", 
  259.                 "Iterate script once for each input line."
  260.             },
  261.             Or {{-2}}, CheckOption {
  262.                 NotSet, { 53, 240,  69, 465}, "Automatic Printing Loop", "-p", 
  263.                 "Iterate script once for each input line, printing the line by default."
  264.             },
  265.             notDependent {}, CheckOption {
  266.                 NotSet, { 70, 240,  86, 465}, "Autosplit mode", "-a", 
  267.                 "Split input line before processing."
  268.             },
  269.             notDependent {}, CheckOption {
  270.                 NotSet, { 87, 240, 103, 465}, "Automatic Line End Processing", "-l", 
  271.                 "Chop input line and append newline on printing."
  272.             },
  273.             notDependent {}, CheckOption {
  274.                 NotSet, {115,  20, 131, 220}, "Run through C Preprocessor", "-P", 
  275.                 "Run the script through the C preprocessor first."
  276.             },
  277.             notDependent {}, CheckOption {
  278.                 NotSet, {132,  20, 148, 220}, "Switch parsing", "-s", 
  279.                 "Enables some rudimentary switch parsing."
  280.             },
  281.             notDependent {}, CheckOption {
  282.                 NotSet, {115, 240, 131, 465}, "Skip leading garbage.", "-x", 
  283.                 "Skip lines to the first #!perl line. Great for shell scripts."
  284.             },
  285.             notDependent {}, TextBox {
  286.                 gray,
  287.                 { 25,  10, 108, 225},
  288.                 "Record Separator"
  289.             },
  290.             notDependent {}, TextBox {
  291.                 gray,
  292.                 { 25, 235, 108, 470},
  293.                 "Useful for One Liners"
  294.             },
  295.         }
  296.     },
  297. };
  298.