Contents

×

Suntan Special version 0.68

Suntan Special Broadband edition

EditFile

Suntan Special Function: EditFile

EditFile is used to make changes to a text file. EditFile takes commands from a queue or from standard input, and executes them on the text file.

Syntax:

queueName = 'nul'
queue 'ReadConfigFile'
(queue other commands)
queue 'WriteConfigFile'
queue 'exit'
call EditFile queueName, textFilename

Program Arguments

  1. queueName - queue to read for instructions; use 'nul' to indicate standard input
  2. textFilename - name of the text file to edit

Returns:

(nothing)

Commands

Command name Description
ReadConfigFile Must be the first command; reads the file into memory
AppendToPath <directory> Adds <directory> to the end of the PATH statement
PrependToPath <directory> Adds <directory> to the beginning of the PATH statement
AppendToLibPath <directory> Adds <directory> to the end of the LIBPATH statement
PrependToLibPath <directory> Adds <directory> to the beginning of the LIBPATH statement
AppendToDPath <directory> Adds <directory> to the end of the SET DPATH statement
AppendToBookshelf <directory> Adds <directory> to the end of the SET BOOKSHELF statement
AppendToClasspath <directory> Adds <directory> to the end of the SET CLASSPATH statement
AppendToHelp <directory> Adds <directory> to the end of the SET HELP statement
AppendToSomir <som file> Adds <som file> to the end of the SET SOMIR statement
AppendToNLSPath <template> Adds <template> to the end of the SET NLSPATH statement
RemoveFromPath <directory> Removes <directory> from the PATH statement
RemoveFromLibPath <directory> Removes <directory> from the LIBPATH statement
RemoveFromDPath <directory> Removes <directory> from the SET DPATH statement
RemoveFromHelp <directory> Removes <directory> from the SET HELP statement
RemoveFromBookshelf <directory> Removes <directory> from the SET BOOKSHELF statement
RemoveFromSomir <som file> Removes <som file> from the SET SOMIR statement
RemoveFromNLSPath <template> Removes <template> from the SET NLSPATH statement
AppendLine <line> Adds <line> to the end of the file
InsertLine <token> <line> Insert the new line before the line containing <token> with <line>. The matching of the token is done in a case-insensitive manner.
ReplaceLine <token> <line> Replace the entire line containing <token> with <line>. The matching of the token is done in a case-insensitive manner.
InsertSection <line> Insert all input from the queue before <line> until 'endSectionMarker' is read
AppendSection <line> Insert all input from the queue after <line> until 'endSectionMarker' is read
RemoveLine <token> Remove the line containing <token>
RemarkLine <token> Prepend 'REM' before the line containing <token>
AddLine <line number>, <line> Insert <line> before the current line at <line number>
DeleteLine <line number> Delete the line at <line number>
Set <var>=<value> Replace the current SET statement if any with a new SET statement. If there is not currently such a SET statement, append one to the end of the file.
WriteConfigFile Write the file out to disk.
exit Terminate processing and exit (or return if queueName = 'nul')

Note:

Many of these commands only make sense if the file is config.sys

Last Modified: 24 Dec 2019
Graphics by Colorful Language
Copyright 2019 by Blonde Guy