/** $Revision Header *** Header built automatically - do not edit! *********** ** ** © Copyright Bibbersoft ** ** File : DoRevision.ged ** Created on : zondag, 10-sep-95 ** Created by : Bert Wynants ** Current revision : V 1.00 ** ** Purpose ** ------- ** C, Asm and catalog File Revision Bump script for Golded. ** ** Date Author Comment ** ========= ==================== ==================== ** 10-sep-95 Bert Wynants --- Initial release --- ** ** $Revision Header *********************************************************/ OPTIONS RESULTS /* enable return codes */ if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */ address 'GOLDED.1' 'LOCK CURRENT' /* lock GUI, gain access */ OPTIONS FAILAT 6 /* ignore warnings */ SIGNAL ON SYNTAX /* ensure clean exit */ /* ----------------------- INSERT YOUR CODE HERE: -------------------- */ 'QUERY CAT' /* query language */ if (result = "deutsch") then do noText = '"Es ist kein Text im Editor ?!"' comment = '"Kommentar"' end else if (result = "français") then do noText = '"Pas de texte dans le tampon ?!"' comment = '"Commentaire"' end else do noText = '"No text in buffer ?!"' comment = '"Comment"' end 'QUERY ANYTEXT' IF (result = 'TRUE') THEN DO /* Only if there is any text */ 'QUERY DOC VAR FILENAME' /* get current file name */ 'SAVE ALL' 'PING 9' IF ARG(1,'E') THEN DO IF (upper(ARG(1))="BUMP") THEN DO 'QUERY PATH VAR PATH' IF( right( path, 1 ) ~= ':' ) then IF( right( path, 1 ) ~= '/' ) then path = path || '/' 'REQUEST TITLE="Options" BODY="What kind of revision?" BUTTON="BETA|Final|CANCEL"' number = RESULT /* get the user choice (a textstyle or `cancel' */ if (number > 0) THEN DO if (number = 1) then beta = 'BETA' else beta = '' dir = pragma( 'directory', path ) /* goto directory of current file */ ADDRESS COMMAND 'C:BumpRevision >nil: BUMP EXISTING '||beta path = pragma( 'directory', dir ) /* go back to original directory */ END END END ELSE DO 'REQUEST STRING TITLE=comment' comment = RESULT ADDRESS COMMAND 'C:BumpRevision >nil: FILE '||FILENAME||' COMMENT "'||comment'"' END 'OPEN AGAIN' 'PONG 9' END ELSE /* no text in buffer */ 'REQUEST PROBLEM=' || noText /* -------------------------- END OF YOUR CODE ------------------------ */ 'UNLOCK' /* VERY important: unlock GUI */ EXIT SYNTAX: SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-(" 'UNLOCK' EXIT