home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / MacPerl 5.1.3 / Mac_Perl_513_src / perl5.002 / Perl.r < prev    next >
Encoding:
Text File  |  1997-01-21  |  7.2 KB  |  316 lines  |  [TEXT/MPS ]

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