Library Reference

This section contains the description for the all the Grief macro primitives.  At last count over 600 primitives including operators are published by the macro library.

Summary
Library ReferenceThis section contains the description for the all the Grief macro primitives.
Return ValueThe return value for most builtin functions which return an integer have the following
Function ReferenceBuiltin constant and function reference.

Return Value

The return value for most builtin functions which return an integer have the following

  • Less then zero (generally -1) the function did not complete successfully, and an error message was displayed.
  • Zero, the call failed yet no error message was displayed.
  • One or greater, the function execution was successful.

System Call Macros

Primitives which are based on underlying POSIX system calls shall set the global variable errno to the result of the underlying system call upon a -1 return.

For example, if the remove() function fails, then the global variable errno will be set to the value set by the underlying system call.  The primitive strerror() maybe used to decode the error code.  For a complete list (See: errno) and <grief.h>.

Within their descriptions the key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.

Function Reference

Builtin constant and function reference.

Macro
Description
!
Not operator
!=
Non-equality operator
%
Modulus operator
%=
Modulus assignment operator
&
Bitwise AND operator
&&
Logical AND operator
&=
Bitwise AND assignment operator
*
Multiplication operator
*=
Multiplication assignment operator
+
Addition operator
++
Prefix Increment
+=
Addition assignment operator
-
Subtraction operator
--
Prefix Decrement
-=
Subtraction
/
Division operator
/=
Division assignment operator
<
Less than comparison
<<
Left-shift operator
<<=
Left-shift assignment operator
<=
Less than or equal comparison
<=>
Comparison operator
=
Assignment operator
==
Equality operator
>
Greater than comparison
>=
Greater than or equal comparison
>>
Right-shift operator
>>=
Right-shift assignment operator
Signals
undocumented
^
Bitwise exclusive OR operator
^=
Bitwise exclusive OR assignment operator
__breaksw
Switch break statement
__lexicalblock
Lexical scope
__regress_op
Regression operations
__regress_replacement
Replacment regression testing
_bad_key
Command prompt unknown key callback
_chg_properties
Property change event
_default
Default extension handler
_extension
Buffer load handler
_fatal_error
Fatal condition callback
_init
Internal macro initialisation
_invalid_key
Invalid key event
_prompt_begin
Command prompt session begin callback
_prompt_end
Command prompt session end callback
_startup_complete
Startup event callback
abort
Abnormal process
above
Greater than comparison
above_eq
Greater than or equal comparison
abs
Absolute value
access
Test file accessibility
acos
Arc cosine
arg_list
Argument list
array
Declare a array symbol
asin
Arc sine
assign_to_key
Assign command to key or key sequence
atan
Arctangent
atan2
Arctangent division
atoi
Convert string to a decimal number
attach_buffer
Attach a buffer to a window
attach_syntax
Attach a syntax to a buffer
autoload
Register location of one or more macros
backspace
Delete character to the left of the cursor
basename
Return the last component of a pathname
beep
Issue a beep sound
beginning_of_line
Goto beginning of line
below
Less than comparison
below_eq
Less than or equal comparison
bless
Associate an object with a class/module
bookmark_list
Retrieve existing bookmark list
bool
Declare a boolean symbol
borders
Set window border status
break
break statement
call_registered_macro
Invoke registered macro callbacks
car
Retrieve the first list element
case
Switch case statement
<cast_float>
undocumented
<cast_int>
undocumented
catch
Catch statement
cd
Change directory
cdr
Retrieve all secondary list elements
ceil
Round up to integral value
cftime
Format time and date
change_window
Selects a new window
change_window_pos
Modify window coordinates/size
characterat
Retrieve the character value within a string
chdir
Change directory
chmod
Change mode
chown
Change owner
close_window
Close specified the window
color
Set the basic colors
color_index
Border color background color index
command_list
Retrieve list of built-in and active macros
compare
Comparison
compare_files
Binary file compare
compress
Compress repeated instances of white-space characters
connect
Attach a process to a process
const
Define a variable as being constant
continue
Loop continuation
copy
Copy marked area to scrap
copy_ea_info
Copy file extended information
copy_keyboard
Copy a keyboard
copy_screen
Copy the current screen
cos
Cosine
cosh
Hyperbolic cosine
create_buffer
Create and load a buffer
create_char_map
Create a display character-map
create_dictionary
Create a dictionary
create_edge
Create an edge, splitting the window
create_menu_window
Create the menu window
create_nested_buffer
Create or reference a buffer
create_syntax
Syntax table creation
create_tiled_window
Creates a tiled window
create_window
Create a popup window
ctype
undocumented
cursor
Control cursor display
cut
Cut marked area to scrap
cvt_to_object
Convert string to object
date
Get current system date
debug
Control runtime debug and tracing
debug_support
Internal debugger functionality
declare
Declare a polymorphic symbol
define_keywords
Add keywords to a syntax dictionary
del
Delete a file
delete_block
Deleted selected region
delete_bookmark
Delete a bookmark
delete_buffer
Delete a buffer
delete_char
Delete character
delete_dictionary
Destroy a dictionary
delete_edge
Delete an edge, combining a split window
delete_line
Delete current line
delete_macro
Delete a macro from memory
delete_nth
Remove one or more elements from a list
delete_to_eol
Delete to end-of-line
delete_window
Delete a window
detach_syntax
Detach a syntax from a buffer
dialog_create
Build a dialog resource
dialog_delete
Delete a dialog resource
dialog_exit
Exit a dialog resource
dialog_run
Execute a dialog resource
dict_clear
Clear a dictionary
dict_delete
Remove a dictionary item
dict_each
Iterator a dictionary
dict_exists
Dictionary item existence check
dict_keys
Iterator dictionary keys
dict_list
Retrieve dictionary items
dict_name
Retrieve a dictionary name
dict_values
Iterator dictionary values
<diff_buffers>
undocumented
<diff_lines>
undocumented
diff_strings
Compare to strings
dirname
Report the parent directory name of a file pathname
disconnect
Disconnect a buffer from a process
display_mode
Set/retrieve display control flags
display_windows
Control window display
distance_to_indent
Calculate distance to next indent
distance_to_tab
Calculate distance to next tab
do
do statement
dos
Create a sub-shell
double
Declare a double float symbol
down
Move position down one line
dprintf
Formatted diagnostics output
drop_anchor
Start marking a selection
drop_bookmark
Create or update a bookmark
echo_line
Set echo line flags
edit_file
Edit a file
edit_file2
Extended file edit
ega
Terminal line display
else
else statement
end_anchor
Set the end of the anchor
end_of_buffer
Move cursor to end of current buffer
end_of_line
Goto end of line
end_of_window
Goto end of the current window
error
Issue an error message on the command line
execute_macro
Invokes a command by name
exist
Check file existence
exit
Exit current process level
exp
Exponential function
expandpath
Expand the path
extern
Declare an external variable
fabs
Floating-point absolute value
fclose
Close a stream
feof
Test end-of-file indicator on a stream
ferror
Test error indicator on a stream
fflush
Flush a stream
file_canon
Canonicalize a path
file_glob
Return names of files that match patterns
file_match
File match utility
file_pattern
Directory file pattern
filename_match
Perform file pattern matching
filename_realpath
Return a resolved pathname
finally
Finally statement
find_file
Read next directory entry
find_file2
Extended read next directory entry
find_line_flags
Locate next line with specific flags
find_macro
Determine path of a macro object
find_marker
Locate next marker
fioctl
File miscellaneous control
first_time
Determine a macros initialisation status
firstof
Leftmost character search
float
Declare a float symbol
flock
File lock operations
floor
Round down to integral value
fmktemp
Make a unique filename
fmod
Floating-point remainder
fopen
Open a stream
for
for statement
foreach
Container iterator
format
Formatted printing
fread
Read from a stream
frexp
Extract mantissa and exponent
fseek
Reposition a file-position indicator in a stream
fstat
Stream status information
fstype
File system type
ftell
Report the file-position indicator of a stream
ftest
Test file type
<ftp_chdir>
undocumented
<ftp_close>
undocumented
<ftp_connect>
undocumented
<ftp_connection_list>
undocumented
<ftp_create>
undocumented
<ftp_directory>
undocumented
<ftp_error>
undocumented
<ftp_find_connection>
undocumented
<ftp_get_file>
undocumented
<ftp_getcwd>
undocumented
<ftp_mkdir>
undocumented
<ftp_protocol>
undocumented
<ftp_put_file>
undocumented
<ftp_register>
undocumented
<ftp_remove>
undocumented
<ftp_rename>
undocumented
<ftp_set_options>
undocumented
<ftp_sitename>
undocumented
<ftp_stat>
undocumented
<ftp_timeout>
undocumented
ftruncate
Truncate the specified file
fwrite
Write to a stream
get_color
Retrieve screen colors
get_color_pair
Retrieve the specific color
get_mouse_pos
Retrieve last mouse action
get_nth
Retrieve a list element
get_parm
Retrieve the value of a macro parameter
get_property
Retrieve a dictionary item
get_region
Retrieve marked region content
<get_system_resources>
undocumented
get_term_characters
Retrieve terminal special characters
get_term_feature
Get value of a terminal feature
get_term_features
Retrieve terminate features
get_term_keyboard
Retrieve the terminal keyboard definitions
getenv
Retrieve an environment variable
geteuid
Retrieve the effective user identifier
getopt
Get options
getpid
Retrieve the process identifier
getsubopt
Parse suboption arguments from a string
getuid
Retrieve the user identifier
getwd
Get current working directory
glob
Generate pathnames matching a pattern
global
Declare a global variable
gmtime
Convert a time value to UTC time components
goto_bookmark
Seek a bookmark
goto_line
Move to a particular line
goto_old_line
Move to line before buffer modification
grief_version
GRIEF version
hilite_create
Create a hilite resource
hilite_delete
Delete a hilite resource
hilite_destroy
Destroy hilite resources
if
if statement
index
Search string for a leftmost sub-string or character
<iniclose>
undocumented
<iniexport>
undocumented
<inifirst>
undocumented
<ininext>
undocumented
<iniopen>
undocumented
<iniproperties>
undocumented
<inipush>
undocumented
<iniquery>
undocumented
<iniremove>
undocumented
input_mode
Effect of certain system keys
inq_assignment
Get key assignment for function
inq_attribute
Retrieve the current attributes
inq_backup
Get the backup creation mode
inq_backup_option
Get backup options
inq_borders
Retrieve the border status
inq_brief_level
Retrieve the editor nesting level
inq_btn2_action
Retrieve the second button action
inq_buffer
Retrieve a buffer identifier
inq_buffer_flags
Retrieve buffer flags
inq_buffer_title
Retrieve a buffer title
inq_buffer_type
Retrieve buffer type
inq_byte_pos
Get current position in buffer stream
inq_called
Get the name of the calling macro
inq_char_map
Retrieve the character-map
inq_char_timeout
Get the escape delay
inq_clock
Retrieve the user identifier
inq_cmd_line
Retrieve the command line message
inq_color
Retrieve the basic colors
inq_command
Retrieve name of last keyboard command
inq_connection
Connection information
inq_ctrl_state
Retrieve the state of a window control
inq_debug
Retrieve the current debug setting
inq_dialog
Retrieve the current dialog resource
inq_display_mode
Inquire display control flags
inq_echo_format
Retrieve the echo-line format
inq_echo_line
Retrieve the echo-line flags
inq_encoding
Retrieve a buffers character encoding
inq_environment
Retrieve an environment variable
inq_feature
Retrieve an editor feature
inq_file_change
Determine state of underlying file
inq_file_magic
Retrieve the file type detection rules
inq_font
Inquire the current window fonts
inq_hilite
Retrieve a hilite definition
inq_home
Retrieve the user home directory
inq_hostname
Retrieve the local host name
inq_idle_default
Retrieve idle interval
inq_idle_time
Retrieve keyboard idle time
inq_indent
Get current indentation settings
inq_kbd_char
Peek at the keyboard
inq_kbd_flags
Get keyboard key flags
inq_kbd_name
Retrieve the assigned keyboard name
inq_keyboard
Retrieve the keyboard identifier
inq_keystroke_macro
Retrieve the current keystroke macro
inq_keystroke_status
Determine keystroke macro status
inq_line_col
Retrieve the echo_line content
inq_line_flags
Retrieve a lines associated flags
inq_line_length
Determine the longest line length
inq_lines
Retrieve the line count
inq_local_keyboard
Retrieve local keyboard identifier
inq_macro
Determine whether a macro or primitive exists
inq_macro_history
Retrieve macro execution history
inq_margins
Retrieve buffer formatting margins
inq_mark_size
Retrieve size of marked region
inq_marked
Determine the current marked region
inq_marked_size
Size the marked region
inq_message
Retrieve the prompt line
inq_mode
Returns the overstrike mode
inq_modified
Determine a buffers modification status
inq_module
Retrieve the current module
inq_mouse_action
Retrieve the keyboard mouse handler
inq_mouse_type
Retrieve the button type
inq_msg_level
Get the message level
inq_names
Retrieve associated buffer names
inq_position
Retrieve current buffer position
inq_process_position
Get position of process buffer
inq_profile
Retrieve profile directory
inq_prompt
Retrieve the prompt status
inq_remember_buffer
Determine the keystroke buffer name
inq_ruler
Retrieves the ruler specification
inq_scrap
Obtain the scrap buffer identifier
inq_screen_size
Determine screen dimensions
inq_symbol
Determine if the symbol exists
inq_syntax
Retrieve the syntax identifier
inq_syntax_name
Retrieve the syntax name
inq_system
Determine if buffer is a system buffer
inq_tab
Derive the tab increment
inq_tabs
Retrieves the buffer tab specification
inq_terminator
Retrieve a buffers line terminator
inq_time
Retrieve the last modification time
inq_tmpdir
Get the temporary-file directory
inq_top_left
Retrieve window view port coordinates
<inq_unicode_version>
undocumented
inq_username
Retrieve the user name
inq_vfs_mounts
Retrieve list of mounts
inq_views
Determine window count
inq_window
Retrieve the current window
inq_window_buf
Retrieve the associated buffer
inq_window_color
Retrieve the window attribute
inq_window_flags
Retrieve window flags
inq_window_info
Retrieve the current window information
inq_window_infox
Retrieve information about a window
inq_window_priority
Retrieve the windows display priority
inq_window_size
Retrieve the window size
insert
Insert string into current buffer
insert_buffer
Insert format text into a buffer
insert_mode
Set the buffer insert/overstrike mode
insert_process
Send string to a attached process
insertf
Insert a formatted string
<inside_region>
undocumented
int
Declare an integer symbol
int_to_key
Convert an keycode to mnemonic key string
is_array
Determine whether an array type
is_float
Determine whether a float type
is_integer
Determine whether an integer type
is_list
Determine whether a list type
is_null
Determine whether a NULL type
is_string
Determine whether a string type
is_type
Determine whether an explicit type
isalnum
Alphanumeric character predicate
isalpha
Alpha character predicate
isascii
ASCII character predicate
isblank
Blank character predicate
isclose
Test for floating point equality
iscntrl
Control character predicate
iscsym
A symbol character predicate
isdigit
Numeric character predicate
isfinite
Test for finite value
isgold
Alphanumeric character predicate
isgraph
Graphic character predicate
isinf
Test for infinity
islower
Lowercase character predicate
isnan
Test for a NaN
isprint
A printable character predicate
ispunct
Punctuation character predicate
isspace
Space character predicate
isupper
Uppercase character predicate
isword
Word character predicate
isxdigit
Hexadecimal character predicate
itoa
Convert an integer into a string
key_list
Retrieve keyboard bindings
key_to_int
Convert key name to a code
keyboard_flush
Flush the keyboard buffer
keyboard_pop
Pop a keyboard from the keyboard stack
keyboard_push
Push a keyboard onto the keyboard stack
keyboard_typeables
Assign self_insert to all typeable keys
lastof
Rightmost character search
ldexp
Multiply by a power of two
left
Move position left one charcter
length_of_list
Determine list element count
link
Link a file
list
Declare a list symbol
list_each
Iterator though the list elements
list_extract
Extract list elements
list_of_dictionaries
List of created dictionaries
list_reset
Reset the list iterator
load_keystroke_macro
Load a recorded macro from a file
load_macro
Load a macro object
localtime
Convert a time value to local time components
log
Natural logarithm
log10
Base 10 logarithm function
lower
Convert string or character to lowercase
lstat
Get symbolic link status
ltrim
Chomp characters from the front of a string
macro
Define a macro body
macro_list
Retrieve list of current macros
main
Macro entry point
make_list
Build an evaluated list
make_local_variable
Make a buffer local variable
mark
Toggle the anchor status
mark_line
Create a line marker
message
Display a message on the command line
mkdir
Create a directory
mktemp
Make a temporary filename
mode_string
Conversion stat mode to a string representation
modf
Decompose a floating-point number
module
Assign a module identifier
move_abs
Move to an absolute location in the buffer
move_edge
Modify a window
move_rel
Move to a relative location in the buffer
next_buffer
Identifier of the next buffer
next_char
Move to the next character
next_window
Obtain the next window identifier
nothing
Noop
nth
Extract the indexed list item
output_file
Change the output file-name
page_down
Move position down a page
page_up
Move position up a page
parse_filename
Parse a file into its components
paste
Insert scrap buffer at cursor location
pause
Pause keystroke definition
pause_on_error
Set the error display mode
pause_on_message
Set the message display mode
perror
Print error
playback
Replay a keystroke macro
pop
Pop the last element
post++
Postfix Increment
post--
Postfix Decrement
pow
Raise to power
prev_char
Move to the previous character
previous_buffer
Identifier of the previous buffer
print
Print formatted string to stdout
printf
Print formatted string to stdout
process
Invoke a Grief engine
process_mouse
Process mouse event
profile
Profiling support
push
Add an element onto a list
push_back
Push back a character into the keyboard
put_nth
Modify a list element
put_parm
Assign an argument value
putenv
Set an environment variable
quote_list
Build an unevaluated list
quote_regexp
Quote regexp special characters
raise_anchor
Raise the last dropped mark
rand
Generate a random number
re_comp
Compile a regular expression
re_delete
Delete a compiled expression
re_result
Retrieve search captures
re_search
Search for a string
re_syntax
Set the regular expression mode
re_translate
Search and replace
read
Read characters from the buffer
read_char
Read next key from the keyboard
read_ea
Read file extended information
read_file
Read into the current buffer
readlink
Read the contents of a symbolic link
realpath
Resolve a pathname
redo
Redo an undo operation
redraw
Redraw screen
ref_parm
Create a reference parameter
refresh
Update the display
register
Define a variable as being a register
register_macro
Register a callback procedure
reload_buffer
Reload the buffer content
remember
Start remembering keystrokes
remove
Remove a file
rename
Rename a file
replacement
Overload an existing macro definition
require
Enforce the use of an external module
reregister_macro
Register a unique callback procedure
restore_position
Restore a previously saved position
return
Return from a macro
returns
Return an expression from a macro
right
Move position right one character
rindex
Search string for a rightmost sub-string or character
rmdir
Remove directory
rtrim
Chomp characters from the end of a string
save_keystroke_macro
Save the current keystroke macro
save_position
Saves current cursor/buffer state
screen_dump
Dump an image of the screen
search_back
Backwards buffer search
search_case
Set the search pattern case mode
search_fwd
Buffer search
search_list
Search list contents
search_string
Searches for a pattern in a string
searchpath
Searches for a given file in a specified path
self_insert
Insert a character as if it was typed
send_signal
Send signal to a process buffer
set_attribute
Set the color attributes
set_backup
Set backup creation mode
set_backup_option
Set backup options
set_binary_size
Set binary chunk size
set_btn2_action
Set the second button action
set_buffer
Set the current buffer
set_buffer_cmap
Set a buffers character-map
set_buffer_flags
Set buffer flags
set_buffer_title
Set a buffers title
set_buffer_type
Set the buffer storage type
set_calling_name
Set the name of the calling macro
set_char_timeout
Set the escape delay
set_color
Set screen colors
set_color_pair
Set a specific color
set_ctrl_state
Set the state of a window control
set_ea
Set file extended information
set_echo_format
Set the echo line format
set_encoding
Set a buffers character encoding
set_feature
Config an editor feature
set_file_magic
Define the file type detection rules
set_font
Set the current window fonts
set_idle_default
Set idle interval
set_indent
Set the buffers default indentation
set_kbd_name
Set the keyboard name
set_line_flags
Associate line flags
set_macro_history
Set the macro execution history
set_margins
Set buffer formatting margins
set_mouse_action
Set keyboard mouse handler
set_mouse_type
Sets the mouse type
set_msg_level
Set level of informational messages
set_process_position
Set process insertion position
set_property
Set a dictionary item
set_ruler
Configure the buffer ruler
set_scrap_info
Set the scrap buffer details
set_syntax_flags
Set syntax flags
set_tab
Derive the buffer tab stops
set_term_characters
Set terminal special characters
set_term_feature
Set a terminal attribute
set_term_features
Define terminal attributes
set_term_keyboard
Define terminal keyboard definitions
set_terminator
Set a buffers line terminator
set_top_left
Manages window view port coordinates
<set_unicode_version>
undocumented
set_window
Set the active window
set_window_cmap
Set a windows character-map
set_window_flags
Set window flags
set_window_priority
Set the window display priority
set_wm_name
Set the window and/or icon name
shell
Spawn a sub-shell process
shift
Shift the first list element
sin
Sine function
sinh
Hyperbolic sine function
sleep
Suspend execution for an interval of time
sort_buffer
Sort buffer content
sort_list
Sort list
spell_buffer
Spell the specified buffer
spell_control
Spell control
spell_dictionary
Spell dictionary modifications
spell_distance
Edit distance
spell_string
Spell the specified word or line
spell_suggest
Suggest spelling of the the specified word
splice
Splice a list, removing and/or adding elements
split
Split a string into tokens
split_arguments
Argument split
splitpath
Searches for a given file in a specified path
sprintf
Formatted printing to a string
sqrt
Square root function
srand
Seed the random number generator
sscanf
Read formatted data from string
stat
Obtain file information
static
Define a function or module scope
strcasecmp
String case insensitive compare
strcasestr
Locate first occurrence of a case insensitive
strcmp
String compare
strerror
String error
strfilecmp
Filename comparison
strftime
Format time and date
string
Declare a string symbol
string_count
Count occurrences of characters in a string
strlen
String length
strnlen
String length limited to an explicit maximum
strpbrk
Search a string for any of a set of characters
strpop
Pop the leading character(s)
strrstr
Locate last occurrence of a sub-string
strsignal
Return string describing signal
strstr
Locate first occurrence of a sub-string
strtod
String to double
strtof
String to float
strtol
Convert a string into its numeric value
strverscmp
Version string compare
substr
Extract a sub-string
suspend
Suspend current process
swap_anchor
Swaps the mark with the current position
switch
Switch statement
symlink
Create a symbolic link
syntax_build
Build a syntax hiliting engine
syntax_column_ruler
Column syntax coloriser
<syntax_find>
undocumented
syntax_rule
Define a syntax hilite rule
syntax_token
Define a syntax token
tabs
Set buffer tab stops
tagdb_close
Tag database close
tagdb_open
Tag database open
tagdb_search
Tag database search
tan
Tangent function
tanh
Hyperbolic tangent function
throw
Throw an exception
time
Get the current system time
tokenize
Tokenize a string into token elements
top_of_buffer
Move cursor to start of current buffer
top_of_window
Goto top of the current window
transfer
Buffer to buffer transfer
translate
Buffer search and replace
translate_pos
Convert window coordinates
trim
Chomp characters from a string
try
Try statement
typeof
Determine the symbol type
umask
Set and get the file mode creation mask
uname
Retrieve system information
undo
Undo previous edit operations
unlink
Unlink a file
unregister_macro
Remove a registered macro
unshift
Shift the first list element
up
Move position up one line
upper
Convert string or character to uppercase
use_local_keyboard
Associate a keyboard with a buffer
use_tab_char
Configure use of hard/soft tabs
version
Version information
vfs_mount
Mount a virtual file-system
vfs_unmount
Unmount a virtual file-system
view_screen
View the content of underlying screen
wait
Wait for attached process to terminate
wait_for
Wait for process output
watch
Watch a symbol
<wcharacterat>
undocumented
<wcwidth>
undocumented
<wfirstof>
undocumented
while
while statement
widget_get
Retrieve a widget attribute
widget_set
Set a widget attribute
<windex>
undocumented
window_color
Set the window attribute
<wlastof>
undocumented
<wlower>
undocumented
<wrindex>
undocumented
write_block
Write selected region
write_buffer
Write to buffer content
<wstrcasecmp>
undocumented
<wstrcmp>
undocumented
<wstrlen>
undocumented
<wstrnlen>
undocumented
<wstrpbrk>
undocumented
<wstrrstr>
undocumented
<wstrstr>
undocumented
<wsubstr>
undocumented
<wupper>
undocumented
|
Bitwise OR operator
|=
Bitwise OR assignment operator
||
Logical OR operator
~
Bitwise complement
Macro Primitives
Constant
Description
BPACKAGES
BRIEF packages default
CRISP_OPSYS
Operating system identifier
GRBACKUP
Backup path
GRDICTIONARIES
Dictionary locales
GRDICTIONARY
Dictionary search path
GRFILE
Default empty file name
GRFLAGS
Default command line arguments
GRHELP
Help search path
GRINIT_FILE
GRIEF initialisation name
GRKBDPATH
Keyboard library search path
GRLEVEL
GRIEF Nesting level
GRLOG_FILE
GRIEF diagnostics log file name
GRPATH
Macro object search path
GRPROFILE
Profile directory override
GRPROGNAME
GRIEF application path
GRRC
GRIEF resource file path
GRRC_FILE
GRIEF initialisation name
GRRESTORE_FILE
GRIEF restore file name
GRSTATE_DB
GRIEF state database name
GRSTATE_FILE
GRIEF state file name
GRTEMPLATE
Source template search path
GRTERM
Terminal override
GRTERMCAP
Terminal capability database
GRTMP
Temporary dictionary
GRVERSIONMAJOR
GRIEF major version
GRVERSIONMINOR
GRIEF minor version
GRVERSIONS
Backup versions
errno
Last system errno number
Macro Constants

To send feedback on this topic email: grie.nosp@m.fedit@gmai.nosp@m.l.com

Copyright © Adam Young All Rights Reserved.

extern int errno;
Last system errno number.
!expr
Not operator.
expr1 != expr2
Non-equality operator.
expr1 % expr2
Modulus operator.
var %= expr1
Modulus assignment operator.
expr1 & expr2
Bitwise AND operator.
expr1 && expr2
Logical AND operator.
var &= expr1
Bitwise AND assignment operator.
var *= expr1
Multiplication assignment operator.
expr1 + expr2
Addition operator.
++expr
Prefix Increment.
var += expr1
Addition assignment operator.
expr1 - expr2
Subtraction operator.
--expr
Prefix Decrement.
var -= expr1
Subtraction.
expr1 / expr2
Division operator.
var /= expr1
Division assignment operator.
expr1 < expr2
Less than comparison.
expr1 << expr2
Left-shift operator.
var <<= expr1
Left-shift assignment operator.
expr1 <= expr2
Less than or equal comparison.
expr1 <=> expr2
Comparison operator.
var = expr1
Assignment operator.
expr1 == expr2
Equality operator.
expr1 > expr2
Greater than comparison.
expr1 >= expr2
Greater than or equal comparison.
expr1 >> expr2
Right-shift operator.
var >>= expr1
Right-shift assignment operator.
Signals are a limited form of inter-process communication used in Unix, Unix-like, and other POSIX compliant operating systems.
expr1 ^ expr2
Bitwise exclusive OR operator.
var ^= expr1
Bitwise exclusive OR assignment operator.
__breaksw;
Switch break statement.
__lexicalblock(.... block ...);
Lexical scope.
int __regress_op(...)
Regression operations.
declare __regress_replacement(...)
Replacment regression testing.
string _bad_key()
Command prompt unknown key callback.
void _chg_properties()
Property change event.
void _default(string ext)
Default extension handler.
void _extension(string ext)
Buffer load handler.
void _fatal_error(int signo,
string desc)
Fatal condition callback.
void _init()
Internal macro initialisation.
void _invalid_key()
Invalid key event.
void _prompt_begin(string prompt)
Command prompt session begin callback.
void _prompt_end()
Command prompt session end callback.
void _startup_complete(int mode)
Startup event callback.
void abort()
Abnormal process.
int above(declare expr1,
declare expr2)
Greater than comparison.
int above_eq(declare expr1,
declare expr2)
Greater than or equal comparison.
int abs(int val)
Absolute value.
int access(string path,
int mode)
Test file accessibility.
float acos(float x)
Arc cosine.
list arg_list([int eval = FALSE],
 [int start = 0],
[int end = -1])
Argument list.
array sym1, sym2 ...;
Declare a array symbol.
float asin(float x)
Arc sine.
int assign_to_key([string key],
[string macro])
Assign command to key or key sequence.
float atan(float x)
Arctangent.
float atan2(float y,
float x)
Arctangent division.
int atoi(string str,
 [int svalue = TRUE])
Convert string to a decimal number.
void attach_buffer(int bufnum)
Attach a buffer to a window.
int attach_syntax(int|string syntable)
Attach a syntax to a buffer.
void autoload(string filename,
string function,
 ...)
Register location of one or more macros.
void backspace([int num = 1])
Delete character to the left of the cursor.
int basename(string pathname,
 [string suffix])
Return the last component of a pathname.
int beep([int freq],
[int duration])
Issue a beep sound.
int beginning_of_line()
Goto beginning of line.
int below(declare expr1,
declare expr2)
Less than comparison.
int below_eq(declare expr1,
declare expr2)
Less than or equal comparison.
int bless([int ref],
[string classname])
Associate an object with a class/module.
list bookmark_list()
Retrieve existing bookmark list.
bool sym1, sym2 ...;
Declare a boolean symbol.
int borders([int borders])
Set window border status.
break;
break statement.
int call_registered_macro(int type)
Invoke registered macro callbacks.
declare car(list lst)
Retrieve the first list element.
'case' expr:
Switch case statement.
catch statement;
Catch statement.
int cd([string dir])
Change directory.
list cdr(list lst)
Retrieve all secondary list elements.
float ceil(float x)
Round up to integral value.
string cftime(string format,
int time)
Format time and date.
void change_window([int direction],
[string message])
Selects a new window.
int change_window_pos([int topx],
[int topy],
 [int width],
[int height],
[int winnum])
Modify window coordinates/size.
int characterat(string str,
int index)
Retrieve the character value within a string.
int chdir(string path)
Change directory.
int chmod(string path,
int mode)
Change mode.
int chown(string path,
int owner,
int group)
Change owner.
void close_window([int winum])
Close specified the window.
int color([int background],
[int normal],
 [int selected],
[int message],
[int error],
 [int hilite],
[int hilite_fg],
...)
Set the basic colors.
int color_index([int index])
Border color background color index.
list command_list(  [int nomacros = FALSE],
[string pattern])
Retrieve list of built-in and active macros.
int compare(expr1,
expr2)
Comparison.
int compare_files( [int flags],
string file1,
string file2)
Binary file compare.
string compress(
   string str,
    [int trim = FALSE],
      [string chars = " \\t\\r\\n"],
    [int replacement = ' ']
)
Compress repeated instances of white-space characters.
int connect(int mode,  
string shell =  NULL,
string cwd =  NULL)
Attach a process to a process.
const <type> sym1, sym2 ...;
Define a variable as being constant.
continue;
Loop continuation.
int copy([int append = FALSE],
[int keep = FALSE])
Copy marked area to scrap.
int copy_ea_info(string sourcename,
string destname)
Copy file extended information.
int copy_keyboard(int kbdid,
  [string cmd ...])
Copy a keyboard.
void copy_screen()
Copy the current screen.
float cos(float x)
Cosine.
float cosh(float x)
Hyperbolic cosine.
int create_buffer(string bufname,
 [string filename],
  [int sysflag = FALSE],
 [int editflags = 0],
  [string encoding = ""])
Create and load a buffer.
int create_char_map([int mapid|string name],
 [int start = 0],
[list chars],
 [list flags],
[string name])
Create a display character-map.
int create_dictionary(string ~name,
 int ~tablesize,
int ~tablefactor)
Create a dictionary.
int create_edge([int direction])
Create an edge, splitting the window.
int create_menu_window([int create])
Create the menu window.
int create_nested_buffer(string bufname,
  [string filename],
 [int sysflag],
 [int editflags],
  [string encoding])
Create or reference a buffer.
int create_syntax(string table)
Syntax table creation.
int create_tiled_window(int lx,
int by,
int rx,
int ty,
 [int bufnum])
Creates a tiled window.
int create_window(int lx,
int by,
 int rx,
int ty,
 [string message])
Create a popup window.
Character classes
int cursor(int state)
Control cursor display.
int cut([int append = FALSE],
[int syscopy = FALSE])
Cut marked area to scrap.
declare cvt_to_object(string value,
 [int &length])
Convert string to object.
int date([int &year],
[int &month],
[int &day],
 [string &monname],
[string &dayname])
Get current system date.
int debug([int flags|string flags|NULL],
[int echo = TRUE])
Control runtime debug and tracing.
void debug_support(int what,
declare object,
declare arg)
Internal debugger functionality.
declare sym1, sym2 ...;
Declare a polymorphic symbol.
void define_keywords([int|string] keywords,
string words|list words,
 [int length],
  [int flags],
 [int|string syntable])
Add keywords to a syntax dictionary.
int del(string name)
Delete a file.
int delete_block()
Deleted selected region.
void delete_bookmark(int bookid)
Delete a bookmark.
void delete_buffer(int bufnum)
Delete a buffer.
void delete_char([int num])
Delete character.
int delete_dictionary(int obj_id)
Destroy a dictionary.
int delete_edge([int direction])
Delete an edge, combining a split window.
void delete_line()
Delete current line.
void delete_macro(string macro)
Delete a macro from memory.
void delete_nth(list lst,
  [int offset = 0],
 [int length = 1])
Remove one or more elements from a list.
void delete_to_eol()
Delete to end-of-line.
void delete_window([int winum])
Delete a window.
void detach_syntax()
Detach a syntax from a buffer.
int dialog_create(list decl)
Build a dialog resource.
int dialog_delete(int dialog)
Delete a dialog resource.
int dialog_exit(int retval =  0,
 [int dialog]  )
Exit a dialog resource.
int dialog_run(int dialog,
 [string args])
Execute a dialog resource.
int dict_clear(int obj_id)
Clear a dictionary.
int dict_delete(int obj_id,
string key)
Remove a dictionary item.
int dict_each(int obj_id,
  [string key],
 [declare value])
Iterator a dictionary.
int dict_exists(  int obj_id,
string key)
Dictionary item existence check.
int dict_keys(int obj_id,
  [string key])
Iterator dictionary keys.
list dict_list(int obj_id)
Retrieve dictionary items.
string dict_name(int obj_id)
Retrieve a dictionary name.
int dict_values(int obj_id,
  [declare value])
Iterator dictionary values.
int diff_strings( [int flags],
string s1,
string s2)
Compare to strings.
int dirname(string path)
Report the parent directory name of a file pathname.
int disconnect()
Disconnect a buffer from a process.
int display_mode(  [int or_mask|string set-list],
[int and_mask|string clear-list],
 [int scroll_cols],
[int scroll_rows],
 [int visible_cols],
[int visible_rows],
 [int number_cols])
Set/retrieve display control flags.
int display_windows([int mode])
Control window display.
int distance_to_indent([int column])
Calculate distance to next indent.
int distance_to_tab([int column])
Calculate distance to next tab.
do statement; while (condition);
do statement.
int dos([string cmd],
[int use_shell],
[string callback])
Create a sub-shell.
double sym1, sym2 ...;
Declare a double float symbol.
int down([int lines = 1])
Move position down one line.
int dprintf(string format,
 ...)
Formatted diagnostics output.
int drop_anchor([int type = MK_NORMAL])
Start marking a selection.
int drop_bookmark([int bookid],
[string yesno],
 [int bufnum],
[int line],
[int column],
[int local = FALSE])
Create or update a bookmark.
int echo_line([int flags])
Set echo line flags.
int edit_file(...)
Edit a file.
int edit_file2(  string encoding,
string|list file)
Extended file edit.
int ega(int lines)
Terminal line display.
if (expr) true-body else false-body
else statement.
int end_anchor([int line],
[int column])
Set the end of the anchor.
int end_of_buffer()
Move cursor to end of current buffer.
int end_of_line()
Goto end of line.
int end_of_window()
Goto end of the current window.
int error(string format,
 ...)
Issue an error message on the command line.
declare execute_macro([string cmd],
...)
Invokes a command by name.
int exist(string path,
 [int canon = TRUE])
Check file existence.
void exit([string y_or_w])
Exit current process level.
float exp(float x)
Exponential function.
string expandpath(string path,
 [int env])
Expand the path.
extern <type> sym1, sym2, ..;
Declare an external variable.
float fabs(float x)
Floating-point absolute value.
int fclose(int handle)
Close a stream.
int feof(int handle)
Test end-of-file indicator on a stream.
int ferror(int handle,
 [int clearerr])
Test error indicator on a stream.
int fflush(int handle,
 [int sync])
Flush a stream.
string file_canon(string filepath)
Canonicalize a path.
list file_glob(string files)
Return names of files that match patterns.
int file_match(pattern,
file,
[flags])
File match utility.
int file_pattern(string filespec)
Directory file pattern.
int filename_match(string file,
declare pattern)
Perform file pattern matching.
string filename_realpath(string pathname)
Return a resolved pathname.
finally statement;
Finally statement.
int find_file([string &filename],
[int &size],
 [int &mtime],
[int &ctime],
[int &mode])
Read next directory entry.
int find_file2(string filename,
 [int &size],
  [int &mtime],
 [int &ctime],
 [int &atime],
 [int &mode],
  [int &uid],
 [string &uid2name],
  [int &gid],
 [string &gid2name],
  [int &nlink],
 [int &inode])
Extended read next directory entry.
int find_line_flags( [int bufnum],
 [int lineno],
 int mode,
int and_mask,
 [int or_value],
 [int value])
Locate next line with specific flags.
string find_macro(string filename)
Determine path of a macro object.
int find_marker([int marker = L_MARKED])
Locate next marker.
int fioctl(int handle,
 ..)
File miscellaneous control.
int first_time()
Determine a macros initialisation status.
int firstof(string str,
string chars,
 [int &result])
Leftmost character search.
float sym1, sym2 ...;
Declare a float symbol.
int flock(int handle,
 ..)
File lock operations.
float floor(float x)
Round down to integral value.
int fmktemp(string template);
Make a unique filename.
float fmod(float x,
float y)
Floating-point remainder.
int fopen(string path,
int|string flags,
  [int mode = 0644],
 [int bufsiz])
Open a stream.
for ([initialise];
[condition];
[increment]) statements;
for statement.
void foreach(<body>,
<expr>,
<key>,
<value>,
<index>,
<increment>)
Container iterator.
string format(string format,
 ...)
Formatted printing.
int fread(int handle,
string buffer,
  [int bufsiz = BUFSIZ],
 [int null = ' '])
Read from a stream.
float frexp(float num,
int &exp)
Extract mantissa and exponent.
int fseek(int handle,
int offset,
int whence)
Reposition a file-position indicator in a stream.
int fstat(int handle,
 [int size],
 [int mtime],
 [int ctime],
  [int atime],
 [int mode],
 [int uid],
 [string uid2name],
  [int gid],
 [string gid2name],
 [int nlink])
Stream status information.
int fstype([string path])
File system type.
int ftell(int handle)
Report the file-position indicator of a stream.
int ftest(int|string condition,
string path)
Test file type.
int ftruncate(int handle,
 [int size])
Truncate the specified file.
int fwrite(int handle,
string buffer,
 [int length])
Write to a stream.
list get_color([int flags = 0])
Retrieve screen colors.
void get_color_pair(string name|int ident,
  [int|string fg],
 [int|string bg],
 [int|string sf])
Retrieve the specific color.
void get_mouse_pos(  [int &x],
[int &y],
[int &winnum],
 [int &line],
[int &col],
 [int &where],
[int &region],
[int &event])
Retrieve last mouse action.
declare get_nth(int idx,
list expr)
Retrieve a list element.
int get_parm( [int argument],
declare &symbol,
  [string prompt],
 [int length = MAXPROMPT],
  [declare default],
 [int one = FALSE])
Retrieve the value of a macro parameter.
declare get_property(int obj_id,
string key)
Retrieve a dictionary item.
int get_region([int bufnum])
Retrieve marked region content.
list get_term_characters([top_left],
[top_right],
 [bottom_left],
[bottom_right],
[vertical],
[horizontal],
 [top_join],
[bottom_join],
[cross],
 [left_join],
[right_join],
[scrol],
[thumb])
Retrieve terminal special characters.
int get_term_feature( string | int ident,
declare value)
Get value of a terminal feature.
list get_term_features(...)
Retrieve terminate features.
list get_term_keyboard()
Retrieve the terminal keyboard definitions.
string getenv(string name)
Retrieve an environment variable.
int geteuid()
Retrieve the effective user identifier.
int getopt(
   string value,
    [[string shortopts], list longopts, string|list args, [string caller]]
)
Get options.
int getpid()
Retrieve the process identifier.
int getsubopt(string value,
 [list options],
  [string|list args],
 [string delim],
 [string quotes])
Parse suboption arguments from a string.
int getuid()
Retrieve the user identifier.
int getwd(int ignored,
string dir)
Get current working directory.
string glob(string pattern)
Generate pathnames matching a pattern.
global sym1, sym2, ..;
Declare a global variable.
int gmtime([int time = NULL],
[int &year],
[int &mon],
[int &mday],
 [string &monname],
[string &dayname],
[int &hour],
 [int &min],
[int &sec])
Convert a time value to UTC time components.
int goto_bookmark(int bookid =  NULL,
  [int &bufnum],  
 [int &line],  
 [int &column]  )
Seek a bookmark.
int goto_line([int lineno])
Move to a particular line.
int goto_old_line([int oldlineno])
Move to line before buffer modification.
int grief_version()
GRIEF version.
int hilite_create([int bufnam],
[int type],
[int timeout],
 [int sline],
[int scol],
[int eline],
[int ecol],
 [string | int attr],
[int ident])
Create a hilite resource.
int hilite_delete( [int bufnum],
int hilite)
Delete a hilite resource.
int hilite_destroy([int bufnum],
[int type])
Destroy hilite resources.
if (expr) true-body
if statement.
int index(string str,
int ch|string s)
Search string for a leftmost sub-string or character.
int input_mode(int char,
int flag)
Effect of certain system keys.
string inq_assignment(int|string val,
 [int tokey = FALSE])
Get key assignment for function.
int inq_attribute(  [int &normal],
[int bufnum])
Retrieve the current attributes.
int inq_backup([int bufnum])
Get the backup creation mode.
declare inq_backup_option(int what,
 [int bufnum])
Get backup options.
int inq_borders()
Retrieve the border status.
int inq_brief_level()
Retrieve the editor nesting level.
int inq_btn2_action()
Retrieve the second button action.
int inq_buffer([string filename])
Retrieve a buffer identifier.
int inq_buffer_flags([int bufnum],
 [string flag|int set = 1],
[string ~flags])
Retrieve buffer flags.
string inq_buffer_title([int bufnum])
Retrieve a buffer title.
int inq_buffer_type([int bufnum],
 [string &desc],
[string &encoding])
Retrieve buffer type.
int inq_byte_pos([int bufnum],
 [int line],
[int col],
[int flags])
Get current position in buffer stream.
string inq_called()
Get the name of the calling macro.
int inq_char_map([int winnum],
[string &name])
Retrieve the character-map.
int inq_char_timeout()
Get the escape delay.
int inq_clock()
Retrieve the user identifier.
string inq_cmd_line()
Retrieve the command line message.
string inq_color([int &background],
[int &normal],
 [int &selected],
[int &messages],
[int &errors],
 [int &hilite],
[int &hilite_fg])
Retrieve the basic colors.
string inq_command()
Retrieve name of last keyboard command.
int inq_connection(int cid,
int &flags,
int &pid)
Connection information.
int inq_ctrl_state(int ctrl,
 [int winnum])
Retrieve the state of a window control.
int inq_debug()
Retrieve the current debug setting.
int inq_dialog()
Retrieve the current dialog resource.
int inq_display_mode([string flagname],
[string ~flags])
Inquire display control flags.
int inq_echo_format()
Retrieve the echo-line format.
int inq_echo_line()
Retrieve the echo-line flags.
string inq_encoding([int bufnum])
Retrieve a buffers character encoding.
string inq_environment(string name)
Retrieve an environment variable.
int|list inq_feature([int|string feature],
[string value])
Retrieve an editor feature.
int inq_file_change([int bufnum])
Determine state of underlying file.
string inq_file_magic([int &isdefault])
Retrieve the file type detection rules.
int inq_font(string &normalfont,
 [string &italicfont])
Inquire the current window fonts.
int inq_hilite([int bufnum],
[int line],
[int column],
 [int &attribute],
[int &ident])
Retrieve a hilite definition.
string inq_home()
Retrieve the user home directory.
string inq_hostname()
Retrieve the local host name.
int inq_idle_default()
Retrieve idle interval.
int inq_idle_time()
Retrieve keyboard idle time.
int inq_indent([int bufnum])
Get current indentation settings.
int inq_kbd_char()
Peek at the keyboard.
int inq_kbd_flags()
Get keyboard key flags.
string inq_kbd_name([int kbdid])
Retrieve the assigned keyboard name.
int inq_keyboard()
Retrieve the keyboard identifier.
string inq_keystroke_macro([int macroid],
[int &bufnum])
Retrieve the current keystroke macro.
int inq_keystroke_macro([int &macroid])
Determine keystroke macro status.
string inq_line_col()
Retrieve the echo_line content.
int inq_line_flags([int bufnum],
[int lineno],
[int& iflags])
Retrieve a lines associated flags.
int inq_line_length([int bufnum])
Determine the longest line length.
int inq_lines([int bufnum])
Retrieve the line count.
int inq_local_keyboard()
Retrieve local keyboard identifier.
int inq_macro(string name,
 [int mode = 0])
Determine whether a macro or primitive exists.
string inq_macro_history([int index = 0])
Retrieve macro execution history.
int inq_margins([int bufnum],
 [int &left],
[int &right],
[int &style],
[int &colorcolumn],
 [int global = TRUE])
Retrieve buffer formatting margins.
int inq_mark_size()
Retrieve size of marked region.
int inq_marked([int &start_line],
[int &start_col],
 [int &end_line],
[int &end_col])
Determine the current marked region.
int inq_marked_size()
Size the marked region.
string inq_message()
Retrieve the prompt line.
int inq_mode([int bufnum],
[int &localised])
Returns the overstrike mode.
int inq_modified([int bufnum])
Determine a buffers modification status.
string inq_module([int test = 1])
Retrieve the current module.
string inq_mouse_action()
Retrieve the keyboard mouse handler.
int inq_mouse_type()
Retrieve the button type.
int inq_msg_level()
Get the message level.
int inq_names([string fullname],
[string ext],
 [string bufname],
[int bufnum])
Retrieve associated buffer names.
int inq_position([int &line],
[int &col])
Retrieve current buffer position.
int inq_process_position([int &line],
[int &column])
Get position of process buffer.
string inq_profile()
Retrieve profile directory.
int inq_prompt()
Retrieve the prompt status.
string inq_remember_buffer([int macroid])
Determine the keystroke buffer name.
string|list inq_ruler([int bufnum],
[int min_count],
[int aslist = FALSE])
Retrieves the ruler specification.
int inq_scrap([int &last],
[int &type])
Obtain the scrap buffer identifier.
int inq_screen_size([int &rows],
[int &cols],
[int &colors])
Determine screen dimensions.
int inq_symbol(string symbol)
Determine if the symbol exists.
int inq_syntax([int &flags],
[int|string syntable])
Retrieve the syntax identifier.
int inq_syntax_name([int bufnum])
Retrieve the syntax name.
int inq_system([int bufnum])
Determine if buffer is a system buffer.
int inq_tab([int bufnum])
Derive the tab increment.
string|list inq_tabs([int bufnum],
[int min_count],
[int aslist = FALSE]))
Retrieves the buffer tab specification.
int inq_terminator([int bufnum],
[string &term])
Retrieve a buffers line terminator.
int inq_time([int bufnum],
[int &ctime])
Retrieve the last modification time.
string inq_tmpdir()
Get the temporary-file directory.
int inq_top_left([int &top],
[int &indent],
[int winnum],
 [int &line],
[int &col],
[int &bufnum])
Retrieve window view port coordinates.
string inq_username()
Retrieve the user name.
list inq_vfs_mounts()
Retrieve list of mounts.
int inq_views([int bufnum])
Determine window count.
int inq_window()
Retrieve the current window.
int inq_window_buf([int winnum])
Retrieve the associated buffer.
int inq_window_color([int winnum])
Retrieve the window attribute.
int inq_window_flags([int winnum],
[string flags])
Retrieve window flags.
int inq_window_info([int &winnum],
[int &bufnum],
 [int &lx],
[int &by],
[int &rx],
[int &ty],
 [string &title = NULL],
[string &message = NULL])
Retrieve the current window information.
int inq_window_infox([int winnum],
[int &bufnum],
 [int &lx],
[int &by],
[int &rx],
[int &ty],
 [string &title = NULL],
[string &message = NULL])
Retrieve information about a window.
int inq_window_priority([int winnum])
Retrieve the windows display priority.
int inq_window_size()
Retrieve the window size.
int insert(string|int val,
 [int num = 1])
Insert string into current buffer.
int insert_buffer(int bufnum,
string format,
 ...)
Insert format text into a buffer.
int insert_mode([int value],
[int bufnum])
Set the buffer insert/overstrike mode.
int insert_process(string|int val,
 [int num = 1])
Send string to a attached process.
int insertf(string format,
 ...)
Insert a formatted string.
int sym1, sym2 ...;
Declare an integer symbol.
string int_to_key(int key)
Convert an keycode to mnemonic key string.
int is_array(declare &symbol)
Determine whether an array type.
int is_float(declare &symbol)
Determine whether a float type.
int is_integer(declare &symbol)
Determine whether an integer type.
int is_list(declare &symbol)
Determine whether a list type.
int is_null(declare &symbol)
Determine whether a NULL type.
int is_string(declare &symbol)
Determine whether a string type.
int is_type(declare &symbol,
int|string type)
Determine whether an explicit type.
int isalnum(string |int object,
 [int index])
Alphanumeric character predicate.
int isalpha(string |int object,
 [int index])
Alpha character predicate.
int isascii(string |int object,
 [int index])
ASCII character predicate.
int isblank(string |int object,
 [int index])
Blank character predicate.
int isclose(float v1,
float v2,
float ~rel_tot,
float ~abs_tol)
Test for floating point equality.
int iscntrl(string |int object,
 [int index])
Control character predicate.
int iscsym(string |int object,
 [int index])
A symbol character predicate.
int isdigit(string |int object,
 [int index])
Numeric character predicate.
int isfinite(float val)
Test for finite value.
int isgold(string |int object,
 [int index])
Alphanumeric character predicate.
int isgraph(string |int object,
 [int index])
Graphic character predicate.
int isinf(float val)
Test for infinity.
int islower(string |int object,
 [int index])
Lowercase character predicate.
int isnan(float val)
Test for a NaN.
int isprint(string |int object,
 [int index])
A printable character predicate.
int ispunct(string |int object,
 [int index])
Punctuation character predicate.
int isspace(string |int object,
 [int index])
Space character predicate.
int isupper(string |int object,
 [int index])
Uppercase character predicate.
int isword(string |int object,
 [int index])
Word character predicate.
int isxdigit(string |int object,
 [int index])
Hexadecimal character predicate.
string itoa(int value,
 [int base = 10])
Convert an integer into a string.
list key_list(int kbdid,
  [int self_inserts = 0],
 [int bufnum])
Retrieve keyboard bindings.
int key_to_int(string key,
int raw)
Convert key name to a code.
void keyboard_flush()
Flush the keyboard buffer.
void keyboard_pop([int save = FALSE])
Pop a keyboard from the keyboard stack.
void keyboard_push([int kbdid])
Push a keyboard onto the keyboard stack.
int keyboard_typeables()
Assign self_insert to all typeable keys.
int lastof(string str,
string chars,
 [int &result])
Rightmost character search.
float ldexp(float val,
int exp)
Multiply by a power of two.
int left([int columns = 1],
[int wrap = TRUE])
Move position left one charcter.
int length_of_list(list lst)
Determine list element count.
int link(string path1,
string path2)
Link a file.
list sym1, sym2 ...;
Declare a list symbol.
int list_each(list lst,
 declare &value,
 [int increment = 1])
Iterator though the list elements.
list list_extract(list lst,
 int start,
 [int end],
 [int increment])
Extract list elements.
list list_of_dictionaries(  [bool nonempty = false],
[bool named = false])
List of created dictionaries.
int list_reset(list lst)
Reset the list iterator.
int load_keystroke_macro(string def)
Load a recorded macro from a file.
int load_macro(string filename,
 [int reload = 1])
Load a macro object.
int localtime([int time = NULL],
[int &year],
[int &mon],
[int &mday],
 [string &monname],
[string &dayname],
[int &hour],
 [int &min],
[int &sec])
Convert a time value to local time components.
float log(float x)
Natural logarithm.
float log10(float val)
Base 10 logarithm function.
string|int lower(string str|int character)
Convert string or character to lowercase.
int lstat(string path,
 [int size],
  [int mtime],
 [int ctime],
 [int atime],
 [int mode],
  [int uid],
 [string uid2name],
  [int gid],
 [string gid2name],
  [int nlink],
 [int inode])
Get symbolic link status.
string ltrim(string str,
 [string chars = " \\t\\r\\n"])
Chomp characters from the front of a string.
declare macro(list declaration)
Define a macro body.
list macro_list([string pattern = NULL])
Retrieve list of current macros.
void main()
Macro entry point.
list make_list(...)
Build an evaluated list.
void make_local_variable(declare &sym,
 ...)
Make a buffer local variable.
int mark([int type = MK_NORMAL])
Toggle the anchor status.
int mark_line(int flag,
 [int toggleall],
  [int bufnum],
 [int lineno = 0],
 [int marker = L_MARKED])
Create a line marker.
int message(string format,
 ...)
Display a message on the command line.
int mkdir(string pathname,  
int mode =  0755)
Create a directory.
string mktemp(string path)
Make a temporary filename.
string mode_string([int mode],
[int format = 0],
[string path])
Conversion stat mode to a string representation.
float modf(float num,
float &mod)
Decompose a floating-point number.
int module(string modulename)
Assign a module identifier.
int move_abs([int line = -1],
[int column = -1],
 [int bufnum],
[int clip = FALSE])
Move to an absolute location in the buffer.
int move_edge([int direction],
[int amount])
Modify a window.
int move_rel([int lines = 1],
[int cols = 1])
Move to a relative location in the buffer.
int next_buffer([int sysflag = 0],
 [int previous],
[int tab])
Identifier of the next buffer.
int next_char([int characters = 1])
Move to the next character.
int next_window(int winnum)
Obtain the next window identifier.
void nothing()
Noop.
declare nth(list expr,
int idx,
 [int idx2 ...])
Extract the indexed list item.
int output_file([string filename])
Change the output file-name.
int page_down([int pages = 1])
Move position down a page.
int page_up([int pages = 1])
Move position up a page.
int parse_filename(string fullname,
 [string &drive],
  [string &path],
 [string &filename],
 [string &ext])
Parse a file into its components.
int paste([int syspaste = FALSE])
Insert scrap buffer at cursor location.
void pause()
Pause keystroke definition.
int pause_on_error([int pause = NULL],
[int echo = TRUE])
Set the error display mode.
int pause_on_message([int pause = NULL],
[int echo = TRUE])
Set the message display mode.
string perror( [int errnum = errno],
string format,
 ...)
Print error.
int playback([int macroid])
Replay a keystroke macro.
declare pop(list expr)
Pop the last element.
expr++
Postfix Increment.
expr--
Postfix Decrement.
float pow(float x,
float y)
Raise to power.
int prev_char([int characters = 1])
Move to the previous character.
int previous_buffer([int sysflag = 0],
[int tab])
Identifier of the previous buffer.
int print()
Print formatted string to stdout.
void printf(string format,
 ...)
Print formatted string to stdout.
void process()
Invoke a Grief engine.
void process_mouse(   [int b1],
 [int b2],
 [int b3],
int x,
int y)
Process mouse event.
void profile([int flags])
Profiling support.
declare push(list lst,
declare value ...)
Add an element onto a list.
void push_back(int key,
  [int front],
 [int x],
 [int y])
Push back a character into the keyboard.
declare put_nth(symbol,
...)
Modify a list element.
int put_parm(int argidx,
 declare val,
 [int optional = TRUE])
Assign an argument value.
void putenv(string name,
 [string value])
Set an environment variable.
list quote_list(...)
Build an unevaluated list.
string quote_regexp(string text)
Quote regexp special characters.
int raise_anchor()
Raise the last dropped mark.
int rand([int upper])
Generate a random number.
list re_comp( [int flags],
string pattern,
 [string &error])
Compile a regular expression.
int re_delete(list handle)
Delete a compiled expression.
int re_result([int capture],
 [string &value],
[int &offset],
[int &length])
Retrieve search captures.
int re_search([int flags],
[string pattern],
 [declare object],
[int start],
[int lensym])
Search for a string.
int re_syntax([int re],
[int case],
[int capture])
Set the regular expression mode.
int|string re_translate( [int flags],
string pattern,
  [string replacement],
 [declare object])
Search and replace.
string read([int number],
[int &status])
Read characters from the buffer.
void read_char([int timeout = 0],
[int mode = 0])
Read next key from the keyboard.
int read_ea(string filename,
 ...)
Read file extended information.
int read_file([string filename],
 [int glob = TRUE],
[string encoding = NULL])
Read into the current buffer.
string|int readlink(string path,
 [string &link])
Read the contents of a symbolic link.
int realpath(string pathname,
string resolved_path)
Resolve a pathname.
void redo()
Redo an undo operation.
void redraw([int winch])
Redraw screen.
void ref_parm(int argument,
 string local_symbol,
 [int optional = FALSE])
Create a reference parameter.
void refresh()
Update the display.
register idx1, sym1, idx2, sym2 ...;
Define a variable as being a register.
int register_macro(int type,
 string macro,
 [int local = FALSE])
Register a callback procedure.
int reload_buffer([int bufnum],
[string encoding])
Reload the buffer content.
int remember([string|int overwrite],
[int macroid])
Start remembering keystrokes.
int remove(string filename)
Remove a file.
int rename(string old,
string new)
Rename a file.
replacement <macro-definition>
Overload an existing macro definition.
int require(string filename)
Enforce the use of an external module.
int reregister_macro(int type,
 string macro,
 [int local = FALSE])
Register a unique callback procedure.
int restore_position([int what = 1])
Restore a previously saved position.
return [<expression>];
Return from a macro.
returns (expression);
Return an expression from a macro.
int right([int columns = 1],
[int wrap = TRUE])
Move position right one character.
int rindex(string str,
int ch|string s)
Search string for a rightmost sub-string or character.
int rmdir(string path)
Remove directory.
string rtrim(string str,  
string chars =  \\t \\r \\n)
Chomp characters from the end of a string.
int save_keystroke_macro(string filename)
Save the current keystroke macro.
void save_position()
Saves current cursor/buffer state.
int screen_dump(string filename)
Dump an image of the screen.
int search_back(string pattern,
 [int re],
 [int case],
  [int block],
 [int length])
Backwards buffer search.
int search_case([int case])
Set the search pattern case mode.
int search_fwd(string pattern,
 [int re],
 [int case],
  [int block],
 [int length])
Buffer search.
int search_list( [int start],
string pattern,
 list expr,
 [int re],
 [int case])
Search list contents.
int search_string(string pattern,
string text,
  [int &length],
 [int re],
 [int case])
Searches for a pattern in a string.
int searchpath( [string path],
string filename,
  [string extension],
string &result,
 [int mode],
 [int expand = FALSE])
Searches for a given file in a specified path.
void self_insert([int character])
Insert a character as if it was typed.
int send_signal(int signal)
Send signal to a process buffer.
int set_attribute(  [int|string text],
[int|string normal],
 [int bufnum])
Set the color attributes.
int set_backup(int mode,
 [int bufnum])
Set backup creation mode.
int set_backup_option(int what,
 [int bufnum],
 parameter)
Set backup options.
int set_binary_size([int size])
Set binary chunk size.
int set_btn2_action([int action])
Set the second button action.
int set_buffer(int bufnum)
Set the current buffer.
int set_buffer_cmap([int mapid|string name],
[int bufnum])
Set a buffers character-map.
void set_buffer_flags([int bufnum],
 [string|int or_mask],
[string|int and_mask],
 [int set = 1])
Set buffer flags.
int set_buffer_title(  [int bufnum],
[string title])
Set a buffers title.
int set_buffer_type([int bufnum],
 [int type = NULL],
[string encoding = NULL])
Set the buffer storage type.
void set_calling_name(string name =  NULL)
Set the name of the calling macro.
void set_char_timeout([int timeout])
Set the escape delay.
int set_color([list|string spec],
[int create = TRUE])
Set screen colors.
void set_color_pair(string|int ident,
  [int|string fg],
 [int|string bg],
 [int|string sf])
Set a specific color.
void set_ctrl_state(int ctrl,
int state,
 [int winnum])
Set the state of a window control.
int set_ea(string filename,
 ...)
Set file extended information.
void set_echo_format([string format = NULL])
Set the echo line format.
int set_encoding([string encoding = NULL],
 [int bufnum = NULL])
Set a buffers character encoding.
int set_feature([int|string feature],
[string value])
Config an editor feature.
int set_file_magic([string encoding],
[int cost])
Define the file type detection rules.
int set_font([string normalfont],
[string italicfont])
Set the current window fonts.
int set_idle_default(int internal =  0)
Set idle interval.
int set_indent([int indent],
[int bufnum])
Set the buffers default indentation.
void set_kbd_name(string name,
 [int kbdid])
Set the keyboard name.
int set_line_flags([int bufnum],
[int start],
[int end],
 [int and_mask],
[int or_value])
Associate line flags.
string set_macro_history(  [int index = 0],
[string value])
Set the macro execution history.
int set_margins([int bufnum],
 [int left = NULL],
[int right = NULL],
 [int style = NULL],
[int colorcolumn = NULL])
Set buffer formatting margins.
int set_mouse_action(string mouse_handler)
Set keyboard mouse handler.
int set_mouse_type()
Sets the mouse type.
int set_msg_level(int level)
Set level of informational messages.
int set_process_position([int line],
[int column])
Set process insertion position.
int set_property(  int obj_id,
string key,
 [declare value])
Set a dictionary item.
int set_ruler([int bufnum],
[list|string|int ...])
Configure the buffer ruler.
void set_scrap_info(  [int last],
[int type],
[int bufnum])
Set the scrap buffer details.
int set_syntax_flags(int flags,
 [int|string syntable])
Set syntax flags.
int set_tab([int increment],
[int bufnum])
Derive the buffer tab stops.
int set_term_characters(int value0,
 ....)
Set terminal special characters.
int set_term_feature(  int|string ident,
 [string|int value])
Set a terminal attribute.
int set_term_features(list features)
Define terminal attributes.
int set_term_keyboard(list kbd)
Define terminal keyboard definitions.
int set_terminator( [int bufnum],
int|string term)
Set a buffers line terminator.
int set_top_left([int line],
[int column],
 [int winnum],
[int csrline],
[int csrcolumn],
[int bufnum])
Manages window view port coordinates.
int set_window(int winnum)
Set the active window.
int set_window_cmap([int mapid|string name],
[int winnum])
Set a windows character-map.
void set_window_flags([int winnum],
 [string set|int or_mask],
[string clear|int and_mask])
Set window flags.
int set_window_priority(int priority,
 [int winnum])
Set the window display priority.
void set_wm_name([string wname],
[string iname])
Set the window and/or icon name.
int shell([string cmd],
[int use_shell],
 [string completion],
 [string stdin],
[string stdout],
[string stderr],
 [int mode],
[string spec])
Spawn a sub-shell process.
declare shift(list lst)
Shift the first list element.
float sin(float val)
Sine function.
float sinh(float val)
Hyperbolic sine function.
void sleep([int seconds = 1],
[int milliseconds = 0])
Suspend execution for an interval of time.
int sort_buffer([int bufnum],
[string|int comparator = 0],
 [int start],
[int end],
[int type = 3])
Sort buffer content.
list sort_list(list lst,
  [string|int comparator = 0],
 [int type = 3])
Sort list.
list spell_buffer(int start_line,
 [int end_line],
  [int tokenize = 1],
 [int suggest])
Spell the specified buffer.
declare spell_control(int action,
 ...)
Spell control.
int spell_dictionary(int,
string|list)
Spell dictionary modifications.
int spell_distance(string a,
string b)
Edit distance.
int spell_string(string word,
 [int length],
  [int tokenize = 0],
 [int suggest = FALSE])
Spell the specified word or line.
list spell_suggest(string word,
 [int length])
Suggest spelling of the the specified word.
int splice(list lst,  
int offset =  0,
  [int length],  
 [declare value]  )
Splice a list, removing and/or adding elements.
list split(string expr,
string|integer delims,
  [int numeric = FALSE],
 [int noquoting = FALSE],
  [int empties = FALSE],
 [int limit = NULL])
Split a string into tokens.
list split_arguments(string arguments)
Argument split.
int splithpath(string path,
  [string &dir],
 [string &name],
 [string &ext],
 [string &drive])
Searches for a given file in a specified path.
int sprintf(string &buffer,
string format,
 ...)
Formatted printing to a string.
float sqrt(float val)
Square root function.
int srand([int seed = time()],
[int depth])
Seed the random number generator.
int sscanf(string str,
string format,
 ...)
Read formatted data from string.
int stat([string path],
[int size],
 [int mtime],
[int ctime],
 [int atime],
[int mode],
[int uid],
[string uid2name],
 [int gid],
[string gid2name],
 [int nlink],
[int inode])
Obtain file information.
static var1, var2, ..;
Define a function or module scope.
int strcasecmp(string s1,
string s2,
 [int length])
String case insensitive compare.
sub-string. int strcasestr(
   string haystack,
   string needle
)
Locate first occurrence of a case insensitive.
int strcmp(string s1,
string s2,
 [ int length])
String compare.
string strerror([int errnum = errno],
 [string &manifest],
[int multi = FALSE])
String error.
int strfilecmp(string file1,
string file2,
 [int length])
Filename comparison.
string strftime([string format = NULL],
[int time = NULL])
Format time and date.
string sym1, sym2 ...;
Declare a string symbol.
int string_count(string haystack,
int needle|string needles)
Count occurrences of characters in a string.
int strlen(string|list arg,
 [int step = 1])
String length.
int strnlen(string|list arg,
int maxlen,
 [int step = 1])
String length limited to an explicit maximum.
int strpbrk(string str,
string characters)
Search a string for any of a set of characters.
string strpop(string str,
 [int length = 1])
Pop the leading character(s).
int strrstr(string haystack,
string needle)
Locate last occurrence of a sub-string.
int strsignal(int signo,
  [string &manifest],
 [int multi = FALSE])
Return string describing signal.
int strstr(string haystack,
string needle)
Locate first occurrence of a sub-string.
int strtod(string str,
 [int &endofoffset])
String to double.
int strtof(string str,
 [int &endofoffset])
String to float.
int strtol(string str,
 [int &endoffset],
 [int base])
Convert a string into its numeric value.
int strverscmp(string s1,
string s2)
Version string compare.
string substr(string str,
 [int offset],
 [int length])
Extract a sub-string.
void suspend()
Suspend current process.
int swap_anchor()
Swaps the mark with the current position.
switch(expr) statement
Switch statement.
int symlink(string path1,
string path2)
Create a symbolic link.
void syntax_build([int timestamp],
 [string cache],
[int|string syntable])
Build a syntax hiliting engine.
int syntax_column_ruler(  list ruler,
 [string attribute],
 [int|string syntable])
Column syntax coloriser.
void syntax_rule(string pattern,
 string attribute,
 [int|string syntable])
Define a syntax hilite rule.
void syntax_token(int type,
  [<type1> param1],
 [<type2> param2],
 [int|string syntable])
Define a syntax token.
int tabs([string tabs | list tabs | int tab, ...])
Set buffer tab stops.
int tagdb_close(int handle)
Tag database close.
int tagdb_open(  string file,
 [int options],
 [int background])
Tag database open.
int tagdb_search(  int handle,
string word,
 [int flags])
Tag database search.
float tan(float val)
Tangent function.
float tanh(float val)
Hyperbolic tangent function.
throw expr;
Throw an exception.
int time([int &hour],
[int &min],
[int &sec],
[int &msec])
Get the current system time.
list tokenize(string expr,
string delims,
int flags,
 [string whitespace = "\t\n\r"])
Tokenize a string into token elements.
int top_of_buffer()
Move cursor to start of current buffer.
int top_of_window()
Goto top of the current window.
int transfer(int bufnum,
 int sline,
 [int scolumn],
int eline,
 [int ecolumn])
Buffer to buffer transfer.
int translate(string pattern,
string replacement,
  [int global],
 [int re],
 [int case],
  [int block],
 [int forward])
Buffer search and replace.
int translate_pos(int x,
int y,
  [int &winnum],
 [int &line],
 [int &col])
Convert window coordinates.
string trim(string str,
 [string chars = " \\t\\r\\n"])
Chomp characters from a string.
try statement; catch statement; finally statement;
Try statement.
string typeof(declare &symbol)
Determine the symbol type.
int umask(int cmask =  NULL)
Set and get the file mode creation mask.
int uname([string &sysname],
[string &nodename],
 [string &version],
[string &release],
 [string &machine])
Retrieve system information.
int undo([int move],
[int pastwrite = -1],
[int redo = FALSE])
Undo previous edit operations.
int unlink(string path)
Unlink a file.
int unregister_macro(int type,
 string macro,
 [int local = FALSE])
Remove a registered macro.
declare unshift(list lst,
declare value)
Shift the first list element.
int up([int lines = 1])
Move position up one line.
string|int upper(string str|int character)
Convert string or character to uppercase.
int use_local_keyboard(int kbdid)
Associate a keyboard with a buffer.
int use_tab_char([int|string yesno],
[int global = FALSE])
Configure use of hard/soft tabs.
int version([int major | string machtype],
 [int min],
[int edit],
[int release],
[string machtype],
 [string compile],
[int cmversion],
 [string features],
[string build])
Version information.
int vfs_mount(  string mountpoint,  
int flags =  0,
string vfsname,  
  [string arguments]  )
Mount a virtual file-system.
int vfs_unmount(string mountpoint,  
int flags =  0)
Unmount a virtual file-system.
int view_screen()
View the content of underlying screen.
int wait([int &status])
Wait for attached process to terminate.
int wait_for( [int timeout],
 list|string pattern,
 [int flags = 0])
Wait for process output.
void watch(string symbol)
Watch a symbol.
while ([condition]) statements;
while statement.
declare widget_get([int dialog],
 [int name|string name],
 [int attr = DLGA_VALUE],
 [int index = 0])
Retrieve a widget attribute.
declare widget_set( [int dialog],
  [int name|string name],
declare value,
  [int attr = DLGA_VALUE],
 [int index = 0])
Set a widget attribute.
int window_color([int color|string color],
[int winnum])
Set the window attribute.
int write_block([string filename],
 [int append = FALSE],
[int keep = FALSE],
 [int pause = TRUE])
Write selected region.
int write_buffer(  [string filename],
[int flags],
[string encoding])
Write to buffer content.
expr1 | expr2
Bitwise OR operator.
var |= expr1
Bitwise OR assignment operator.
expr1 || expr2
Logical OR operator.
~expr
Bitwise complement.
extern const string BPACKAGES;
BRIEF packages default.
extern const string CRISP_OPSYS;
Operating system identifier.
extern const string GRBACKUP;
Backup path.
extern const string GRDICTIONARIES;
Dictionary locales.
extern const string GRDICTIONARY;
Dictionary search path.
extern const string GRFILE;
Default empty file name.
extern const string GRFLAGS;
Default command line arguments.
extern const string GRHELP;
Help search path.
extern const string GRINIT_FILE;
GRIEF initialisation name.
extern const string GRKBDPATH;
Keyboard library search path.
extern const int GRLEVEL;
GRIEF Nesting level.
extern const string GRLOG_FILE;
GRIEF diagnostics log file name.
extern const string GRPATH;
Macro object search path.
extern const string GRPROFILE;
Profile directory override.
extern const string GRPROGNAME;
GRIEF application path.
extern const string GRRC;
GRIEF resource file path.
extern const string GRRC_FILE;
GRIEF initialisation name.
extern const string GRRESTORE_FILE;
GRIEF restore file name.
extern const string GRSTATE_DB;
GRIEF state database name.
extern const string GRSTATE_FILE;
GRIEF state file name.
extern const string GRTEMPLATE;
Source template search path.
extern const string GRTERM;
Terminal override.
extern const string GRTERMCAP;
Terminal capability database.
extern const string GRTMP;
Temporary dictionary.
extern const int GRVERSIONMAJOR;
GRIEF major version.
extern const int GRVERSIONMINOR;
GRIEF minor version.
extern const int GRVERSIONS;
Backup versions.