home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / util / editor / gnuid16.sit / indent-1.6 / Indent.r < prev    next >
Encoding:
Text File  |  1992-10-23  |  11.2 KB  |  422 lines

  1. #include "Cmdo.r"            /* For commando interface */
  2. #include "SysTypes.r"
  3.  
  4. resource 'vers' (1) {
  5.     0x01, 0x60, final, 0x00, verUS,
  6.     "1.6r1",
  7.     "GNU Indent - v1.6r1 ported by R. Avanzi & J. Kowalski."
  8.     };
  9.     
  10. resource 'vers' (2) {
  11.     0x01, 0x60, final, 0x00, verUS,
  12.     "1.6r1",
  13.     "GNU Indent for MPW."
  14.     };
  15.  
  16.  
  17. resource 'cmdo' (128) {
  18.     {    /* array dialogs: 3 elements */
  19.         /* [1] */
  20.         300,
  21.         "The indent program changes the appearance of a C program by inserting or deleting whitespace. It can be used to make code easier to read. It can also convert from one style of coding to another.",
  22.         {    /* array itemArray: 16 elements */
  23.             /* [1] */
  24.             NotDependent {
  25.  
  26.             },
  27.             VersionDialog {
  28.                 VersionString {
  29.                     "v1.6r1"
  30.                 },
  31.                 "GNU indent for MPW v1.6r1. Based on Berkeley indent 5.11 (9/15/88).\nMPW Tool (v1.1) courtesy Jeffrey Kowalski (jeff@oak.cadif.cornell.edu).\nv1.6 (and 1.4) ported by Roberto Avanzi (gandalf@sabrina.dei.unipd.it) (10/22/92).",
  32.                 noDialog
  33.             },
  34.             /* [2] */
  35.             NotDependent {
  36.  
  37.             },
  38.             RadioButtons {
  39.                 {    /* array radioArray: 2 elements */
  40.                     /* [1] */
  41.                     {20, 10, 35, 142}, "File to indent...", "", Set, "Input a file.  Standard input is not used in this case.",
  42.                     /* [2] */
  43.                     {20, 213, 35, 353}, "Redirect Standard", "-st", NotSet, "If the standard input file is used, then an input file is not allowed.  The converted file is always written to standard output."
  44.                 }
  45.             },
  46.             /* [3] */
  47.             Or {
  48.                 {
  49.                     (1<<12)+2
  50.                 }
  51.             },
  52.             Files {
  53.                 InputFile,
  54.                 RequiredFile {
  55.                     {36, 30, 55, 200},
  56.                     "Specify input file",
  57.                     "",
  58.                     "Source file to indent"
  59.                 },
  60.                 Additional {
  61.                     "",    ".c",    "Only files that end in .c",    "All text files",
  62.                     {    /* array TypesArray: 1 elements */
  63.                         /* [1] */
  64.                         text
  65.                     }
  66.                 }
  67.             },
  68.             /* [4] */
  69.             Or {
  70.                 {
  71.                     (1<<12)+2
  72.                 }
  73.             },
  74.             Files {
  75.                 InputOrOutputFile,
  76.                 OptionalFile {
  77.                     {60, 30, 76, 200},
  78.                     {76, 30, 95, 200},
  79.                     "Destination",
  80.                     "",
  81.                     "-o",
  82.                     "",
  83.                     "Destination of indented file.",
  84.                     dim,
  85.                     "Replace original (keep a backup)",
  86.                     "Select a file...",
  87.                     ""
  88.                 },
  89.                 Additional {
  90.                     "",    ".c",    "Only files that end in .c",    "All text files",
  91.                     {    /* array TypesArray: 1 elements */
  92.                         /* [1] */
  93.                         text
  94.                     }
  95.                 }
  96.             },
  97.             /* [5] */
  98.             Or {
  99.                 {
  100.                     (2<<12)+2
  101.                 }
  102.             },
  103.             Redirection {
  104.                 StandardInput,        {20, 353}
  105.             },
  106.             /* [6] */
  107.             Or {
  108.                 {
  109.                     (2<<12)+2
  110.                 }
  111.             },
  112.             Redirection {
  113.                 StandardOutput,        {59, 353}
  114.             },
  115.             /* [7] */
  116.             NotDependent {
  117.  
  118.             },
  119.             Redirection {
  120.                 DiagnosticOutput,    {98, 353}
  121.             },
  122.             /* [8] */
  123.             NotDependent {
  124.  
  125.             },
  126.             CheckOption {
  127.                 NotSet,    {122, 25, 140, 79},    "GNU",    "-gnu",
  128.                 "Use GNU-style conventions for indentation.  Equivalent to:\n"
  129.                 "-nbad -nbap -nbbb -nbc -bl -bli2 -c33 -cd33 -ncdb -nce -cli0 -cp1 -di0 -nfc1 -nfca -i2 -ip5 -lp -pcs -psl -nsc -nsob -nss -ts8"
  130.             },
  131.             /* [9] */
  132.             NotDependent {
  133.  
  134.             },
  135.             CheckOption {
  136.                 NotSet,    {122, 79, 140, 133},    "K&R",    " -kr",
  137.                 "Use Kernighan & Ritchie style conventions for indentation.  Equivalent to:\n"
  138.                 "-nbad -bap -nbbb -nbc -br -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -d0 -di1 -nfc1 -nfca -i4 -ip0 -l75 -lp -npcs -npsl -nsc -nsob -nss -ts8"
  139.             },
  140.             /* [10] */
  141.             NotDependent {
  142.  
  143.             },
  144.             CheckOption {
  145.                 NotSet,    {122, 134, 140, 188},    "UCB",    " -orig",
  146.                 "Use original Berkeley style conventions for indentation. Equivalent to:\n"
  147.                 "-nbap -nbad -nbbb -bc -br -c33 -cd33 -cdb -ce -ci4 -cli0 -cp33 -d4 -di16 -fc1 -fca -i4 -ip4 -l75 -lp -npcs -psl -sc -nsob -nss -ts8"
  148.             },
  149.             /* [11] */
  150.             NotDependent {
  151.  
  152.             },
  153.  
  154.             TextBox {
  155.                 gray,    {115, 20, 145, 195},    "Common Styles"
  156.             },
  157.             /* [12] */
  158.             NotDependent {
  159.  
  160.             },
  161.             RadioButtons {
  162.                 {    /* array radioArray: 3 elements */
  163.                     /* [1] */
  164.                     {162, 25, 180, 95}, "Default", "", Set, "Verbosity as described in the .indent.pro file.",
  165.                     /* [2] */
  166.                     {162, 95, 180, 135}, "On", "-v", NotSet, "Show verbose messages about source code. Overrides any -nv flag in the indent.pro file.",
  167.                     /* [3] */
  168.                     {162, 135, 180, 175}, "Off", "-nv", NotSet, "Show no verbose messages about source. Overrides any -v flag in the indent.pro file."
  169.                 }
  170.             },
  171.             /* [13] */
  172.             NotDependent {
  173.  
  174.             },
  175.             TextBox {
  176.                 gray,    {155, 20, 185, 195},    "Verbosity"
  177.             },
  178.             /* [4] */
  179.             NotDependent {
  180.  
  181.             },
  182.             CheckOption {
  183.                 NotSet,    {125, 213, 145, 320},    "Troff output",    "-troff",    "Format the program to be compatible with troff."
  184.             },
  185.             /* [14] */
  186.             NotDependent {
  187.  
  188.             },
  189.             CheckOption {
  190.                 NotSet,    {145, 213, 165, 320},    "Show version",    "-version",    "Show the indent program's version information."
  191.             },
  192.             /* [15] */
  193.             NotDependent {
  194.  
  195.             },
  196.             CheckOption {
  197.                 NotSet,    {165, 213, 185, 320},    "No profile",    "-npro",    "Do not read information from the indent.pro file."
  198.             },
  199.             /* [16] */
  200.             NotDependent {
  201.  
  202.             },
  203.             NestedDialog {
  204.                 2, {165, 353, 185, 466}, "More options...", "Even more esoteric options for the indent program."
  205.             },
  206.             /* [17] */
  207.             NotDependent {
  208.  
  209.             },
  210.             NestedDialog {
  211.                 3, {142, 353, 162, 466}, "Parameters...", "Variables that let you control indent's spacing."
  212.             }
  213.         },
  214.         /* [2] */
  215.         313,
  216.         "All these options, if explicitly set or unset, will override any settings from the indent.pro file.",
  217.         {    /* array itemArray: 7 elements */
  218.             /* [1] */
  219.             NotDependent {
  220.  
  221.             },
  222.             TriStateButtons {
  223.                 "",
  224.                 {    /* array threeStateArray: 3 elements */
  225.                     /* [1] */
  226.                     {25, 25, 41, 155}, "declarations", "-nbad", "", "-bad", "Force a blank line after every block of declarations.",
  227.                     /* [2] */
  228.                     {41, 25, 57, 155}, "proc bodies", "-nbap", "", "-bap", "Force a blank line after every procedure body.",
  229.                     /* [3] */
  230.                     {57, 25, 73, 155}, "block comments", "-nbbb", "", "-bbb", "Force a blank line before every block comment."
  231.                 }
  232.             },
  233.             NotDependent {
  234.  
  235.             },
  236.             CheckOption {
  237.                 NotSet, {73, 24, 89, 155}, "sizeof operators", "-bs", "Put a space between sizeof and its argument."
  238.             },
  239.             /* [2] */
  240.             NotDependent {
  241.  
  242.             },
  243.             TextBox {
  244.                 gray,    {20, 20, 91, 160},    "Blanks after..."
  245.             },
  246.             /* [3] */
  247.             NotDependent {
  248.  
  249.             },
  250.             RadioButtons {
  251.                 {    /* array radioArray: 3 elements */
  252.                     /* [1] */
  253.                     {114, 25, 130, 175}, "go on next line", "-bl", NotSet, "Put braces on line after if, etc.",
  254.                     /* [2] */
  255.                     {130, 25, 146, 175}, "go on same line", "-br", NotSet, "Put braces on line with if, etc.",
  256.                     /* [3] */
  257.                     {146, 25, 162, 175}, "remain unmoved", "", Set, "Leave braces after if, etc. as they are."
  258.                 }
  259.             },
  260.             /* [5] */
  261.             NotDependent {
  262.  
  263.             },
  264.             TextBox {
  265.                 gray,    {107, 20, 164, 180},    "Braces following if..."
  266.             },
  267.             /* [6] */
  268.             NotDependent {
  269.  
  270.             },
  271.             TriStateButtons {
  272.                 "",
  273.                 {    /* array threeStateArray: 10 elements */
  274.                     /* [1] */
  275.                     {21, 194, 36, 456}, "Comment delimiters on blank line", "-ncdb", "", "-cdb", "Put comment delimiters (/* and */) on blank lines.",
  276.                     /* [2] */
  277.                     {36, 194, 51, 456}, "Cuddle else", "-nce", "", "-ce", "Cuddle else and preceeding closing brace, as\n} else",
  278.                     /* [3] */
  279.                     {51, 194, 66, 456}, "Space after cast operator", "-ncs", "", "-cs", "Put a space after a cast operator.",
  280.                     /* [4] */
  281.                     {66, 194, 81, 456}, "Format comment in first column", "-nfc1", "", "-fc1", "Format comments appearing in the first column.",
  282.                     /* [5] */
  283.                     {81, 194, 96, 456}, "Enable comment formatting", "-nfca", "", "-fca", "Do not disable all formatting of comments.",
  284.                     /* [6] */
  285.                     {96, 194, 114, 456}, "Line up continuation at parentheses", "-nlp", "", "-lp", "Line up continued lines at parentheses.",
  286.                     /* [7] */
  287.                     {111, 194, 126, 456}, "Space after function in calls", "-npcs", "", "-pcs", "Put a space after the function in function calls.",
  288.                     /* [8] */
  289.                     {126, 194, 141, 456}, "Procedure type on previous line", "-npsl", "", "-psl", "Put the type of a procedure on the line before its name.",
  290.                     /* [9] */
  291.                     {141, 194, 156, 456}, "Put asterisk to left of comment", "-nsc", "", "-sc", "Put the * character at the left of comments.",
  292.                     /* [10] */
  293.                     {156, 194, 171, 456}, "Swallow optional blanks", "-nsob", "", "-sob", "Swallow optional blank lines.",
  294.                     /* [11] */
  295.                     {171, 194, 186, 456}, "Newline after comma in declarations", "-nbc", "", "-bc", "Force newline after comma in declarations.",
  296.                     /* [12] */
  297.                     {186, 194, 201, 456}, "Space before special semicolons", "-nss" , "", "-ss", "On one-line for and switch statements, force a blank before the semicolon."
  298.                 }
  299.             },
  300.             /* [7] */
  301.             NotDependent {
  302.  
  303.             },
  304.             TextBox {
  305.                 gray,    {15, 189, 204, 462},    "Miscellaneous Options"
  306.             }
  307.         },
  308.         /* [3] */
  309.         297,
  310.         "These parameters are for changing the level of whitespace in the output code.",
  311.         {    /* array itemArray: 10 elements */
  312.             /* [1] */
  313.             NotDependent {
  314.  
  315.             },
  316.             RegularEntry {
  317.                 "Comments beside code ╔",    {32, 33, 48, 213}, {32, 216, 48, 236},
  318.                 "33",    keepCase,    "-c",    "Put comments to the right of code in the indicated column."
  319.             },
  320.             /* [2] */
  321.             NotDependent {
  322.  
  323.             },
  324.             RegularEntry {
  325.                 "╔ beside declarations ╔",    {56, 33, 72, 213}, {56, 216, 72, 236},
  326.                 "33",    keepCase,    "-cd",    "Put comments to the right of declarations in the indicated column."
  327.             },
  328.             /* [3] */
  329.             NotDependent {
  330.             
  331.             },
  332.             RegularEntry {
  333.                 "╔ and after #else and #endif.",    {80 , 33, 96, 240 }, {80 , 243, 96, 263 },
  334.                 "33",    keepCase,    "-cp",    "Put comments to the right of #else and #endif statements in the indicated column."
  335.             },
  336.             /* [4] */
  337.             NotDependent {
  338.  
  339.             },
  340.             RegularEntry {
  341.                 "Other comments",    {104, 33, 120, 147}, {104, 149, 120, 169},
  342.                 "4",    keepCase,    "-d",    "Set the indentation of comments not to the right of code to the indicated amount of spaces."
  343.             },
  344.             /* [5] */
  345.             NotDependent {
  346.  
  347.             },
  348.             RegularEntry {
  349.                 "Variable names",    {128, 33, 144, 147}, {128, 149, 144, 169},
  350.                 "16",    keepCase,    "-di",    "Put variable names in the indicated column."
  351.             },
  352.             /* [6] */
  353.             NotDependent {
  354.  
  355.             },
  356.             TextBox {
  357.                 gray,    {20, 20, 154, 276},    "Column alignments for..."
  358.             },
  359.  
  360.             /* [7] */
  361.             NotDependent {
  362.  
  363.             },
  364.             RegularEntry {
  365.                 "Increment",    {32, 303, 48, 379}, {32, 382, 48, 404},
  366.                 "4",    keepCase,    "-i",    "Set the indentation level to the indicated amount of spaces."
  367.             },
  368.             /* [8] */
  369.             NotDependent {
  370.  
  371.             },
  372.             RegularEntry {
  373.                 "Continuation", {56, 303, 72, 393}, {56, 396, 72, 418},
  374.                 "4",    keepCase,    "-ci",    "Continuation indent of the indicated amount of spaces."
  375.             },
  376.             /* [9] */
  377.             NotDependent {
  378.  
  379.             },
  380.             RegularEntry {
  381.                 "Case labels",    {80, 303, 96, 387}, {80, 390, 96, 412},
  382.                 "0",    keepCase,    "-cli",    "Case label indent of the indicated amount of spaces."
  383.             },
  384.             /* [10] */
  385.             NotDependent {
  386.  
  387.             },
  388.             RegularEntry {
  389.                 "Braces",        {104, 303, 120, 353}, {104, 356, 120, 378},
  390.                 "0",    keepCase,    "-bli",    "Indent braces of the indicated amount of spaces."
  391.             },
  392.  
  393.             /* [11] */
  394.             NotDependent {
  395.  
  396.             },
  397.             TextBox {
  398.                 gray,    {20, 288, 130, 459},    "Indentation levels"
  399.             },
  400.             /* [9] */
  401.             NotDependent {
  402.  
  403.             },
  404.             RegularEntry {
  405.                 "Indent for types on function parameters",    {163, 48, 179, 324},    {163, 327, 179, 347},
  406.                 "4",    keepCase,    "-ip",
  407.                 "Indent parameter types in old-style function definitions by the indicated amount of spaces."
  408.             },
  409.             /* [10] */
  410.             NotDependent {
  411.  
  412.             },
  413.             RegularEntry {
  414.                 "Maximum line length",    {140, 287, 156, 432},    {140, 433, 156, 456},
  415.                 "75",    keepCase,    "-l",
  416.                 "Set maximum line length to the indicated amount of characters."
  417.             }
  418.         }
  419.     }
  420. };
  421.  
  422.