xwpe(1.4)
NAME
xwpe, xwe, wpe, we - XWindow Programming Environment
SYNOPSIS
xwpe [ options ] file ...
xwe [ options ] file ...
wpe [ options ] file ...
we [ options ] file ...
DESCRIPTION
XWPE can be used with or without the programming inter-
face. It has its own X interface but can be used also on
a character terminal. xwpe fires up the X interface
together with the programming interface. xwe is the X ver-
sion but without the special features of the programming
interface. In connection with a simple character terminal
you can use wpe to programme and we as editor.
xwpe is a X-window programming environment designed to use
on UNIX-systems. It is similar to 'Borland C++ or Turbo
Pascal' environment. The difference between the program-
ming environments from Borland an xwpe is that many com-
pilers and linkers may be started. From a menu three dif-
ferent debuggers can be chosen. And of course not only key
strokes can select these options you can also use a mouse.
Errors that occur while compiling and linking a programme
can be examined in the sources: The cursor will jump to
the corresponding line in the source-file. Programmes
using more than one source-file can be managed with the so
called project-option (see also project-file). The pro-
gramme can be started from within the Programming-Environ-
ment and errors may be found using a debugger. The debug-
ging-environment allows the user to set and unset break-
points directly in the source code. The contents of vari-
ables may be displayed in a special window, the Watch-Win-
dow. This window is updated while reaching a breakpoint.
The Stack-Window displays the programme stack.
Help is available for xwpe and the man-pages installed on
the system may be displayed. All this can be reached via
the help-functions.
The editor may be used to edit up to 35 files at the same
time. They are all displayed in a window of their own. A
mouse is used to select special editor function from the
top menu. These function can also be selected by hitting
a special key or combinations of keys. Some of these fea-
tures are a complete search and replace function (yes, it
can search for regular expressions) and a file-manager.
The file-manager is used to open, copy, rename and move or
delete files.
The X-window programming environment can be used without
the special programming features. If it is invoked as
`xwe' (`we' if used with a character terminal) it can be
used as a editor e.g. for shell-programming.
COPYRIGHTS
Copyright (C) 1993 Fred Kruse xwpe is free; anyone may
redistribute copies of xwpe to anyone under the terms
stated in the GNU General Public License. The author
assumes no responsibility for errors or omissions or dam-
ages resulting from the use of xwpe or this manual.
OPTIONS
-so The default options are used. The option file will
not be read.
-sc The default colors will be used. All other options
are read from the option file.
-sf option file will be used instead of the default
file ($HOME/.wpe/wperc).
-r Start xwpe in the recover mode. The internal
buffers are saved in files with the postfix `.ESV'
in the name if a signal is catched by xwpe (except
for SIGKILL). If the editor is invoked with the
`-r' option is specified in the command line, the
old session will be recovered.
-mb The next file has to be treated as a binary file.
-mn The next file is an ASCII-file (default)
-nc N is an integer specifying the maximum number of
columns that will be used.
-nu The integer N gives the maximum number of steps
saved for undo.
-nm The number of steps before an auto-save will be
done.
-k The next file should be decoded with `password' for
reading and also be encoded for writing.
-pm The next file is a message-file.
Command-line options used together with XWindow:
-display
Output to Display 'Disp'
-fn
-font
-g
-geometry
(e.g. -g 80x20+4+4)
-iconic
Start xwpe as icon.
INITIALISATION FILES
xwpe reads the initialization file
wperc
If this file is found in the directory ../lib/wpe
(relatively to the programming environment xwpe) it is
used for all users. Each user can save it's personal
options in the file $HOME/.wpe/wperc (this is the default
path). When xwpe is started, it tries to read the personal
wperc file. If this file can't be found the system wide
initialization file will be read. Only if this file does
not exist the default options will be used.
wperc is a binary file written by the programming environ-
ment itself and saving all selected options (see also
Options-Menu).
The following resources are available. (They are normally
stored in the file .Xdefaults.)
xwpe.font:
The font that should be used (8x13, 9x15, 10x20,
8x13bold, 9x15bold, 10x20bold)
xwpe.geometry:
xwpe.iconic:yes
Start xwpe as icon.
xwpe.color1:
...
xwpe.color16:
xwpe uses 16 colors. The default setting is alike
the PC-colour set.
ATTENTION:
The file .wperc created by Version 1.3.1 or less should be
deleted.
The file .xwperc created by Version 1.2.1 or less is not
recognized anymore and can be deleted.
All those initialization files and help files in the pri-
mary directory of xwpe should be deleted if Version 1.3.1
or newer is used.
The Main-Menu
The WE-menu system is entered by pressing F10, ALT-<SP>
(or <ESC>) from within the editor window. It can be left
by pressing <ESC>. A sub menu can be called directly by
pressing ALT-<highlighted letter>.
Here is a list of those sub menus:
System-Menu Environment-management
File-Menu file managing
Edit-Menu all functions used for editing
Search-Menu search and replace
Block-Menu block-commands used in the editing
windows.
Run-Menu Programming-Environment (only available
for wpe and xwpe)
Debug-Menu debugging-environment (not available for
we and xwe)
Project-Menu programming with more than one source
file (only wpe and xwpe)
Options-Menu toggle options
Window-Menu window management
Help-Menu yes, this is the help system
The System-Menu (Alt-#):
About WE A Display version number and
copyright.
Clear Desktop C Close all windows.
Repaint Desktop R Initialize the desktop and
reopens all windows.
System Info S Displays the current filename,
directory, ...
Show Wastebasket W Display the files saved in the
wastebasket (file-manager).
Delete Wastebasket D Empty wastebasket.
File-Menu (Alt-F):
File-Manager M Puts the file-manager-window on top.
If it is not found a new one is
opened.
ADd F.-Mng. D Opens a new file-manager-window.
New N Open a new file 'Noname'.
Save S Save this file using the `old' name.
Save As A Use a new name to save this file
(see also file-manager)
Save ALl L Save all files that were changed.
Execute E Execution-Manager
SHell H Start a UNIX-Shell.
Find F Search for a file name (see Find).
Grep G Search for a regular expression in
files (see also Grep)
Print P Print this file.
Quit Q Quitting XWPE
The Edit-Menu (Alt-E):
Cut T Delete the marked text and copy it
into the clipboard.
Copy C Copy the marked text into the
clipboard.
Paste P Insert the buffer behind the cursor.
Show Clipboard S
Delete D Delete the marked text.
Undo U Undo the last change in the text.
Redo R Do the last change one time more.
Load XBuffer L Copy the XWindow-buffer into xwpe's
paste-buffer.
Write to XBuffer W Just the other way round.
The Search-Menu (Alt-S):
Find F Search for a regular expression.
(see also
Search and Replace Functions)
Replace R Search and replace a regular
expression. (see also
Search and Replace Functions)
Search again S Repeat the last Find/Replace.
Go to Line G
The Block-Menu (Alt-B):
Begin Mark B Mark the beginning of a block.
End Mark E Set the end-mark.
Mark Line L Mark this line.
Mark Whole W Mark the entire scope.
Goto Begin G Jump to the beginning of this block.
Goto End N Jump to the end of this block.
Copy C Copy this block.
Move M Move this block.
Delete D Delete this block.
Hide H Delete the set block-marks.
Read R Insert a file at the cursor position.
Write W Write a block to a file.
Move to Right I Move a block to the right.
Move to Left T Move a block to the left.
A block can also be marked by pressing `^k b' at the
entire beginning and `^k k' at the end of the desired
block.
xwpe (and xwe) allows marking a block with the mouse:
Holding down the left button and moving over the text
marks it as block. Holding down Shift and moving with the
text cursor around also marks a block.
The Run-Menu (Alt-R):
Compile C Compile a programme.
(see Programming-Environment)
Make M Create an executable.
Run R Create an executable and start
it.
Install I Install a project.
(see also project-file)
Execute make E Start make(1).
Next Error N Jump to the next Error.
Previous Error P Jump to the previous Error.
Show Definition S Find the definition of an
expression. (see also
Commands used for Programming C
Show Next Def. X Find next definition of an
expression. (see also
Commands used for Programming C
Matching Bracket K Find the matching bracket.
(see also
Commands used for Programming C
Beautify B Beautify a programme.
(see also
Commands used for Programming C
Arguments A Enter the arguments used to
start a programme.
The Debug-Menu (Alt-D):(see also Debugging-Environment)
Toggle Breakpoint B Set/remove a breakpoint.
ReMove all Breakp. M Remove all Breakpoints.
Make Watch W Select a variable to watch.
(see also Watch-Window)
Edit Watch E Edit a watched variable.
Delete Watch D Delete a watched variable.
Remove All Watches A Delete all watched variables.
Show StacK K Show the stack. (see also
Stack-Window)
Step S Execute next programme line
(step into any function).
Next N Execute next programme line
(step over any function).
Run/Continue R Start/continue debugging.
Quit Q Exit the debugger.
The Project-Menu (Alt-P):
Open Project P Input a project-file.
The Project-Window is opened.
Close Project C Stop using a project.
Add Item A Add a file to this project.
Delete Item D Delete this file from the project.
Options O Project-Options
Adjust Colors A Change the colors.
Read Colors R Use the default colors or those
from the initialization file.
Save Options S Save all changes to the options.
Editor E Options used by the editor.
(see also Editor-Options)
File-Manager F Options used by the file-manager
(see also File-Manager-Options)
Programming G Options used by the programming-
environment (Stop at error/warning)
(see also Syntax-Support)
Compiler C Change the options for compilers
(see also Compiler-Options)
Debugger D Select the debugger (gdb, sdb, dbx)
and full-screen/normal mode.
The Window-Menu (Alt-W):
Size/Move S Resize and move this window.
Zoom Z Maximise this window.
Tile T Put all windows one beside the
other.
Cascade A Put all windows like a cascade
one over another.
Next X Choose the next window in the list.
Close C Close this window.
List All L Display a list of all windows. A
window can be selected by pressing
<CR> or Alt-<s>.
Output Window O Display the output (not X11).
Messages M The Message-Window will be opened.
Project P The Project-Window will be opened.
Watches W The Watch-Window will be opened.
The Help-Menu (Alt-H):
Editor E Help to the editor (WE)
FUnction Index U Index to all UNIX-functions
(see also Function-Index)
Function F UNIX man-pages.
Info I The GNU-infosystem.
Goto G Goto help page
Back B Goto the page you see before
Next N Goto the next page
Previous P Goto the previous page
Control-character sequences (special keys)
How to enter the special keys Alt and ESC on a UNIX system
(without XWindow):
Alt-X - is realized by pressing <ESC> X. (X is a print-
able character.)
ESC - is realized by the sequence <ESC> <Return>.
The following functions can be reached by control-charac-
ter sequences:
Cursor-Movement
Editing
Deleting
Block-Commands
Marker-Commands
Search- and Replace-Commands
Buffer-Commands
Read and Save
Window-Commands
Run-Commands
Commands used for Programming C
Debug-Commands
Help-Commands
Quit XWPE
Cursor-Movement:
up arrow
Ctrl P move the cursor one line up
down arrow
Ctrl N move the cursor one line down
right arrow
Ctrl F move the cursor one character right
left arrow
Ctrl B move the cursor one character left
Ctrl right arrow
Alt right arrow move the cursor one word right
Ctrl left arrow
Alt left arrow move the cursor one word left
Home
Ctrl A move the cursor to column 1
End
Ctrl E move the cursor to the last column
Ctrl up arrow
Page Up move the cursor one window up
Ctrl down arrow
Page Down move the cursor one window down
Ctrl Page Up
Alt Ctrl A goto first row
Ctrl Page Down
Alt Ctrl E goto last row
Ctrl Home
Alt Ctrl P goto first row of this window
Ctrl End
Alt Ctrl N goto last row of this window
<Return> Insert a line-break.
(see also Automatic Indentation)
Ctrl H
<Backspace> Delete a character backwards.
(see also Automatic Indentation)
Ctrl D
Del Delete the character the cursor is on.
<Tab> Indent the text.
(see also Automatic Indentation)
Alt-I Switch insert to overwrite mode and
Insert vice versa.
Alt-J Switch to special-character-insert-mode.
Deleting:
Ctrl T Kill the next word after the cursor.
Ctrl O T Kill the word immediately before the
cursor.
Ctrl Y Delete a whole line
Ctrl Z
Ctrl O Y Kill from the cursor position to the end
of line.
Block-Commands:
Shift + Cursor-movement
mark a block
Ctrl K B Set the beginning mark
Ctrl K K Set the end mark
Ctrl K L Mark this line
Ctrl K X Mark the whole document
Ctrl K A Jump to the beginning mark
Ctrl K Z Jump to the end mark
Ctrl K C Copy block
Ctrl K V Move block
Ctrl K Y Kill block
Ctrl K H Hide block
Ctrl K R Insert a file at the cursor position
Ctrl K W Write a block to a file
Ctrl K I Shift a block to the right
Ctrl K U Shift a block to the left
Ctrl K n Set the marker no. n ( n = 1 - 9 )
Ctrl O n Jump to the marker no. n
Search- and Replace-Commands:
Find
F4
Ctrl O F Search for a string
Alt-F4
Ctrl O A Replace a string with another string
Ctrl-F4
Ctrl L Repeat the last search or replace
Alt G Goto line
Buffer-Commands:
Cut
Shift Del
Ctrl X Kill the marked text to the kill-buffer
Copy
Shift Insert
Ctrl C Copy the marked text to the kill-buffer
Paste
Ctrl Insert
Ctrl V Copy the kill-buffer to the cursor
Ctrl W Display the kill-buffer
UNDO
Ctrl U Undo an unwanted change
REDO
Ctrl R Undo the last undo
Alt Delete Copy the marked text to the X-buffer
Alt Insert Copy the X-buffer to the cursor
Read and Save:
Open
F3 Start the file-manager (Open a file etc.)
F2 Save the file
Window-Commands:
Alt-Z
F5 Zoom the window (maximum size)
Ctrl F5
Alt-F2 Resize and move the window
F6
Alt-N Switch to the next window
Alt-F3 Close this window
Shift F4 Put all windows one beside the other
Shift F5 Put all windows like a cascade one
over another.
Run-Commands:
Alt F9
Alt C Compile (see also Programming-Environment)
F9
Alt M Create an executable
Ctrl F9
Alt R Create an executable and start it
Alt L Install a project (see also project-file)
Alt A Start make(1)
Alt V Jump to the previous error
(see also Message-Window)
Alt T Jump to the next error (see Message-Window)
Commands used for Programming C:
Ctrl O S Search the definition of an expression
(see Programming C)
Ctrl O N Search for the next definition of an
expression (see Programming C)
Ctrl O K Search for a corresponding bracket
(see Programming C)
Ctrl O B Beautify C-source code (see Programming C)
Debug-Commands:
Ctrl F10
Ctrl G R Start the debugger (see
Debugging-Environment)
Ctrl F2
Ctrl G Q Quit the debugger
F7
Ctrl G S Execute next programme line
(step into any function)
F8
Ctrl G N Execute next programme line
(step over any function)
Ctrl F8
Ctrl G B Set/remove a breakpoint
Ctrl G M Remove all Breakpoints
Ctrl F7
Ctrl G W Select a variable to watch
(see also Watch-Window)
Ctrl G E Edit a watched variable
(see also Watch-Window)
Ctrl G D Delete a watched variable
(see also Watch-Window)
Ctrl F6
Ctrl G K Show the stack. (see also Stack-Window)
Ctrl G O Display the output (not X11)
Help-Commands:
F1 Help to the editor (WE)
Alt F1 UNIX man-pages
Ctrl F1 Index to all UNIX-functions
(see also Function-Index)
Quit XWPE
Alt-X Quit from XWPE
Changing the Control-character sequences
(Common User Access):
Some function-keys may be used in a second form which is
compatible to OSF-Motif and MS-Windows.
These are the changes:
Window management:
F6 -> Ctrl F6 Select next window
Alt F3 -> Ctrl F4 Close window
F5 -> Shift F6 Zoom
Search and Replace:
Ctrl F4 -> F3 Search again
F4 -> Alt F3 Search
Alt F4 -> Ctrl F3 Replace
File operations:
F3 -> F2 Start the file-manager
F2 -> Alt F2 Save
Debugger:
Ctrl F8 -> F5 Set a breakpoint
Ctrl F7 -> Ctrl F5 Watch
Ctrl F6 -> Ctrl F3 Call stack
Quit from XWPE:
Alt X -> Alt F4
Quitting XWPE:
Files that are NOT changed will be closed without any
warning after the Quit-command is send. If any changes
have not been saved, xwpe displays a warning message and
allows the user to save these files:
Yes Save the file
No Close without save
ESC Cancel from quit (no more files are closed)
The Editor
The editor may be used to edit up to 35 files at the same
time. They are all displayed in a window of their own
(Editor-Window).
The functions of this editor may be selected by pressing a
special key, using the mouse or selecting it from the
menu. These functions are, besides killing or inserting
single characters from/into the text:
Copy, move and delete a block in one file (see also Block-
Menu).
Copy, move and delete a block between different files (see
also Edit-Menu).
Search and replace strings (see also Search-Menu).
Resize and move the windows used to edit files (see also
(Window-Menu).
Change the behavior of the editor (see also Options-Menu).
Edit, save and manipulate files (see also File-Menu).
Using the Help-Functions
If the help is selected, a separate window is opened which
displays a case-sensitive help. If Help/Editor is selected
the contents of the editor-functions-help will be dis-
played.
Most documents include links to other help-pages. They are
highlighted and may be selected by clicking on them with
the mouse or pressing <CR> after the cursor is moved over
them.
By pressing <Backspace> the last visited help-page is re-
displayed. This can be done also by clicking on the high-
lighted title.
Programmer also want to take a look at Help-Menu.
The File-Manager
The purpose of the file-manager is to select files, create
new directories, copy files and directories, move and
rename files and directories, delete and change the access
permissions of files and directories.
Alt-N Select the 'Name'-line where the default entry may
be changed. If the entry is
1. a existing file, pressing <Return> will open
this file for editing
2. a new (non-existing) file, pressing <Return>
will be created
3. a mask (regular expression) selecting the files
for the 'Files'-menu. '*' matches all characters,
one charter in the range of "a..z". Pressing
<Return> will select all matching files and the
Alt-F Select the 'Files'-menu which shows all files in
the selected directory. The marked file can be
opened by pressing <Return> or Alt-E.
Alt-D Select the 'Directory'-line. The working directory
may be entered here. <Return> selects the w.d.
Alt-T Select the tree of directories. Pressing the cursor
keys walks through the tree, <Return> selects the
working directory.
Alt-C Change the working directory to the one entered in
the
Alt-E The file selected in the 'Name'-line will be opened
for editing.
Alt-P The last edited file will be replaced by a new win-
dow selected in the 'Name'-line.
Alt-M Rename or move into another directory.
Alt-U Duplicate the marked file. The new name is [old-
name].dup.
Alt-R Delete the marked file. The file will be moved into
the wastebasket or removed from the disk, this can
be selected from File-Manager-Options.
Alt-L Create a link for the marked file. If possible, a
hard link will be created. Only if a directory or
files that are saved on different disk-partitions
are selected a soft link will be used.
Alt-O The file will be copied. The new name must be
entered.
Alt-K Make a new directory named "new.dir". This name may
be changed.
Alt-A Change the file attributes.
Alt-S (only avail-able in function Save As) The file will
be saved using the name displayed in the line
'Name'.
<<ESC>> Quit the file-manager.
The Execution-Manager:
The purpose of the execution-manager is to start exe-
cutable files and shell-scripts. Only files with execute-
attribute will be selected in the 'Files'-menu.
Alt-N Select the 'Name'-line where the default entry may
be changed. If the entry is
1. a existing file, pressing <Return> will be exe-
cuted.
2. a mask (regular expression) selecting the files
for the 'Files'-menu. '*' matches all characters,
one character in the range of "a..z". Pressing
<Return> will select all matching files and the
Alt-F Select the 'Files'-menu which shows all files in
the selected directory. The marked file can be
opened by pressing <Return> or Alt-E.
Alt-D Select the 'Directory'-line. The working directory
may be entered here. <Return> selects the w.d.
Alt-T Select the tree of directories. Pressing the cursor
keys walks through the tree, <Return> selects the
working directory.
Alt-C Change the working directory to the one entered in
the
Alt-E The file selected in the 'Name'-line will be opened
for execution by the OS.
<<ESC>> Quit the execution-manager.
Programming-Environment
If a Project-File is selected this project will be com-
piled, linked and executed from the Run-Menu. If there is
no project the file in the current window will be taken as
target. The compiler / linker is selected automaticly by
xwpe and is distinguished by the file-name postfix. The
compiler and its options may be selected in the menu
Run/Options (see also Compiler-Options).
Only those files which were never compiled or which have
been changed since the last time they were compiled are
compiled (and linked). Changes in 'include'd files are
only considered for C-programmes.
Error in compilation and linking are listed in the Mes-
sage-Window. These errors stop the creating process and
the file that contains the error will be opened and the
cursor will be set in the corresponding line.
The Debugging-Environment
The Debug-Menu is used to set breakpoints in the source
code and to start debugging. If the debugger stops the
corresponding line in the source is marked. Files will be
opened if necessary.
Stops are caused by breakpoints or signals.
In the Watch-Window the contents of selected variables and
constants are displayed after each stop.
The stack is displayed in the Stack-Window after a stop.
Find:
Find starts a search for files in a specified directory.
This search may be recursive.
Alt-L Enter the filename or a file-mask as described in
File-Manager.
Alt-I Enter the starting directory for the search.
Alt-K Enable a recursive search.
Alt-O Start.
<<ESC>> Break find.
All those directories containing matching files are
listed in the Find-Window.
Search for files containing a substring. The files
selected for the grep must match an expression also
used for the File-Manager.
Alt-T Enter the string to search.
Alt-C Distinguish between small and capital letters.
Alt-W Only search for whole words.
Alt-R Search for regular expressions. (See Search and
Replace Functions)
Alt-L Enter a file-name or a file-mask, as described in
File-Manager, to search in.
Alt-I The directory to search in.
Alt-K Also search in sub-directories.
Alt-O Start the search.
<<ESC>> Don't search any further.
All those files containing matching strings are
listed in the Grep-Window.
Alt-T Enter the string to searched.
Alt-N New string that replaces the old one. (Only used
for Replace)
Alt-C Distinguish between small and capital letters.
Alt-W Only search for whole words.
Alt-R Search for regular expressions. The following regu-
lar expressions (like (e)grep(1)) may be used:
^ Matches the empty string at the beginning of a
line.
$ Matches the empty string at the end of a line.
. The period matches any single character.
[] A list of characters enclosed by [ and ] matches
any single character in that list.
[^ ] Matches any single character not in the list of
characters enclosed by [ and ].
[ - ] A range of ASCII characters is represented by giv-
ing the first and the last character separated by a
hyphen.
* The character in front of the asterix is repeated
zero or more times.
+ The character in front of the plus is repeated one
or more times.
? The character in front of the question mark is
repeated zero or once.
| OR: OR separates two strings of which one will
match.
\fP The character after the \ will not be interpreted
as special character.
Alt-P (Replace only) Ask before each replacement. Possi-
ble answers are:
Yes Y Replace text
No N Don't replace text
<ESC> Stop search
Alt-D Search forward.
Alt-B Search backward.
Alt-G Search in the whole text.
Alt-S Only search in the marked block.
Alt-F Start search from cursor-position.
Alt-E Search from the text or block beginning.
<<RETURN>>
Search/Replace only one time than stop.
Alt-A Execute all replacements till the end of the entire
scope. (Replace only)
<<ESC>> Don't search any further.
Function-Index:
XWPE creates a list of all manual-pages that can be found
in the search-path given by the environment variable MAN-
PATH.
The index is distinguished in the following sections:
User Commands
System Calls : C - functions
C-Lib.-Functions : C - functions from the C -library
Devices & Network Interface
File Formats
Games & Demos
Environments, Tables and TROFF Macros
Maintenance Com. : Administrations commands
After the section is selected a list of all manual pages
belonging to that section will be displayed. One of these
pages may be selected by pressing <Return> or clicking on
the name. A new window appears containing the manual page.
A manual page can also be selected by giving its name in
the Menu Help/Functions.
Manual pages are read-only documents (like all other help
files too). But they can be used as source for editing
commands.
The Editor-Window
If a file has to be edited the Editor-Window is used. The
mouse (see also The Mouse in the Editor-Window), function
keys or the editor-menu can be used to edit a text.
The most important menus are:
Copy, move and delete a block in a file (see Block-Menu).
Copy, move and delete a block between different files (see
also Edit-Menu).
Search and/or replace strings (see also Search-Menu).
Resize and move the windows (see also Window-Menu).
Change the options used by the editor in the Options-Menu.
Files may be selected, saved and changed in the File-Menu.
The Find-Window
The Find-Window is used to list all directories in which
the searched file was found. Alt-S and <Return> open a
File-Manager for the selected directory which displays all
found files. <ESC> closes this window.
The Grep-Window
The Grep-Window is used to list all files in which the
searched string was found. Alt-S and <Return> open the
marked file for editing. The cursor jumps to the first
occurrence of the searched string. <ESC> closes this win-
dow.
The Message-Window
Errors in compilation and linking are listed in the Mes-
sage-Window which is a read-only file. An error can be
selected by moving around using the cursor-keys and press-
ing <Return> or by using the mouse.
If an error is selected, the file causing this error will
be opened and the cursor jumps to the found line. This
file is (normally) read-write and can be edit immediately
so that the next trial can be started.
The Project-Window
All those files that are listed in the project-file will
be displayed in the project-window which is started from
the Project-Menu or from the Window-Menu. New files may
be entered by pressing Alt-A (Add) or <Ins> directly form
the file-manager. An already existing entry may be
changed after it is selected by Alt-E (Edit) or <CR> or be
deleted by pressing Alt-D (Delete) or <Del>. Alt-O enters
the Project-Options and <ESC> closes the project-window.
The Variable-Window
In the Project-File variables may be selected, they are
displayed in the variable-window which can be started from
the Project-Options. Alt-A (Add) and <Ins> are used to
enter a new variable, Alt-E (Edit) and <CR> change an
existing entry and Alt-D (Delete) and <Del> are used to
delete an entry. <ESC> will close this window.
The Install-Window
This window is selected from the Project-Options and used
to display and change those commands which will be exe-
cuted to install a file/project. Alt-A (Add) and <Ins>
are used to enter a new command, Alt-E (Edit) and <CR>
change an existing entry and Alt-D (Delete) and <Del> are
used to delete an entry. <ESC> will close this window.
The Watch-Window
This window displays read-only values from variables
selected in the watch-function (see also Debug-Menu).
To search for an entry the cursor keys may be used to walk
around and the search-function finds a variable. Other
possible functions are:
<<Return>>
Edit a selected variable.
<<Return>>
Enters a new variable if the last line of this file
is selected.
<<Insert>>
Insert a new variable at this position in the file.
<<Del>> Delete this entry.
If a variable is not found in the current context a
warning is displayed.
Stack-Window
The stack history is displayed in this window, but it
can't be edited.
The cursor keys are used to walk around in this list and
the search-function will find an entry. <Return> will jump
within the stack (this is not possible together with the
The stack may be examined if a signal is catched by the
programme. If this happens within a system-function than
the calling visible function is shown.
Usage of the mouse with XWindow:
All those keystrokes used to select from within a menu or
mark a block can be replaced by using the mouse. A command
will be selected by one click on the word or the corre-
sponding line. A click on the 'Cancel'-command or the
upper left 'Close-Button' will close a window.
The mouse can be used within the editor-window (see the
Mouse in the Editor-Window) and within the file-manager
(see Mouse in the File-Manager).
The Mouse in the Editor-Window
All those keystrokes used to select from within a menu or
mark a block can be replaced by using the mouse. A command
will be selected by one click on the word or the corre-
sponding line. A click on the 'Cancel'-command or the
upper left 'Close-Button' will close a window.
The upper right button labeled with [z] is the Zoom-Button
used to zoom a window.
A click on the upper frame and moving the mouse while
holding the left button down will move the window.
Resizing a window is done be clicking on an edge and mov-
ing the mouse around while holding the button down.
A line is selected by clicking on the line-number on the
lower frame. A new window is opened to enter a new number.
The right and the lower border move the cursor around in
the window. The cursor moves one line/character if the
arrows at both ends of the borders are selected. A whole
page is the size of the movement if a click is set on the
border itself. Moving the marker will move the displayed
entry around.
Function within the window:
The left mouse-button:
One click will move the cursor to the corresponding posi-
tion.
If the button is pressed while the mouse-cursor is over
the text-cursor a word is marked. A marked word being
marked again selects the whole line.
Holding the button down and moving the mouse around is
used to mark an array. If <Shift> is pressed, too, the new
text will be added to the previous selected one.
The right mouse-button:
Clicking the right button will copy the marked text into
the buffer. The Alt-key selects the X-buffer.
Shift selects the cut-option: The text is copied into the
selected buffer and is cut from the file.
The middle mouse-button:
Clicking the middle button will copy the contents of the
buffer at the mouse-position (Paste). The Alt-key selects
the X-buffer.
The Mouse in the File-Manager:
All those keystrokes used to select from within a menu or
mark a block can be replaced by using the mouse. A command
will be selected by one click on the word or the corre-
sponding line.
A click on the Cancel-command or the upper left Close-But-
ton will close the file-manager.
The upper right button labeled with [z] is the Zoom-Button
used to zoom a window.
A click on the upper frame and moving the mouse while
holding the left button down will move the window.
Resizing a window is done be clicking on an edge and mov-
ing the mouse around while holding the button down.
The right and the lower border move the mark around in the
files-list and in the tree. The cursor moves one line if
the arrows at both ends of the borders are selected. A
whole page is the size of the movement if a click is set
on the border itself. Moving the marker will move the dis-
played entry around.
Function within the window:
The left mouse-button:
One click will mark a not selected file or directory. A
marked file is selected for loading into the editor on a
second click. A marked directory becomes the current work-
ing directory after clicking again on it's name.
A marked file may be moved into another directory if the
left button is held down while moving the mouse-pointer
into the directory displayed in another file-manager win-
dow.
The right mouse-button:
Clicking the right button on an already marked file or
directory will call the Move/Rename-function.
A link is created by "moving" a file or directory into
another file-manager-window. The link will be created in
the current selected working directory in the other win-
dow.
The middle mouse-button:
To duplicate a file or directory in the current directory
just click with the middle mouse-button on its marked
name.
A copy into another directory is performed by holding down
the middle button while moving the mouse-pointer into
another file-manager window.
Editor-Options
Data:
Alt-A If this option is selected the next file loaded
will be treated as ASCII-file.
Alt-B The next file loaded will be a binary file.
Display:
Alt-S The end-of-line will be displayed as '$' if a <NL>
was entered and as '' as NULL (the next line the
connecting line).
Auto-save:
Alt-P All options will be saved after the quitting the
editor.
Alt-H After N changes a file will be saved automaticly.
The number N can be entered/changed in the Max.
Changes -field (Alt-X). For the saved file 'file-
name'.ASV will be used as new file-name, the origi-
nal file is not changed. After a normal quit from
xwpe the .ASV-files are deleted.
Keys (Setting up the function keys):
Alt-L The function keys are bind like introduced in xwpe
version < 1.2.0 (Turbo C alike).
Alt-C The 'Common User Access' function key binding will
be used (MS-Windows alike).
Auto-Indent (Automatic Indentation):
Alt-Y Auto-Indent is used only for files that can be used
for compilation (that are defined in the
Option/Compiler -menu).
Alt-W Auto-Indent is used for all files.
Alt-V Don't use Auto-Indent.
Alt-M The maximum number of columns per row. After this
number or columns a word wrap is performed.
Alt-T The number of characters a TabStop counts.
Alt-X The number of changes that force an auto-save (if
enabled).
Alt-N The number of steps that are saved for an undo
(Edit/Undo).
Alt-I The number of columns used for auto-indent.
File-Manager-Options
Directories:
Alt-F Hidden files are displayed.
Alt-D Hidden directories are displayed.
Alt-K All actions (Move, Link, Copy and Remove) are
recursive (sub directories will be used as source
too).
Sort Files By:
Alt-N Name
Alt-I Time (time of creation time)
Alt-B Bytes (Size)
Alt-R Reverse order.
Move/Copy:
Alt-Q If the source of a Move/Copy-operation already
exists it is only overwritten after a confirmation.
Alt-V An existing files is overwritten.
Alt-T Existing files are not overwritten.
Remove:
Alt-W Deleted files are moved into the wastebasket.
Alt-A Files are really deleted. A confirmation is neces-
sary.
Alt-M Files are really deleted. No confirmation.
Links on Files:
Alt-H First try a hard-link. If this does not succeed a
soft-link is used.
Alt-S Use a soft-link.
Wastebasket:
Alt-P After exit of xwpe a confirmation for deleting the
files in the wastebasket is necessary.
Alt-E The contents of the wastebasket is removed.
Alt-L The contents of the wastebasket is not removed.
Compiler-Options
If the Menu Run/Options is selected the entries Add Com-
piler and Remove Compiler and all compilers that are
defined are displayed.
If Add Compiler or a defined compiler is selected the fol-
lowing options menu is enabled:
Language
The name of the programming language.
Compiler
The path to the compiler.
Compiler-Options
Options used by the compiler.
Loader-Options
Options used to link the files.
Executable-Name
The name of the resulting executable (default:
[programme-name].e).
File-Postfix
The postfix that forces this compiler to be used
(e.g. .c implies to use the C-compiler).
Compiler-Style
Select whether error-messages are created like a
GNU or similar compiler would create it or whether
the definition for messages entered in the Message-
String should be used.
OK Accept the changes made.
CANCEL Reject the changes.
A new compiler/programming language can be entered in
Add Compiler. If the new one is selected its options may
be changed.
A compiler selected from the list is removed by Remove
Compiler.
Project-Options
Compiler
The path to the compiler.
Compiler-Options
Options used by the compiler.
Loader-Options
Options used to link the files.
Executable-Name
The name of the resulting executable (default:
a.out).
Store Objects in Library
If a filename is entered this file is used as
library to all object-files. This library is used
automaticly for linking.
Compiler-Style
Select whether error-messages are created like a
GNU or similar compiler would create it or whether
the definition for messages entered in the Message-
String should be used.
Variables ...
Variables used by the project can be entered and
removed from a separate Variable-Window.
Install ...
The commands used to install a programme are edited
in the Install-Window.
Save The new project-file will be saved.
Save As
The new project-file will be saved with a new file-
name.
CANCEL Quit from the menu without any changes.
Programming C
For all C- and C++-programmes there are some utilities
installed to aid the programmer:
Show Definition (^O S):
Jump to the definition of a C-expression: The file con-
taining the definition of the entered expression will be
put in the foreground and the cursor jumps to the defini-
tion which will be highlighted. Structs, unions, classes,
typedefs, preprocessor definitions, extern variables and
functions can be searched. If a project is defined all
files belonging to it will be scanned for the definition.
Also all #include'd files are scanned recursively as long
as they can be found in the System-Include-Path defined in
Options/Programming.
If the name is used more than one time in definitions
(e.g. as name of a struct and as name of an external
variable) the next definition may be found with ^O N (Show
next Definition).
Matching Bracket (^O K):
If the cursor is above a bracket the corresponding closing
/ opening bracket is searched and the cursor is moved to
it. Otherwise the cursor is moved to the next opening
bracket. The following pairs of brackets are recognized:
{}, [] and ().
Beautify (^O B):
As C is a block-oriented language all blocks are indented
equal. The depth of the intention depends on the degree of
the blocking-depth.
The project-file
The project-file allows to compile and create programmes
containing more than on module. It is created from the
menu Project/Options (see also Project-Options) or
directly with an editor. The syntax corresponds to that of
a Makefile (for version 1.1.0 and above only). In a pro-
ject-file only definitions of variables and install-tar-
gets are recognized. The definition of variables is used
like this:
name = string
The number of variables is not limited. They are accessed
by writing $(name). If a variable is named like an envi-
ronment variable than this environment variable is used.
If a variable is not defined an empty string is inserted.
The following variables are predefined:
FILES The names of modules being compiled and linked
together to create the executable file.
CMP Compiler-Path
CMPFLAGS
Compiler-Options
CMPSWTCH
How are mistakes interpreted?
('GNU'(Default)/'other')
LDFLAGS
Loader-Options
EXENAME
The name of the Executables (Default: a.out)
LIBNAME
The filename used for a library. This library will
hold all object-files belonging to the project.
This library is used automaticly for linking.
A makefile can be transformed to a project-file very
simple by adding the following lines to it (C-code):
FILES=$(CFILES)
CMP=$(CC)
LDFLAGS=$(LIBFLAGS)
EXENAME='Targetname'
How Compile and Make work:
The files are translated in the order given in the
FILES- variable. If a source has changed after the last
translation then it is translated again else the next
source is taken. An error occurring while making stops
the work and is displayed in the Message-Window.
If no error occurs then all object-files are linked
together to an executable named $(EXENAME).
The project-file can contain an 'install'-target. The
first line of this target is
install: dependencies
The dependencies are ignored because they have to be
entered into the FILES-variable. All following lines
starting with <TAB> are interpreted as UNIX-commands and
are executed. These line may contain variables defined
above:
<TAB> Command1
<TAB> Command2
Command can be every UNIX-command (only 'cd' is not exe-
cuted). The 'install'-target is started from the menu
Run/Install or Alt-L (see Run-Menu).
The Message-String:
The Message-String defines how warnings and error-messages
produced by a compilation should be interpreted if the
Compiler-Style 'Other' was selected. It has to be changed
for each compiler and work like this.
character, '[a-z]' matches one character in the range of
"a..z". (This was described in the section File-Manager.)
${FILE}
is like '*' but the characters are stored as name
of the file containing the error.
${LINE[+-N]}
is like '*' but the characters are stored as line-
number containing the error. An integer N can be
added/subtracted to the line-number.
The message-string has to contain both ${FILE} and
${LINE}. If a line of output can be interpreted so that
it contains a valid filename and a valid line number it
is used as error-output.
Also the column number can be used to interpret an
error- containing line.
${COLUMN[+-N]}
With ${COLUMN} being used as number.
${COLUMN=BEFORE[+-N]}
The string ${COLUMN} is the expression to search
for and the column is Before the string found.
${COLUMN=AFTER[+-N]}
The string ${COLUMN} is the expression to search
for and the column is after the string found.
An integer N can be added/subtracted to the column-num-
ber.
If a message is written in more than one row (e.g. Sun-
Pascal: pc) the message-string must contain CRs (^M) to
divide the string into different rows. ${COLUMN=PREVI-
OUS?STR[+-N]} is compared against the ${CMPSTR}-string
containing a string to compare with.
Warnings:
A warning is detected by comparison with a string
STR like this: ${?N:STR} - N can be a number or a
'*'-character. If N is a number then N is then num-
ber of the column where the warning begins. Other-
wise if N is '*' then STR can begin at every posi-
tion in the text. More than one warning-message can
be defined.
Some examples:
gcc: ${?*:warning:}${FILE}:${LINE}:* before \
`${COLUMN=BEFORE}'
cc(Sun): ${?*:warning:}"${FILE}", line ${LINE}:* \
at or near * "${COLUMN=AFTER}"
cc(HP): ${?*:warning:}cc: "${FILE}", line ${LINE}:* \
at or near * "${COLUMN=AFTER}"
pc(Sun): ${?0:e}${?0:w}${?0:s}*:*:* * ${FILE}:^M^M* \
${LINE} ${CMPTXT}^M*-------${COLUMN=PREVIOUS?^}
Syntax-Support:
xwpe supports the syntax of a language by using different
colors to display keywords, constants, preprocessor- com-
ments, operators and everything else. This support is
defined already for the programming languages C, C++, FOR-
TRAN and Pascal. More languages can be added to the file
we_synt_defs
and the predefined languages can be changed. The languages
are distinguished by the postfix of the filename. The
file we_synt_defs is stored in the directory $pre-
fix/lib/wpe ($prefix/bin is the directory containing the
xwpe-binary) or in $HOME/.wpe. This file must contain the
following line for each language:
"string: The postfix for the filename."
"integer: Then number of keyword."
"strings: The keywords."
"integer: Number of operators with more than one
character length."
"strings: Operators with more than one character
length."
"string: Operators containing one character."
"string: Begin of comment"
"string: End of comment"
"string: Begin of comment reaching til the end
of line."
"string: Characters used for comments depending on the
column."
"string: Special single characters."
"integer: Column for comments (-1 for none)."
"integer: Column for continuing line (-1 for none)"
"Integer: Column for comment till the end of line (-1
for none)"
Strings and integers are separated by blanks or CRs. The
strings used for single character operators and for column
depending comments must not contain blanks. All strings
used for comments can contain NULL to indicate that there
is no such comment. An integer can be zero if there is no
keyword or multiple character operator. The keywords and
operators with more than one character have to be alpha-
beticaly sorted (uppercase before lowercase characters).
The string for special single characters contains the fol-
lowing fields:
Character for string-constants
Character for character-constants
Character for preprocessor-commands
Character for quoting the next character
Character for next line is continuing line
(if it is the last character in the line)
Character (not defined)
Character for next line is continuing line
(at each column of the line)
Character (if not empty: the language is not
case sensitive)
If one character is not defined (e.g. missing) a blank is
inserted at the corresponding position.
An example:
.c
33
NULL auto break case char const continue default do
double else enum extern float for goto if int long
register return short signed sizeof static struct
switch typedef union unsigned void volatile while
0
()[]{}<>+-/*%=|&!.?:,; /* */ NULL NULL "'# -1 -1 1000
.f
64
ACCESS ASSIGN BACKSPACE BLANK BLOCKDATA CALL CHARACTER
CLOSE COMMON COMPLEX CONTINUE DATA DIMENSION DIRECT DO
DOUBLE PRECISION ELSE END ENDFILE ENTRY EQUIVALENCE ERR
EXIST EXTERNAL FILE FMT FORM FORMAT FORMATTED FUNCTION
GOTO IF IMPLICIT INQUIRE INTEGER INTRINSIC IOSTAT
LOGICAL NAME NAMED NEXTREC NUMBER OPEN OPENED
PARAMETER PAUSE PRINT PROGRAM READ REAL REC RECL
RETURN REWIND SAVE SEQUENTIAL STATUS STOP SUBROUTINE
TO UNFORMATED UNIT WRITE
13
.AND. .EQ. .EQV. .FALSE. .GE. .GT. .LE. .LT. .NE.
.NEQV. .NOT. .OR. .TRUE.
()+-/*=$.:, NULL NULL ! C* ' 1 0 5 72
Automatic Indentation
The behavior of the auto-intention can be selected in the
Editor-Options-menu. The following keys are defined:
<<Return>>
The next (new) line is indented to the beginning of
the previous line.
<<Tab>> If <Tab> is entered in front of the first visible
character the whole line is indented like the pre-
vious one. If the cursor is placed behind this col-
umn then the line is indented N characters more
than the previous. N is the number entered for the
Tabstops in the menu editor-options. If the cursor
is placed behind this position or between visible
characters a <Tab> is inserted.
<<Backspace>>
If entered in front of the first visible character
of a line the line is indented like the last line
that started in front of this cursor- position.
Hints for installation
The XWindow Programming Environment is set of programmes
compatible to System V. To use the plain UNIX-part of it
the Curses-Library and the Terminfo-terminal capability
information are required. To install xwpe on a system not
having this Terminfo the preprocessor-variable TERMCAP can
be used to access the termcap-information instead. On sys-
tems like Sun Os 4, that contain System V extensions in
additional directories, these directories must be added to
the Include- and Library-path.
To use xwpe together with XWindow X11R3 or above is
needed. The Path has to be added/changed in the Makefile.
The Alt-key is interpreted as mod4 (like Sun). To set this
key xmodmap -e "add mod4 = Alt_L" may be necessary. To
use the help for functions 'Function-Index' it is neces-
sary to set the environment variable MANPATH correct.
If more languages than C, C++, FORTRAN and Pascal should
be used then the file .wpe_pr_opt has to be edited for
Syntax-Support. The message-string has to be set for each
compiler.
Some systems (e.g. S400) require to link some parts of the
network-library to use XWindows.