• Robert Sprowson's avatar
    Add path manipulation commands AppPath, RemPath, PrepPath · 695b533e
    Robert Sprowson authored
    This triplet of commands allows obey files and similar to 'edit' path variables
    such that they don't grow ever longer each time the obey file is run, and to
    ensure it is possible to get the priority of elements on the path as desired.
    
    Removed a malloc/free from *SafeLogon; the other commands all assume one OSCLI
    buffer of space is available on the stack and use an automatic variable.
    695b533e
header 7.56 KB
; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
;     http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;

#include "VersionNum"

title-string: BootCommands

help-string: Boot_Commands Module_MajorVersion_CMHG Module_MinorVersion_CMHG

date-string: Module_Date_CMHG

initialisation-code: main_initialise

finalisation-code: main_terminate

#ifdef NO_INTERNATIONAL_HELP

command-keyword-table: main_command
   AddApp( min-args: 1, max-args: 1,
      gstrans-map: 1,
      add-syntax:,
      invalid-syntax: "Syntax:	*AddApp <application>",
      help-text: "*AddApp creates a link from the Resources icon to an application\n"),
   AppSize( min-args: 1, max-args: 1,
      gstrans-map: 0,
      add-syntax:,
      invalid-syntax: "Syntax:	*AppSize <size>",
      help-text: "*AppSize reserves space in application workspace\n"),
   Do( min-args: 0, max-args: 255,
      gstrans-map: 0,
      add-syntax:,
      invalid-syntax: "Syntax:	*Do <command>",
      help-text: "*Do passes its argument to the command interpreter\n"),
   IfThere( min-args: 1, max-args: 255,
      gstrans-map: 1,
      add-syntax:,
      invalid-syntax: "Syntax:	*IfThere <file> then <command> else <command>",
      help-text: "*IfThere looks for a file and executes a choice of commands\n"),
   LoadCMOS( min-args: 1, max-args: 1,
      gstrans-map: 1,
      add-syntax:,
      invalid-syntax: "Syntax:	*LoadCMOS <file>",
      help-text: "*LoadCMOS configures the computer from a configuration file\n"),
   SaveCMOS( min-args: 1, max-args: 1,
      gstrans-map: 1,
      add-syntax:,
      invalid-syntax: "Syntax:	*SaveCMOS <file>",
      help-text: "*SaveCMOS saves the computer's configuration to a configuration file\n"),
   Repeat( min-args: 0, max-args: 255,
      gstrans-map: 2,
      add-syntax:,
      invalid-syntax: "Syntax:	*Repeat <command> <directory> [-directories | -files | -applications | -type <type>] <tail> [-tasks] [-verbose] [-sort] [-continue]",
      help-text: "*Repeat iterates over a directory, performing a command for each object found\nOptions:\ndirectories\tlimit search to directories\nfiles\t\tlimit search to files\napplications\tlimit search to applications\ntype <type>\tlimit search to files of a given type\ntasks\t\tstart each command as a separate task\nverbose\t\tshow each command before it is executed\nsort\t\tenumerate directories in ascending ASCII order\ncontinue\tput first error into X$Error then carry on (except when -tasks)\n"),
   SafeLogon( min-args: 1, max-args: 255,
      gstrans-map: 0,
      add-syntax:,
      invalid-syntax: "Syntax:	*SafeLogon [[:]<station number>|:<File server name>] <user name> [[:<CR>]<Password>]",
      help-text: "*SafeLogon initialises the current (or given) file server for your use, except that if you are already logged on, it does nothing\n"),
   AppPath( min-args: 2, max-args: 2,
      gstrans-map: 2,
      add-syntax:,
      invalid-syntax: "Syntax:	*AppPath <variable> <path element>",
      help-text: "*AppPath appends a path element to a path variable, ensuring there are no duplicates\n"),
   PrepPath( min-args: 2, max-args: 2,
      gstrans-map: 2,
      add-syntax:,
      invalid-syntax: "Syntax:	*PrepPath <variable> <path element>",
      help-text: "*PrepPath prepends a path element to a path variable, ensuring there are no duplicates\n"),
   RemPath( min-args: 2, max-args: 2,
      gstrans-map: 2,
      add-syntax:,
      invalid-syntax: "Syntax:	*RemPath <variable> <path element>",
      help-text: "*RemPath removes a path element from a path variable\n"),
   FreePool( min-args: 0, max-args: 0,
      gstrans-map: 0,
      add-syntax:,
      invalid-syntax: "Syntax:	*FreePool",
      help-text: "*FreePool moves all available memory except for the next slot into the free pool\n"),
   ShrinkRMA( min-args: 0, max-args: 0,
      gstrans-map: 0,
      add-syntax:,
      invalid-syntax: "Syntax:	*ShrinkRMA",
      help-text: "*ShrinkRMA will try to shrink the relocatable module area to its minimum size\n"),
   AddToRMA( min-args: 1, max-args: 1,
      gstrans-map: 0,
      add-syntax:,
      invalid-syntax: "Syntax:	*AddToRMA <size>",
      help-text: "*AddToRMA adds free space onto the end of the RMA\n"),
   AppSlot( min-args: 1, max-args: 1,
      gstrans-map: 0,
      add-syntax:,
      invalid-syntax: "Syntax:	*AppSlot <size>",
      help-text: "*AppSlot tries to achieve the specified application space size\n"),
   X( min-args: 0, max-args: 255,
      gstrans-map: 0,
      add-syntax:,
      invalid-syntax: "Syntax:	*X <command>",
      help-text: "*X passes its argument to the command interpreter, storing any error in system variable X$Error (if not already set)\n")

#else

international-help-file: "Resources:$.Resources.BootCmds.Messages"

command-keyword-table: main_command
   AddApp( min-args: 1, max-args: 1,
      gstrans-map: 1,
      international:,
      invalid-syntax: "AddAppSyntax",
      help-text: "AddAppHelp"),
   AppSize( min-args: 1, max-args: 1,
      gstrans-map: 0,
      international:,
      invalid-syntax: "AppSizeSyntax",
      help-text: "AppSizeHelp"),
   Do( min-args: 0, max-args: 255,
      gstrans-map: 0,
      international:,
      invalid-syntax: "DoSyntax",
      help-text: "DoHelp"),
   IfThere( min-args: 1, max-args: 255,
      gstrans-map: 1,
      international:,
      invalid-syntax: "IfThereSyntax",
      help-text: "IfThereHelp"),
   LoadCMOS( min-args: 1, max-args: 1,
      gstrans-map: 1,
      international:,
      invalid-syntax: "LoadCMOSSyntax",
      help-text: "LoadCMOSHelp"),
   SaveCMOS( min-args: 1, max-args: 1,
      gstrans-map: 1,
      international:,
      invalid-syntax: "SaveCMOSSyntax",
      help-text: "SaveCMOSHelp"),
   Repeat( min-args: 0, max-args: 255,
      gstrans-map: 2,
      international:,
      invalid-syntax: "RepeatSyntax",
      help-text: "RepeatHelp"),
   SafeLogon( min-args: 1, max-args: 255,
      gstrans-map: 0,
      international:,
      invalid-syntax: "SafeLogonSyntax",
      help-text: "SafeLogonHelp"),
   AppPath( min-args: 2, max-args: 2,
      gstrans-map: 2,
      international:,
      invalid-syntax: "AppPathSyntax",
      help-text: "AppPathHelp"),
   PrepPath( min-args: 2, max-args: 2,
      gstrans-map: 2,
      international:,
      invalid-syntax: "PrepPathSyntax",
      help-text: "PrepPathHelp"),
   RemPath( min-args: 2, max-args: 2,
      gstrans-map: 2,
      international:,
      invalid-syntax: "RemPathSyntax",
      help-text: "RemPathHelp"),
   FreePool( min-args: 0, max-args: 0,
      gstrans-map: 0,
      international:,
      invalid-syntax: "FreePoolSyntax",
      help-text: "FreePoolHelp"),
   ShrinkRMA( min-args: 0, max-args: 0,
      gstrans-map: 0,
      international:,
      invalid-syntax: "ShrinkRMASyntax",
      help-text: "ShrinkRMAHelp"),
   AddToRMA( min-args: 1, max-args: 1,
      gstrans-map: 0,
      international:,
      invalid-syntax: "AddToRMASyntax",
      help-text: "AddToRMAHelp"),
   AppSlot( min-args: 1, max-args: 1,
      gstrans-map: 0,
      international:,
      invalid-syntax: "AppSlotSyntax",
      help-text: "AppSlotHelp"),
   X( min-args: 0, max-args: 255,
      gstrans-map: 0,
      international:,
      invalid-syntax: "XSyntax",
      help-text: "XHelp")

#endif