about summary refs log tree commit diff
path: root/vms/Add_List.com
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-08-19 03:12:28 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-08-19 03:12:28 +0000
commit1fd361a1ea06e44286c213ca1f814f49306fdc43 (patch)
tree64c8c96cf54d8718847339a403e5e67b922e8c3f /vms/Add_List.com
downloadnetpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.tar.gz
netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.tar.xz
netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.zip
Create Subversion repository
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'vms/Add_List.com')
-rwxr-xr-xvms/Add_List.com59
1 files changed, 59 insertions, 0 deletions
diff --git a/vms/Add_List.com b/vms/Add_List.com
new file mode 100755
index 00000000..830cfc96
--- /dev/null
+++ b/vms/Add_List.com
@@ -0,0 +1,59 @@
+$ VERIFY = F$Verify (0)
+$!
+$!     ADD_LIST.COM command procedure
+$!         Usage:
+$!             ADD_LIST library file_spec [logical_name_table]
+$!
+$!     Last Modified: 18-JAN-1991 Rick Dyson
+$!
+$!     Escape routes
+$ On Control_Y Then GoTo FINISH
+$ On Error     Then GoTo FINISH
+$ On Warning   Then GoTo FINISH
+$ On Severe    Then GoTo FINISH
+$!
+$!     We're out'a here if the calling parameter is null
+$ P2 = F$Edit (P2, "TRIM, UPCASE")
+$ If P2 .eqs. "" Then GoTo FINISH
+$!
+$!     Check logical name table argument and default if necessary.
+$!
+$ TABLE = F$Edit (P3, "UNCOMMENT, UPCASE, TRIM")
+$ If (TABLE .eqs. "PROCESS")
+$    Then
+$    Else If (TABLE .eqs. "GROUP")
+$            Then
+$            Else If (TABLE .eqs. "JOB")
+$                    Then
+$                    Else If (TABLE .eqs. "SYSTEM")
+$                            Then
+$                            Else
+$                                TABLE = "Process"
+$                         EndIf
+$                 EndIf
+$         EndIf
+$ EndIf
+$!
+$! Check the first value in the library list
+$ LIB = P1
+$ X = F$TrnLnm (LIB, "LNM$''TABLE'")
+$ If X .eqs. "" Then GoTo INSERT
+$ If X .eqs. P2 Then GoTo FINISH
+$!
+$! Find the first free logical to assign the library file to
+$ BASE = P1 + "_"
+$ N = 1
+$NEXTLIB:
+$   LIB := 'BASE''N'
+$   X = F$TrnLnm (LIB, "LNM$''TABLE'")
+$   If X .eqs. "" Then GoTo INSERT
+$   If X .eqs. P2 Then GoTo FINISH
+$   N = N + 1
+$   GoTo NEXTLIB
+$!
+$! Add the library file to the library file list
+$INSERT:
+$   Define /'TABLE' 'LIB' 'P2'
+$FINISH:
+$   VERIFY = F$Verify (VERIFY)
+$   Exit