Changeset 1135


Ignore:
Timestamp:
Sep 1, 2008, 7:34:37 AM (17 years ago)
Author:
John Small
Message:

Add "::" to get SVN to enter version string?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cfgmgr.cmd

    r1130 r1135  
    11/*
    2         $Id: $
    3        
     2::      $Id: $
     3
    44   CFGMGR.CMD - manage installation, maintenance and deinstallation
    5                                  of FM/2 configuration files
     5                                 of FM/2 configuration files
    66
    77   Optional Parameters:
     
    138138Init: procedure expose (globals)
    139139
    140         button.                         = ''
    141        
    142         button.CMDS.helptext = 'Commands toolbar'
    143         button.CMDS.text     = 'Cmds'
    144         button.CMDS.id       = 4900
    145        
    146         button.UTILS.helptext = 'Utility toolbar'
    147         button.UTILS.text     = 'Utils'
    148         button.UTILS.id       = 4901
    149        
    150         button.SORT.helptext = 'Sort toolbar'
    151         button.SORT.text     = 'Sort'
    152         button.SORT.id       = 4902
    153        
    154         button.SELECT.helptext = 'Select toolbar'
    155         button.SELECT.text     = 'Select'
    156         button.SELECT.id       = 4903
    157        
    158         button.CONFIG.helptext = 'Configuration toolbar'
    159         button.CONFIG.text     = 'Cmds'
    160         button.CONFIG.id       = 4904
    161        
    162         button.FILES.helptext = 'Files toolbar'
    163         button.FILES.text     = 'Files'
    164         button.FILES.id       = 4905
    165        
    166         button.VIEWS.helptext = 'Views toolbar'
    167         button.VIEWS.text     = 'Views'
    168         button.VIEWS.id       = 4906
    169        
     140        button.                         = ''
     141
     142        button.CMDS.helptext = 'Commands toolbar'
     143        button.CMDS.text     = 'Cmds'
     144        button.CMDS.id       = 4900
     145
     146        button.UTILS.helptext = 'Utility toolbar'
     147        button.UTILS.text     = 'Utils'
     148        button.UTILS.id       = 4901
     149
     150        button.SORT.helptext = 'Sort toolbar'
     151        button.SORT.text     = 'Sort'
     152        button.SORT.id       = 4902
     153
     154        button.SELECT.helptext = 'Select toolbar'
     155        button.SELECT.text     = 'Select'
     156        button.SELECT.id       = 4903
     157
     158        button.CONFIG.helptext = 'Configuration toolbar'
     159        button.CONFIG.text     = 'Cmds'
     160        button.CONFIG.id       = 4904
     161
     162        button.FILES.helptext = 'Files toolbar'
     163        button.FILES.text     = 'Files'
     164        button.FILES.id       = 4905
     165
     166        button.VIEWS.helptext = 'Views toolbar'
     167        button.VIEWS.text     = 'Views'
     168        button.VIEWS.id       = 4906
     169
    170170   cfg.              = ''
    171171   cfg.errorcode     = 0
     
    576576            LastToolbar = 'CMDS.TLS'
    577577         else
    578                 LastToolbar = LastToolbox
    579         call SysIni inifile, 'FM/3', 'LastToolbar', LastToolbar
     578                LastToolbar = LastToolbox
     579        call SysIni inifile, 'FM/3', 'LastToolbar', LastToolbar
    580580      end
    581581   if SysIni(inifile, 'FM/3', 'FM2Shutdown.Toolbar') = 'ERROR:' then
    582                 call SysIni inifile, 'FM/3', 'FM2Shutdown.Toolbar', LastToolbar
     582                call SysIni inifile, 'FM/3', 'FM2Shutdown.Toolbar', LastToolbar
    583583   if SysIni(inifile, 'FM/4', 'LastToolbar') = 'ERROR:' then
    584                 call SysIni inifile, 'FM/4', 'LastToolbar', LastToolbar
     584                call SysIni inifile, 'FM/4', 'LastToolbar', LastToolbar
    585585return
    586586
    587587Ticket267Fix: procedure expose (globals)
    588         parse arg infile
    589         fix_string = 'Fixed: Ticket 267'
    590         abort_fix = 0
    591         outfile = SysTempFilename('cfgmgr??.fix')
    592         call lineout outfile, ';' fix_string
    593         /* Read file, if comment has "already repaired" message then stop */
    594         do while lines(infile) > 0
    595                 line = linein(infile)
    596                 if left(line, 1) = ';' then
    597                         if pos(fix_string, line) > 0 then
    598                                 do
    599                                         abort_fix = 1
    600                                         leave
    601                                 end
    602                         else
    603                                 call lineout outfile, line
    604                 else if word(line, 1) = ':spacer' then
    605                         call lineout outfile, ';' || substr(line, 2)
    606                 else
    607                         do
    608                                 tool.1 = line
    609                                 tool.2 = linein(infile)
    610                                 tool.3 = linein(infile)
    611                                 tool.4 = linein(infile)
    612                                 button_name = translate(tool.2)
    613                                 if (button.button_name.text \= '') & (tool.4 >= 4900) & (tool.4 < 4950) then
    614                                         do
    615                                                 call lineout outfile, button.button_name.helptext
    616                                                 call lineout outfile, button.button_name.text
    617                                                 call lineout outfile, tool.3
    618                                                 call lineout outfile, button.button_name.id
    619                                         end
    620                                 else
    621                                         do
    622                                                 call lineout outfile, tool.1
    623                                                 call lineout outfile, tool.2
    624                                                 call lineout outfile, tool.3
    625                                                 call lineout outfile, tool.4
    626                                         end
    627                         end                                     
    628         end
    629         call stream infile, 'c', 'close'
    630         call stream outfile, 'c', 'close'
    631         if abort_fix = 0 then
    632                 do
     588        parse arg infile
     589        fix_string = 'Fixed: Ticket 267'
     590        abort_fix = 0
     591        outfile = SysTempFilename('cfgmgr??.fix')
     592        call lineout outfile, ';' fix_string
     593        /* Read file, if comment has "already repaired" message then stop */
     594        do while lines(infile) > 0
     595                line = linein(infile)
     596                if left(line, 1) = ';' then
     597                        if pos(fix_string, line) > 0 then
     598                                do
     599                                        abort_fix = 1
     600                                        leave
     601                                end
     602                        else
     603                                call lineout outfile, line
     604                else if word(line, 1) = ':spacer' then
     605                        call lineout outfile, ';' || substr(line, 2)
     606                else
     607                        do
     608                                tool.1 = line
     609                                tool.2 = linein(infile)
     610                                tool.3 = linein(infile)
     611                                tool.4 = linein(infile)
     612                                button_name = translate(tool.2)
     613                                if (button.button_name.text \= '') & (tool.4 >= 4900) & (tool.4 < 4950) then
     614                                        do
     615                                                call lineout outfile, button.button_name.helptext
     616                                                call lineout outfile, button.button_name.text
     617                                                call lineout outfile, tool.3
     618                                                call lineout outfile, button.button_name.id
     619                                        end
     620                                else
     621                                        do
     622                                                call lineout outfile, tool.1
     623                                                call lineout outfile, tool.2
     624                                                call lineout outfile, tool.3
     625                                                call lineout outfile, tool.4
     626                                        end
     627                        end
     628        end
     629        call stream infile, 'c', 'close'
     630        call stream outfile, 'c', 'close'
     631        if abort_fix = 0 then
     632                do
    633633         'copy' infile cfg.backupdir         /* backup tls file */
    634                         'copy' outfile infile                   /* "install" new  tls file */
    635                         cfg.action_taken = 1
    636                 end
    637         call SysFileDelete outfile
     634                        'copy' outfile infile                   /* "install" new  tls file */
     635                        cfg.action_taken = 1
     636                end
     637        call SysFileDelete outfile
    638638return
    639639
Note: See TracChangeset for help on using the changeset viewer.