private.rc
changeset 26 398bad70619c
parent 25 463dd2575719
child 41 d61cda45c461
--- a/private.rc	Wed Aug 16 17:38:28 1995 +0200
+++ b/private.rc	Fri Oct 27 21:33:41 1995 +0100
@@ -15,6 +15,11 @@
  *"
 
 "/
+"/ I want the hostname to be prepended to a windows label
+"/
+StandardSystemView includeHostNameInLabel:true.
+
+"/
 "/ this turns off information messages from classes
 "/ (such as 'D8IMAGE: allocating colors ...'
 "/
@@ -54,191 +59,204 @@
 map bindValue:#BackSpace     to:#Delete.
 
 "/
-"/ my personal preferences - make it unconditional if you like them
-"/ 
-OperatingSystem getLoginName = 'claus' ifTrue:[
-    map bindValue:#Compose     to:#'Control_R'.    "/ remove this line, if your keyboard has a compose-key
-
+"/ define some keyboard macros as virtual function-keys:
+"/ Cmd-F99: paste the output of a selected unix command ..
+"/ Cmd-F98: toggle between 4 and 8 col tab setting
+"/ Cmd-F96: pipe text through spelling checker and collect its output
+"/ Cmd-F97: get next entry from spell-list, search and highlight it
+"/ Cmd-F95: indents selection by 4
+"/ Cmd-F94: undents selection by 4
+"/
+macros := Smalltalk at:#FunctionKeySequences.
+macros isNil ifTrue:[
+    macros := IdentityDictionary new.
+    Smalltalk at:#FunctionKeySequences put:macros.
+].
 
-    "/
-    "/ convenient functions on the keyboard
-    "/
-    map bindValue:#Again         to:#F1.
-    map bindValue:#UserInterrupt to:#Break.
-    map bindValue:#PrintIt       to:#Print.      "/ called PrintScreen on most keyboards
-    map bindValue:#InspectIt     to:#Execute.    "/ called SysReq on most keyboards
+"/ macro to replace selection by unix command
+macros at:#F99 put:'
+		    "replace selection by 
+		     corresponding
+		     unix commands output"
 
-    "/
-    "/ have F5 paste the output of a selected unix command ..
-    "/ have CtrlTab toggle between 4 and 8 col tab setting
-    "/ F6/F7 is cool (not available on all systems): 
-    "/    F6 sends the selection to spell ,
-    "/    F7 locates the next spelling error and searches for these word(s)
-    "/ F10 indents selection by 4
-    "/ F9  undents selection by 4
-    "/
-    "/ F3  comments a (multiline) selection
-    "/ F4  uncomments a (multiline) selection
-    "/
-    macros := Smalltalk at:#FunctionKeySequences.
-    macros isNil ifTrue:[
-	macros := IdentityDictionary new.
-	Smalltalk at:#FunctionKeySequences put:macros.
-    ].
-    "/ replace selection by unix command
-    macros at:#F99 put:'
-			"replace selection by 
-			 corresponding
-			 unix commands output"
+		    |sel|
+
+		    sel := self selection.
+		    sel notNil ifTrue:[
+			self replace:
+			    (PipeStream readingFrom:(sel asString))
+				contents asString
+		    ]'.
 
-			|sel|
+"/ macro to toggle tabs
+macros at:#F98 put:'
+		    "toggle between 4-col 
+		     and 8-col tabs"
 
-			sel := self selection.
-			sel notNil ifTrue:[
-			    self replace:
-				(PipeStream readingFrom:(sel asString))
-				    contents asString
-			]'.
+		    (tabPositions == self class tab4Positions)
+			 ifTrue:[self setTab8]
+			 ifFalse:[self setTab4]'.
 
-    "/ toggle tabs
-    macros at:#F98 put:'
-			"toggle between 4-col 
-			 and 8-col tabs"
+"/ macro to get next spelling error, and select it
+macros at:#F97 put:'
+		    |errs thisErr sl sc|
 
-			(tabPositions == self class tab4Positions)
-			     ifTrue:[self setTab8]
-			     ifFalse:[self setTab4]'.
-
-    "/ get next spelling error, and select it
-    macros at:#F97 put:'
-			|errs thisErr sl sc|
-
-			thisErr := Smalltalk at:#''_thisError''.
-			thisErr isNil ifTrue:[
-			    errs := Smalltalk at:#''_spellOutput''.
-			    (errs notNil and:[errs notEmpty]) ifTrue:[
-				thisErr := errs removeFirst.
-				errs isEmpty ifTrue:[Smalltalk removeKey:''_spellOut'']
-			    ].
-			    Smalltalk at:#''_lastErrLine'' put:1.
-			    Smalltalk at:#''_lastErrCol'' put:1.
+		    thisErr := Smalltalk at:#''_thisError''.
+		    thisErr isNil ifTrue:[
+			errs := Smalltalk at:#''_spellOutput''.
+			(errs notNil and:[errs notEmpty]) ifTrue:[
+			    thisErr := errs removeFirst.
+			    errs isEmpty ifTrue:[Smalltalk removeKey:''_spellOut'']
 			].
-			thisErr notNil ifTrue:[
-			    sl := Smalltalk at:#''_lastErrLine''.
-			    sc := Smalltalk at:#''_lastErrCol''.
-			    self searchForwardFor:thisErr
-				 startingAtLine:sl col:sc 
-				 ifFound:[:fl :fc | self selectWordAtLine:fl col:fc.
-						    Smalltalk at:#''_lastErrLine'' put:fl.
-						    Smalltalk at:#''_lastErrCol'' put:fc+1]
-				 ifAbsent:[self device beep]
-			]'.
+			Smalltalk at:#''_lastErrLine'' put:1.
+			Smalltalk at:#''_lastErrCol'' put:1.
+		    ].
+		    thisErr notNil ifTrue:[
+			sl := Smalltalk at:#''_lastErrLine''.
+			sc := Smalltalk at:#''_lastErrCol''.
+			self searchForwardFor:thisErr
+			     startingAtLine:sl col:sc 
+			     ifFound:[:fl :fc | self selectWordAtLine:fl col:fc.
+						Smalltalk at:#''_lastErrLine'' put:fl.
+						Smalltalk at:#''_lastErrCol'' put:fc+1]
+			     ifAbsent:[self device beep]
+		    ]'.
 
-    "/ send contents to spell; remember spelling errors
-    "/ does not work on all systems (some do not have spell ...)
-    macros at:#F96 put:'
-			|p f s|
+"/ macro to send contents to spell; remember spelling errors
+"/ does not work on all systems (some do not have spell ...)
+macros at:#F96 put:'
+		    |p f s|
+
+		    f := Filename newTemporary. s := f writeStream.
+		    s nextPutAll:self contents asString.
+		    s close.
+		    p := PipeStream readingFrom:''spell '' , f pathName.
+		    Smalltalk at:#''_spellOutput'' put:p contents asString asCollectionOfLines.
+		    p close.
+		    self information:''F7 positions on the next spelling error''.
+		    '.
 
-			f := Filename newTemporary. s := f writeStream.
-			s nextPutAll:self contents asString.
-			s close.
-			p := PipeStream readingFrom:''spell '' , f pathName.
-			Smalltalk at:#''_spellOutput'' put:p contents asString asCollectionOfLines.
-			p close.
-			self information:''F7 positions on the next spelling error''.
-			'.
+"/ macro to indent by 4
+macros at:#F95 put:'
+		    "indent selected line-range 
+		     by 4 spaces (i.e. to the right)"
+
+		    self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
+			|line|
 
-    "/ indent by 4
-    macros at:#F95 put:'
-			"indent selected line-range 
-			 by 4 spaces (i.e. to the right)"
+			line := self listAt:lineNr.
+			line notNil ifTrue:[
+			    line notEmpty ifTrue:[
+				line := ''    '' , line.
+				self at:lineNr put:line
+			    ]
+			]
+		    ]
+		    '.
+"/ macro to undent by 4
+macros at:#F94 put:'
+		    "undent selected line-range 
+		     by 4 spaces (i.e. to the left)"
 
-			self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
-			    |line|
+		    self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
+			|line|
 
-			    line := self listAt:lineNr.
-			    line notNil ifTrue:[
-				line notEmpty ifTrue:[
-				    line := ''    '' , line.
+			line := self listAt:lineNr.
+			line notNil ifTrue:[
+			    line notEmpty ifTrue:[
+				(line startsWith:''    '') ifTrue:[
+				    line := line copyFrom:5.
 				    self at:lineNr put:line
 				]
 			    ]
 			]
-			'.
-    "/ undent by 4
-    macros at:#F94 put:'
-			"undent selected line-range 
-			 by 4 spaces (i.e. to the left)"
-
-			self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
-			    |line|
+		    ]
+		    '.
+"/
+"/ my personal preferences - comment it, if you do not like them
+"/ bind function and other keys as:
+"/
+"/ F1            - again
+"/ F3            - comment-it
+"/ F4            - uncomment-it
+"/ F5            - paste shell output
+"/ F9            - undent by 4
+"/ F10           - indent by 4
+"/ Control-R     - Compose key
+"/ Break         - UserInterrupt
+"/ Print         - PrintIt
+"/ Execute       - InspectIt
 
-			    line := self listAt:lineNr.
-			    line notNil ifTrue:[
-				line notEmpty ifTrue:[
-				    (line startsWith:''    '') ifTrue:[
-					line := line copyFrom:5.
-					self at:lineNr put:line
-				    ]
-				]
-			    ]
-			]
-			'.
+map bindValue:#Compose     to:#'Control_R'.     "/ remove this line, if your keyboard has a compose-key
+map bindValue:#Compose     to:#'Multi_key'.     "/ on some servers, this comes pretranslated
 
-    map bindValue:#CmdF99  to:#F5.
-    map bindValue:#CmdF98 to:#CtrlTab.
-    "/ map bindValue:#CmdF97 to:#F7.
-    "/ map bindValue:#CmdF96 to:#F6.
-    map bindValue:#CmdF95 to:#F10.
-    map bindValue:#CmdF94 to:#F9.
+"/
+"/ convenient functions on the keyboard
+"/
+map bindValue:#Again         to:#F1.
+map bindValue:#UserInterrupt to:#Break.
+map bindValue:#PrintIt       to:#Print.      "/ called PrintScreen on most keyboards
+map bindValue:#InspectIt     to:#Execute.    "/ called SysReq on most keyboards
 
-    map bindValue:#CommentSelection to:#F3.
-    map bindValue:#UncommentSelection to:#F4.
+
+map bindValue:#CmdF99  to:#F5.
+map bindValue:#CmdF98 to:#CtrlTab.
+"/ map bindValue:#CmdF97 to:#F7.
+"/ map bindValue:#CmdF96 to:#F6.
+map bindValue:#CmdF95 to:#F10.
+map bindValue:#CmdF94 to:#F9.
 
-    "/
-    "/ since some of my machines have german keyboards ;-)
-    "/ and I like to be able to edit my files on all machines,
-    "/ I need a translation in both ways.
-    "/ you'd normally not define things in both directions.
-    "/
-    "/ actually, these things belong into d_xxx.rc ...
-    "/
-    "/ german national characters on a US keyboard:
-    "/
-    map bindValue:(Character value:16rFC) to:#'Cmd['.
-    map bindValue:(Character value:16rE4) to:#'Cmd'''.
-    map bindValue:(Character value:16rF6) to:#'Cmd;'.
-    map bindValue:(Character value:16rDC) to:#'Cmd{'.
-    map bindValue:(Character value:16rC4) to:#'Cmd"'.
-    map bindValue:(Character value:16rD6) to:#'Cmd:'.
-    map bindValue:(Character value:16rDF) to:#'Cmd-'.
+map bindValue:#CommentSelection to:#F3.
+map bindValue:#UncommentSelection to:#F4.
 
-    "/
-    "/ US characters on german keyboard:
-    "/
-    map bindValue:$[ to:#'Alt['.
-    map bindValue:$] to:#'Alt]'.
-    map bindValue:$| to:#'Alt|'.
-    map bindValue:${ to:#'Alt{'.
+"/
+"/ since some of my machines have german keyboards ;-)
+"/ and I like to be able to edit my files on all machines,
+"/ I need a translation in both ways.
+"/ you'd normally not define things in both directions.
+"/
+"/ actually, these things belong into d_xxx.rc ...
+"/
+"/ german national characters on a US keyboard:
+"/
+map bindValue:(Character value:16rFC) to:#'Cmd['.
+map bindValue:(Character value:16rE4) to:#'Cmd'''.
+map bindValue:(Character value:16rF6) to:#'Cmd;'.
+map bindValue:(Character value:16rDC) to:#'Cmd{'.
+map bindValue:(Character value:16rC4) to:#'Cmd"'.
+map bindValue:(Character value:16rD6) to:#'Cmd:'.
+map bindValue:(Character value:16rDF) to:#'Cmd-'.
 
-    "/
-    "/ no matter what the 'display.rc' says:
-    "/     I want my #iris style ...
-    "/
-    View defaultStyle:#iris
+"/
+"/ US characters on german keyboard:
+"/
+map bindValue:$[ to:#'Alt['.
+map bindValue:$] to:#'Alt]'.
+map bindValue:$| to:#'Alt|'.
+map bindValue:${ to:#'Alt{'.
+
+"/
+"/ no matter what the 'display.rc' says:
+"/     I want my #iris style ...
+"/
+(OperatingSystem getLoginName = 'claus' 
+or:[OperatingSystem getLoginName = 'cg']) ifTrue:[
+    View defaultStyle:#iris.
+] ifFalse:[
+    View defaultStyle:#motif.
 ].
 
-
 "/ add my private directories to the searchPath ...
 "/ This does not make sense in your environment.
 "/ However, I leave the code here to show how its done.
 "/
 Smalltalk systemPath addFirst:'../..'.
 
-OperatingSystem getLoginName = 'claus' ifTrue:[
-    Smalltalk systemPath addFirst:'/phys/clam/claus/smalltalk/not_delivered'.
-    Smalltalk systemPath addFirst:'/phys/clam/claus/smalltalk/private_classes'.
-    Smalltalk systemPath addFirst:'/phys/clam/claus/work/fileIn/not_delivered'.
+(OperatingSystem getLoginName = 'claus' 
+or:[OperatingSystem getLoginName = 'cg']) ifTrue:[
+    Smalltalk systemPath addFirst:'../../not_delivered'.
+    Smalltalk systemPath addFirst:'../../private_classes'.
+    Smalltalk systemPath addFirst:'../../fileIn/not_delivered'.
     Smalltalk systemPath addFirst:'../../libpro'.
 ].
 
@@ -280,11 +298,18 @@
 "/     Once you get bored about them, make the below unconditional.
 "/     (you can also turn them off in the NewLaunchers settings menu ...)
 "/
-OperatingSystem getLoginName = 'claus' ifTrue:[
+"/     The history manager automatically adds a history line to changed
+"/     methods and optionally to a classes history method.
+"/
+(OperatingSystem getLoginName = 'claus' 
+or:[OperatingSystem getLoginName = 'cg']) ifTrue:[
     Compiler warnSTXSpecials:false.
-    Compiler allowUnderscoreInIdentifier:true. 
-    Compiler warnUnderscoreInIdentifier:false. 
+    HistoryManager notNil ifTrue:[
+	HistoryManager activate.
+    ]
 ].
+Compiler allowUnderscoreInIdentifier:true. 
+Compiler warnUnderscoreInIdentifier:false. 
 
 
 "/ this is a temporary kludge: specify the flags to be used
@@ -295,10 +320,21 @@
 "/
 Compiler stcCompilation:#default.
 OperatingSystem getOSType = 'irix' ifTrue:[
-    Compiler stcCompilationFlags:'-I../../include +optinline -DGLX'.
+    Compiler stcCompilationIncludes:'-I../../include'.
+    Compiler stcCompilationDefines:'-DGLX'.
 ] ifFalse:[
-    Compiler stcCompilationFlags:'-I../../include -I../../librun/VGL/vogl/src +optinline -DVGL'.
+    Compiler stcCompilationIncludes:'-I../../include -I../../librun/VGL/vogl/src'.
+    Compiler stcCompilationDefines:'-DVGL'.
+
+"/
+"/ disabled; thats the default anyway ....
+"/
+"/    OperatingSystem getOSType = 'linux' ifTrue:[
+"/      ObjectFileLoader searchedLibraries:#('/usr/lib/libc.a')
+"/    ]
+
 ].
+Compiler stcCompilationOptions:'+optinline'.
 
 "/ experimental: try to always keep some bytes in the pocket
 "/ this changes the memory policy, to start the background whenever
@@ -309,16 +345,11 @@
 "/ during idle time. (I often walk around in the fileBrowser, loading big
 "/ files like XWorkstation.st or SystemBrowser.st ....)
 "/
-"/ If you find this setup useful, remove the if, and make the
-"/ statements in the block unconditional.
-"/
-OperatingSystem getLoginName = 'claus' ifTrue:[
-    ObjectMemory freeSpaceGCAmount:1000000. 
-    ObjectMemory freeSpaceGCLimit:250000. 
-    ObjectMemory incrementalGCLimit:500000. 
-    ObjectMemory startBackgroundCollectorAt:5. 
-    ObjectMemory startBackgroundFinalizationAt:5. 
-].
+ObjectMemory freeSpaceGCAmount:1000000. 
+ObjectMemory freeSpaceGCLimit:250000. 
+ObjectMemory incrementalGCLimit:500000. 
+ObjectMemory startBackgroundCollectorAt:5. 
+ObjectMemory startBackgroundFinalizationAt:5. 
 
 "/ experimental: configure the memory manager to quickly increase
 "/ its oldSpace, as long as it stays below 8Mb (i.e. do not enter
@@ -328,10 +359,8 @@
 "/ If you have a machine with lots of (real) memory, you may want to
 "/ increase the number. The value below should be ok for 16-32Mb machines.
 "/
-OperatingSystem getLoginName = 'claus' ifTrue:[
-    ObjectMemory fastMoreOldSpaceLimit:8*1024*1024.
-    ObjectMemory fastMoreOldSpaceAllocation:true.
-].
+ObjectMemory fastMoreOldSpaceLimit:8*1024*1024.
+ObjectMemory fastMoreOldSpaceAllocation:true.
 !
 
 "/ another experimental (and a secret for now, since I dont want