home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!torn!nott!bnrgate!bcars267!news
- From: emcoop@bnr.ca (hume smith)
- Subject: Re: manual pages for unix
- Message-ID: <21495.1992Dec15.100156@bcars148>
- Sender: news@bnr.ca (usenet)
- Nntp-Posting-Host: bcars148
- Organization: Bell-Northern Research, Ottawa, Canada
- X-Poster: Emacs-NNTP-0.1
- References: <1992Dec9.191545.29278@dragon.acadiau.ca>
- Date: Tue, 15 Dec 1992 15:01:56 GMT
- Lines: 409
-
- In <1992Dec9.191545.29278@dragon.acadiau.ca>, 850347s@dragon.acadiau.ca (Hume Smith) said:
- > well a few days ago i posted about the UNIX manual installation
- > of the tk and tcl man pages.
-
- and i posted csh scripts to install them "correctly". now that i've figured out
- tcl i've got wish scripts. i'll post them too, if only as sample amateur tcl.
- So much more elegantly expressed in tcl! what a neat language.
-
- here's a question though, just so i'm not wasting too much space:
- the FAQ makes no mention of any amiga porting. has anyone tried it,
- or accomplished it? i'd tinker with it, but i'm busy with XLisp
- for a the next while, among other things.
-
- these scripts install some of the tk man pages into section 1, even though
- they don't really really go there, they just have section 1 internally.
- maybe they can be grouped into one big wish man page, like sh and csh do?
- eventually...
-
- ------------------------------8<-------------------
- #!/usr/local/bin/wish -f
-
- # installs TCL man pages to desired directory
-
- # base manual directory
- set MANDIR /usr/local/man
- # where the original files reside
- set FROMDIR [pwd]
-
- # FROMDIR and MANDIR must be on the same filesystem.
-
- if {!([file writable $MANDIR/man3] &&
- [file isdirectory $MANDIR/man3])} then {
- puts stderr "$MANDIR/man3 is not a writeable directory"
- exit 1
- }
-
- puts stderr "Linking man pages " nonewline
-
- foreach i {
- {AddErrInfo
- Tcl_AddErrorInfo
- Tcl_SetErrorCode
- Tcl_UnixError
- Tcl_CheckStatus}
- {AssembCmd
- Tcl_CreateCmdBuf
- Tcl_AssembleCmd
- Tcl_DeleteCmdBuf}
- {Backslash
- Tcl_Backslash}
- {Concat
- Tcl_Concat}
- {CrtCommand
- Tcl_CreateCommand
- Tcl_DeleteCommand}
- {CrtInterp
- Tcl_CreateInterp
- Tcl_DeleteInterp}
- {CrtPipelin
- Tcl_CreatePipeline}
- {CrtTrace
- Tcl_CreateTrace
- Tcl_DeleteTrace}
- {Eval
- Tcl_Eval
- Tcl_VarEval
- Tcl_EvalFile
- Tcl_GlobalEval}
- {ExprLong
- Tcl_ExprLong
- Tcl_ExprDouble
- Tcl_ExprBool
- Tcl_ExprString}
- {Fork
- Tcl_Fork
- Tcl_WaitPids
- Tcl_DetachPids}
- {GetInt
- Tcl_GetInt
- Tcl_GetDouble
- Tcl_GetBoolean}
- {Hash
- Tcl_InitHashTable
- Tcl_DeleteHashTable
- Tcl_CreateHashEntry
- Tcl_DeleteHashEntry
- Tcl_FindHashEntry
- Tcl_GetHashValue
- Tcl_SetHashValue
- Tcl_GetHashKey
- Tcl_FirstHashEntry
- Tcl_NextHashEntry
- Tcl_HashStats}
- {History
- Tcl_InitHistory
- Tcl_RecordAndEval}
- {Interp
- Tcl_Interp}
- {SetResult
- Tcl_SetResult
- Tcl_AppendResult
- Tcl_AppendElement
- Tcl_ResetResult}
- {SetVar
- Tcl_SetVar
- Tcl_SetVar2
- Tcl_GetVar
- Tcl_GetVar2
- Tcl_UnsetVar
- Tcl_UnsetVar2}
- {SplitList
- Tcl_SplitList
- Tcl_Merge
- Tcl_ScanElement
- Tcl_ConvertElement}
- {StrMatch
- Tcl_StringMatch}
- {Tcl
- Tcl}
- {TildeSubst
- Tcl_TildeSubst}
- {TraceVar
- Tcl_TraceVar
- Tcl_TraceVar2
- Tcl_UntraceVar
- Tcl_UntraceVar2
- Tcl_VarTraceInfo
- Tcl_VarTraceInfo2}
- {library
- libtcl}} {
- set src [lindex $i 0]
- puts stderr "$src... " nonewline
- flush stderr
- foreach j [lrange $i 1 end] {
- exec ln $FROMDIR/$src.man $MANDIR/man3/$j.3
- }
- }
- puts stderr done.
- exit 0
- -----------------------------------8<---------------------------------
- #!/usr/local/bin/wish -f
-
- # installs TK man pages to desired directory
-
- # base manual directory
- set MANDIR /usr/local/man
- # where the original files reside
- set FROMDIR [pwd]
-
- # FROMDIR and MANDIR must be on the same filesystem.
-
- if {!([file isdirectory $MANDIR/man3] &&
- [file isdirectory $MANDIR/man1] &&
- [file writable $MANDIR/man3] &&
- [file writable $MANDIR/man1])} then {
- puts stderr "$MANDIR/man1 and $MANDIR/man3 are not writeable directories"
- exit 1
- }
-
- puts stderr "Linking man pages " nonewline
-
- foreach i {
- {3DBorder 3
- Tk_Get3DBorder
- Tk_Draw3DRectangle
- Tk_Fill3DRectangle
- Tk_Draw3DPolygon
- Tk_Fill3DPolygon
- Tk_SetBackgroundFromBorder
- Tk_NameOf3DBorder
- Tk_Free3DBorder}
- {ConfigWidg 3
- Tk_ConfigureWidget
- Tk_Offset
- Tk_ConfigureInfo}
- {ConfigWind 3
- Tk_ConfigureWindow
- Tk_MoveWindow
- Tk_ResizeWindow
- Tk_MoveResizeWindow
- Tk_SetWindowBorderWidth
- Tk_ChangeWindowAttributes
- Tk_SetWindowBackground
- Tk_SetWindowBackgroundPixmap
- Tk_SetWindowBorder
- Tk_SetWindowBorderPixmap
- Tk_DefineCursor
- Tk_UndefineCursor}
- {CoordToWin 3
- Tk_CoordsToWindow}
- {CrtErrHdlr 3
- Tk_CreateErrorHandler
- Tk_DeleteErrorHandler}
- {CrtGenHdlr 3
- Tk_CreateGenericHandler
- Tk_DeleteGenericHandler}
- {CrtMainWin 3
- Tk_CreateMainWindow
- Tk_CreateWindow
- Tk_CreateWindowFromPath
- Tk_DestroyWindow
- Tk_MakeWindowExist}
- {DoOneEvent 3
- Tk_DoOneEvent
- Tk_MainLoop
- Tk_HandleEvent}
- {DoWhenIdle 3
- Tk_DoWhenIdle
- Tk_CancelIdleCall}
- {EventHndlr 3
- Tk_CreateEventHandler
- Tk_DeleteEventHandler}
- {FileHndlr 3
- Tk_CreateFileHandler
- Tk_DeleteFileHandler}
- {FocusHndlr 3
- Tk_CreateFocusHandler}
- {GeomReq 3
- Tk_GeometryRequest
- Tk_SetInternalBorder}
- {GetAnchor 3
- Tk_GetAnchor
- Tk_NameOfAnchor}
- {GetBitmap 3
- Tk_GetBitmap
- Tk_DefineBitmap
- Tk_NameOfBitmap
- Tk_SizeOfBitmap
- Tk_FreeBitmap
- Tk_GetBitmapFromData}
- {GetCapStyl 3
- Tk_GetCapStyle
- Tk_NameOfCapStyle}
- {GetColor 3
- Tk_GetColor
- Tk_GetColorByValue
- Tk_NameOfColor
- Tk_FreeColor}
- {GetCursor 3
- Tk_GetCursor
- Tk_GetCursorFromData
- Tk_NameOfCursor
- Tk_FreeCursor}
- {GetFontStr 3
- Tk_GetFontStruct
- Tk_NameOfFontStruct
- Tk_FreeFontStruct}
- {GetGC 3
- Tk_GetGC
- Tk_FreeGC}
- {GetJoinStl 3
- Tk_GetJoinStyle
- Tk_NameOfJoinStyle}
- {GetJustify 3
- Tk_GetJustify
- Tk_NameOfJustify}
- {GetOption 3
- Tk_GetOption}
- {GetPixels 3
- Tk_GetPixels
- Tk_GetScreenMM}
- {GetRelief 3
- Tk_GetRelief
- Tk_NameOfRelief}
- {GetRootCrd 3
- Tk_GetRootCoords}
- {GetSelect 3
- Tk_GetSelection}
- {GetUid 3
- Tk_GetUid
- Tk_Uid}
- {InternAtom 3
- Tk_InternAtom
- Tk_GetAtomName}
- {ManageGeom 3
- Tk_ManageGeometry}
- {MapWindow 3
- Tk_MapWindow
- Tk_UnmapWindow}
- {Name 3
- Tk_Name
- Tk_PathName
- Tk_NameToWindow}
- {OwnSelect 3
- Tk_OwnSelection}
- {ParseArgv 3
- Tk_ParseArgv}
- {Preserve 3
- Tk_Preserve
- Tk_Release
- Tk_EventuallyFree}
- {RegInterp 3
- Tk_RegisterInterp}
- {RestrictEv 3
- Tk_RestrictEvents}
- {SelHandler 3
- Tk_CreateSelHandler}
- {SetClass 3
- Tk_SetClass
- Tk_Class}
- {SetGrid 3
- Tk_SetGrid}
- {Sleep 3
- Tk_Sleep}
- {TimerHndlr 3
- Tk_CreateTimerHandler
- Tk_DeleteTimerHandler}
- {WindowId 3
- Tk_WindowId
- Tk_Display
- Tk_DisplayName
- Tk_ScreenNumber
- Tk_Screen
- Tk_X
- Tk_Y
- Tk_Width
- Tk_Height
- Tk_Changes
- Tk_Attributes
- Tk_IsMapped
- Tk_ReqWidth
- Tk_ReqHeight
- Tk_InternalBorderWidth}
- {bind 1
- bind}
- {button 1
- button}
- {checkbuttn 1
- checkbutton.1}
- {destroy 1
- destroy}
- {entry 1
- entry}
- {focus 1
- focus}
- {frame 1
- frame}
- {grab 1
- grab}
- {label 1
- label}
- {lbSingSel 1
- tk_listboxSingleSelect}
- {listbox 1
- listbox}
- {menu 1
- menu}
- {menubuttn 1
- menubutton}
- {message 1
- message}
- {option 1
- option}
- {options 1
- options}
- {pack 1
- pack}
- {place 1
- place}
- {radiobuttn 1
- radiobutton}
- {scale 1
- scale}
- {scrollbar 1
- scrollbar}
- {selection 1
- selection}
- {send 1
- send}
- {text 1
- text}
- {tkerror 1
- tkerror}
- {tkwait 1
- tkwait}
- {toplevel 1
- toplevel}
- {traversal 1
- tk_menus}
- {traversal 1
- tk_bindForTraversal}
- {update 1
- update}
- {variables 1
- variables}
- {winfo 1
- winfo}
- {wish 1
- wish}
- {wm 1
- wm}} {
- set src [lindex $i 0]
- set sec [lindex $i 1]
- puts stderr "$src... " nonewline
- flush stderr
- foreach j [lrange $i 2 end] {
- exec ln $FROMDIR/$src.man $MANDIR/man$sec/$j.$sec
- }
- }
- puts stderr done.
- exit
- --
- Hume Smith Wenn ich des Tages nicht dreimal
- hume.smith@acadiau.ca mein Schaelchen Coffee trinken darf,
- emcoop@bnr.ca so werd' ich ju zu meiner Qual
- wie ein verdorrtes Ziegenbraetchen. (BWV 211)
-
-
-
-