Sprintf : C function: void SLsprintf (0 args) Prototype: String Sprintf(String format, ..., Integer n); Sprintf formats a string from 'n' objects according to 'format'. Unlike its C counterpart, Sprintf requires the number of items to format. For example. Sprintf("%f is greater than %f but %s is better than %s\n", PI, E, "Cake" "Pie", 4); The final argument to Sprintf is the number of items to format; in this case, there are 4 items. -------------------------------------------------- _clear_error : C function: void SLang_clear_error (0 args) May be used in error blocks to clear the error that triggered the error block. Execution resumes following the statement triggering the block. -------------------------------------------------- _stkdepth : C function: int SLstack_depth (0 args) returns number of items on stack -------------------------------------------------- acos : C function: int math_acos (0 args) -------------------------------------------------- add_completion : C function: void add_to_completion (1 args) Prototype Void add_completion(String f); Add S-Lang function with name 'f' to the list of function completions. See also: read_with_completion -------------------------------------------------- add_mode_for_extension Prototype: Void add_mode_for_extension (String mode, String ext); This function modifies Mode_List in such a way that when a file with filename extension `ext' is read in, function `mode' will be called to set the mode. -------------------------------------------------- aget : C function: void SLarray_getelem (0 args) Syntax: i j ... k ARRAY aget returns ARRAY[i][j]...[k] -------------------------------------------------- append_region_to_file : C function: int append_to_file (1 args) appends a region to FILE returning number of lines written or -1 on error. This does NOT modify a buffer visiting the file; however, it does flag the buffer as being changed on disk. -------------------------------------------------- append_region_to_file : C function: int append_to_file (1 args) appends a region to FILE returning number of lines written or -1 on error. This does NOT modify a buffer visiting the file; however, it does flag the buffer as being changed on disk. -------------------------------------------------- append_string_to_file Prototype: Integer append_string_to_file (String str, String file); The string 'str' is appended to file 'file'. This function returns -1 upon failure or the number of lines written upon success. See append_region_to_file for more information. -------------------------------------------------- aput : C function: void SLarray_putelem (0 args) Syntax: x i j ... k ARRAY put sets ARRAY[i][j]...[k] = x -------------------------------------------------- array_sort : C function: void SLarray_sort (1 args) Requires an array on the stack as well as a function name to call for the comparison. The array to be placed on the stack is the array to be sorted. The routine returns an integer index array which indicates the result of the sort. The first array is unchanged. -------------------------------------------------- asin : C function: int math_asin (0 args) -------------------------------------------------- atan : C function: int math_atan (0 args) -------------------------------------------------- autoload : C function: void SLang_autoload (2 args) Prototype: Void autoload(String fun, String file); This function simply declares function 'fun' to the interpreter. When 'fun' is actually called, its actual function definition will be loaded from 'file'. Example: autoload ("bessel_j0", "/usr/lib/slang/bessel.sl"); See Also: evalfile -------------------------------------------------- autosave : C function: void auto_save (0 args) autosave current buffer if marked for autosave -------------------------------------------------- autosaveall : C function: void auto_save_all (0 args) save all buffers marked for autosave -------------------------------------------------- backward_paragraph : C function: void backward_paragraph (0 args) move point past current paragraph. Slang hook is_paragraph_seperator is called (if defined) to determine if line is a paragraph seperator. -------------------------------------------------- beep : C function: void beep (0 args) Send beep to screen. -------------------------------------------------- bfind : C function: int backward_search_line (1 args) returns TRUE if STRING found backward on current line -------------------------------------------------- bkmrk_goto_mark -------------------------------------------------- bkmrk_set_mark -------------------------------------------------- blank_rect : C function: void blank_rectangle (0 args) blanks out rectangle defined by point and mark -------------------------------------------------- blooking_at -------------------------------------------------- bob : C function: void bob (0 args) Prototype: Void eob(); Move Point to the beginning of the buffer. See also: bobp, eob, bol, eol -------------------------------------------------- bobp : C function: int bobp (0 args) TRUE if at beginning of buffer -------------------------------------------------- bol : C function: void bol (0 args) Prototype: Void bol(); Moves Point to the beginning of the current line. See also: eol, bob, eob, bolp -------------------------------------------------- bol_bsearch : C function: int bol_bsearch (1 args) Search backward string at beginning of line. Returns TRUE if found -------------------------------------------------- bol_fsearch : C function: int bol_fsearch (1 args) Search forward for string at beginning of line. Returns TRUE if found -------------------------------------------------- bolp : C function: int bolp (0 args) Prototype: Integer bolp (); 'bolp' is used to test if the Point is at the beginning of a line. It returns non-zero if at the beginning of a line and 0 if not. See also: bol, eolp, bobp, eobp -------------------------------------------------- bsearch : C function: int search_backward (1 args) Prototype: Integer bsearch (String str); Searches backward from the current Point for 'str'. If 'str' is found, this function will return non-zero and the Point will be placed at the location of the match. If a match is not found, zero will be returned and the Point will not change. See also: fsearch, bol_bsearch, re_bsearch -------------------------------------------------- bskip_chars : C function: void bskip_chars (1 args) skip backward chars in STRING. See skip_chars for definition of STRING -------------------------------------------------- bskip_non_word_chars : C function: void bskip_non_word_chars (0 args) skip backwards over all characters that do not constitute a word. -------------------------------------------------- bskip_word_chars : C function: void bskip_word_chars (0 args) skip backwards over all characters that constitute a word. -------------------------------------------------- bskip_word_chars : C function: void bskip_word_chars (0 args) skip backwards over all characters that constitute a word. -------------------------------------------------- buffer_filename -------------------------------------------------- buffer_format_in_columns() Prototype Void buffer_format_in_columns(); takes a buffer consisting of a sigle column of items and converts the buffer to a multi-column format. -------------------------------------------------- buffer_keystring : C function: void do_buffer_keystring (1 args) Prototype: Void buffer_keystring (String str); Append string 'str' to the end of the input stream to be read by JED's getkey routines. See also: ungetkey, getkey -------------------------------------------------- buffer_list : C function: void make_buffer_list (0 args) returns a list of buffers to the stack. The top element of the stack is the number of buffers -------------------------------------------------- buffer_modified () returns non-zero if the buffer modified flag is set. It returns zero if the buffer modified flag is not been set. This works on the current buffer. See also 'set_buffer_modified_flag'. -------------------------------------------------- buffer_visible : C function: int jed_buffer_visible (1 args) Prototype: Integer buffer_visible(String buffer); Returns non-zero if 'buffer' is currently visible in a window or it returns zero if not. -------------------------------------------------- bufferp : C function: int bufferp (1 args) returns TRUE if BUFFER exists -------------------------------------------------- bufsubstr : C function: void buffer_substring (0 args) Prototype: String bufsubstr(); This function returns the region specified by the Point and Mark as a String. If the region crosses lines, the string will contain newline characters. See also: insbuf, push_mark -------------------------------------------------- bury_buffer : C function: void bury_buffer (1 args) Prototype: Void bury_buffer(String name); Make buffer 'name' unlikley to appear in a window. -------------------------------------------------- byte_compile_file : C function: void SLang_byte_compile_file (2 args) Prototype Void byte_compile_file (String file, Integer method); byte compiles 'file' producing a new file with the same name except a 'c' is added to the output file name. For example, byte_compile_file("site.sl"); produces a new file named 'site.slc'. If 'method' is non-zero, the file is preprocessed only. Note that the resulting bytecompiled file must only be used by the executable that produced it. Set 'method' to a non-zero value to use the byte compiled file with more than one executable. -------------------------------------------------- c_mode() Mode dedicated to facilitate the editing of C language files. Functions that affect this mode include: function: default binding: brace_bra_cmd { brace_ket_cmd } newline_and_indent RETURN indent_line_cmd TAB goto_match ^\ c_make_comment ESC ; Variables affecting indentation include: C_INDENT C_BRACE C_Comment_Column --- used by c_make_comment -------------------------------------------------- call : C function: void call_cmd (1 args) Prototype: Void call(String f); Execute internal function named 'f'. An internal function is a function that cannot be directly accessed from S-Lang. See: is_internal. -------------------------------------------------- case : C function: int generic_equals (0 args) Prototype: Integer case(a, b); This function is designed to make the switch statement look more like the C one. Basically, it does a generic compare operation. Both parameters 'a' and 'b' must be of the same type. It returns zero if their types differ or have different values. In a switch statment, it may be used as: switch (token) { case "return": return_function ();} { case "break": break_function ();} Unlike the C version, it one cannot have: switch (i) {case 10: case 20: do_ten_or_twenty (i);} One must do: switch (i) {case 10 or case (i, 20) : do_ten_or_twenty (i);} -------------------------------------------------- change_default_dir : C function: int ch_dir (1 args) Change default directory to new directory. Returns 0 upon success and -1 upon failure. All relative path names are expanded with respect to the new default directory. -------------------------------------------------- char : C function: void SLdo_char (0 args) Prototype: String char (Integer c); This function takes and integer and returns a string of length 1 whose first character has ascii value 'c'. -------------------------------------------------- check_region : C function: void check_region (1 args) Signals Error if mark not set. Exchanges point and mark to produce valid region. A valid region is one with mark earlier in the buffer than point. Always call this if using a region which requires point > mark. Also, if argument is non-zero, spot is pushed. -------------------------------------------------- chmod : C function: int unix_chmod (2 args) Prototype Integer chmod(String file, Integer mode); 'chmod' changes the permissions of 'file' to those specified by 'mode'. It returns 0 upon success, -1 if the process lacks sufficient privilege for the operation, or -2 if the file does not exist. See also: chown, stat_file -------------------------------------------------- chown : C function: int unix_chown (3 args) Prototype Integer chown(String file, Integer uid, Integer gid); Change ownership of 'file' to that of user id 'uid' and group id 'gid'. This function returns 0 upon success and a negative number up failure. It returns -1 if the process does not have sufficent privileges and -2 if the file does not exist. See also: chmod, stat_file -------------------------------------------------- command_line_arg : C function: string command_line_argv (1 args) Takes integer parameter N in the range: 0 <= N < MAIN_ARGC. MAIN_ARGC is a global variable indicating the number of command line parameters. This function returns the Nth parameter. See Also the variable MAIN_ARGC -------------------------------------------------- command_line_hook() called from main in JED executable. -------------------------------------------------- copy_array : C function: void SLcopy_array (0 args) Prototype: Void copy_array(Array b, Array a); Copies the contents of array 'a' to array 'b'. Both arrays must be of the same type and dimension. -------------------------------------------------- copy_rect : C function: void copy_rectangle (0 args) save a copy of rectangle defined by point and mark in rectangle buffer -------------------------------------------------- copy_region : C function: void copy_region_cmd (1 args) Prototype: Void copy_region (String buf); Copies a marked region in the current buffer to buffer 'buf'. See also: insbuf, bufsubstr -------------------------------------------------- core_dump : C function: void exit_error_cmd (2 args) Prototype: Void core_dump(String msg, Integer severity); Exit editor sumping the state of some crucial variables. If severity is 1, dump core if possible. Message msg is also displayed. -------------------------------------------------- cos : C function: int math_cos (0 args) -------------------------------------------------- count_chars : C function: void count_chars (0 args) returns a string of form "char 37, point 2150 of 10067" where 2150 is character number of Point and 10067 is the total. 37 is the ascii value of current character. A string is returned instead of numbers because MSDOSints are only 16 bits and S-Lang does not have long integer types. -------------------------------------------------- create_array : C function: void SLang_create_array (0 args) Prototype: create_array (Integer type, Integer i_1, i_2 ... i_dim, dim); Creates an array of type 'type' with dimension 'dim'. i_n is an integer which specifies the maximum size of array in direction n. 'type' is a control integer which specifies the type of the array. Types are: 's' : array of strings 'f' : array of floats 'i' : array of integers 'c' : array of characters At this point, dim cannot be larger than 3. Also note that space is dynamically allocated for the array and that copies of the array are NEVER put on the stack. Rather, references to the array are put on the stack. When the array is no longer needed, it must be freed with 'free_array' Example: variable a = create_array ('f', 10, 1); This creates a 1 dimensional array of 10 floats and assigns it to 'a' See also: free_array -------------------------------------------------- define_case : C function: void SLang_define_case (2 args) Two parameters are integers in the range 0 to 255. The first integer is the ascii value of the upprcase character and the 2nd integer is the value of its lowercase counterpart. For example, to define X as the uppercase of Y, do: X Y define_case -------------------------------------------------- define_word : C function: void define_word (1 args) Only argument is a string which is an expression which defines a word. Typically, it is a range of ascii values. The default definition is: "a-z0-9" To include a hyphen, make it the first character. So for example, "-i-n" defines a word to consist of letters 'i' to 'n' and '-' -------------------------------------------------- definekey : C function: void set_key_in_keymap (3 args) Prototype: Void definekey(String f, String key, String kmap); This function is used for binding keys to functions in a specific keymap. Here 'f' is the function to be bound, 'key' is a sequence of keys and 'kmap' is the name of the keymap to be used. See 'setkey' for a definition of 'keys'. See also: setkey, undefinekey, make_keymap, use_keymap -------------------------------------------------- del_region : C function: void delete_region (0 args) Prototype: Void del_region(); Deletes the region specified by the Point and Mark. See also: push_mark, markp, check_region -------------------------------------------------- del_region : C function: void delete_region (0 args) Prototype: Void del_region(); Deletes the region specified by the Point and Mark. See also: push_mark, markp, check_region -------------------------------------------------- delbuf : C function: void kill_buffer_cmd (1 args) deletes specified buffer name -------------------------------------------------- delete_file : C function: int sys_delete_file (1 args) Deletes FILENAME. Returns 1 if deletion was successful, otherwise it returns 0. -------------------------------------------------- deln Prototype: Void deln (Integer n); delete the next 'n' characters. -------------------------------------------------- dircat(dir, file) A function to contat a directory with a filename. Basically checks for the final slash on the dir and adds on if necessary -------------------------------------------------- directory : C function: int expand_wildcards (1 args) returns number of files and list of files which match filename. On unix, this defaults to filename*. It is primarily useful for DOS and VMS to expand wilcard filenames -------------------------------------------------- dired () Mode designed for maintaining and editing a directory. To invoke Dired, do `M-x dired' or `C-x d' (emacs) Dired will prompt for a directory name and get a listing of files in the requested directory. The primary use of Dired is to "flag" files for deletion and then delete the previously flagged files. 'd' Flag this file for deletion. 'u' Remove deletion flag on this line. DEL Move point to previous line and remove deletion flag. '~' Flag all backup files for deletion. 'x' eXpunge all flagged files. Dired will show a list of the files tagged for deletion and ask for confirmation before actually deleting the files. 'r' Rename file on the current line; prompts for a newname 'm' Move tagged files to a new dir; prompts for dir name `g' Update the entire contents of the Dired buffer `f' Visit the file described on the current line, like typing `M-x find_file' and supplying that file name. If current line is a directory, runs dired on the directory and the old buffer is killed. `v' View the file described on the current line in MOST mode. `M-x dired_search' use fsearch to perform a search through the files listed in the dired buffer from the current point forward. `M-x dired_search' from the visited file will revert to the dired buffer and continue the search from the next file in the list. all the usual motion commands plus some extras: `C-n' `n' SPC move point to the next line (at the beginning of the file name) `C-p' `p' move point to the previous line (at the beginning of the file name) `M-x dired_kill_line' `^K' (emacs) removes a line from the dired buffer -------------------------------------------------- down : C function: int nextline (1 args) Prototype: Integer down(Integer n); Move Point down 'n' lines returning number of lines actually moved. The number returned will be less than 'n' only if the last line of the buffer has been reached. See also: down, left, right -------------------------------------------------- dump_bindings : C function: void dump_bindings (1 args) Prototype: Void dump_bindings(String map); Dumps a list of the keybindings for the keymap specified by 'map'. -------------------------------------------------- dup : C function: void SLdo_dup (0 args) duplicate top object on the stack. -------------------------------------------------- dupmark : C function: int dup_mark (0 args) Prototype Integer dupmark (); This function returns zero if the mark is not set or, if the mark is set, a duplicate of it is pushed and 1 is returned. -------------------------------------------------- enable_flow_control : C function: void enable_flow_control (1 args) If integer argument is non-zero, ^S/^Q flow control is enabled. If argument is 0, ^S/^Q processing by the terminal is disabled. Emacs mode sets this to 0 (flow control off). -------------------------------------------------- enable_top_status_line : C function: void enable_menu_bar (1 args) Prototype: Void enable_top_status_line (Integer x); If x is non-zero, the top status line is enabled. If x is zero, the top status line is disabled and hidden. See also: set_top_status_line -------------------------------------------------- enlargewin : C function: void enlarge_window (0 args) Makes the current window bigger by one line. -------------------------------------------------- eob : C function: void eob (0 args) Prototype: Void eob(); Move Point to the end of the buffer. See also: eobp, bob, bol, eol -------------------------------------------------- eobp : C function: int eobp (0 args) Prototype: Integer eobp(); Returns non-zero if the Point is positions at the beginning of the buffer otherwise it returns zero. See also: eob, bolp, eolp -------------------------------------------------- eol : C function: void eol (0 args) Prototype Void eol(); Moves Point to the end of the current line. See also: eolp, bol, bob, eob -------------------------------------------------- eolp : C function: int eolp (0 args) Returns TRUE if Point is at the end of a line. -------------------------------------------------- erase_buffer : C function: void erase_buffer (0 args) erases all text from the current buffer. See: delbuf -------------------------------------------------- error : C function: void msg_error (1 args) Prototype: Void error(String msg); Signals an error condition and displays the string 'msg' at the bottom of the display. The error can be caught by an ERROR_BLOCK and cleared with the '_clear_error' function. Unless caught, the error will cause the S-Lang stack to unwind to the top level. See also: _clear_error, message, flush -------------------------------------------------- evalbuffer : C function: void load_buffer (0 args) evaluates a buffer as S-Lang code. See: evalfile -------------------------------------------------- evalfile : C function: int SLang_load_file (1 args) Prototype: Integer evalfile (String file); Load 'file' as S-Lang code. If loading is successful, a non-zero result will be returned. If the file is not found, zero will be returned. See also: eval, autoload -------------------------------------------------- evalfile : C function: int SLang_load_file (1 args) Prototype: Integer evalfile (String file); Load 'file' as S-Lang code. If loading is successful, a non-zero result will be returned. If the file is not found, zero will be returned. See also: eval, autoload -------------------------------------------------- exit_jed : C function: void exit_jed (0 args) Prototype: Void exit_jed(); Exits JED. If any buffers are modified, the user is queried about whether or not to save first. Calls S-Lang hook "exit_hook" if defined. If "exit_hook" is defined, it must either call 'quit_jed' or 'exit_jed' to really exit the editor. If 'exit_jed' is called from 'exit_hook', 'exit_hook' will not be called again. -------------------------------------------------- exp : C function: int math_exp (0 args) -------------------------------------------------- expand_filename : C function: string expand_filename (1 args) expands filename to a canonical form -------------------------------------------------- expand_jedlib_file(f) Search for FILE in directories specified by JED_LIBRARY returning expanded pathname if found or the Null string otherwise. -------------------------------------------------- expand_keystring Prototype: String expand_keystring (String key) This function takes a key string that is suitable for use in a 'setkey' definition and expands it to a human readable form. For example, it expands ^X to the form "Ctrl-X", ^[ to "ESC", ^[[A to "UP", etc... See also: setkey -------------------------------------------------- extract_element : C function: string SLang_extract_list_element (3 args) Prototype: String extract_element (String list, Integer nth, Integer delim); Returns 'nth' element in 'list' where 'delim' separates elements of the list. 'delim' is an Ascii value. Elements are numbered from 0. For example: extract_element ("element 0, element 1, element 2", 1, ','); returns the string " element 1", whereas extract_element ("element 0, element 1, element 2", 2, ' '); returns "0,". See also: is_list_element. -------------------------------------------------- extract_filename : C function: string extract_file (1 args) Prototype: String extract_filename (String filespec); Separates the filename from the path of 'filespec'. Example: (unix) var = extract_filename ("/tmp/name"); assigns a value of "name" to 'var' -------------------------------------------------- ffind : C function: int forward_search_line (1 args) Returns TRUE if STRING is found forward current line. If found, Point is moved to string -------------------------------------------------- file_status : C function: int file_status (1 args) returns integer desecribing FILE: 2 file is a directory 1 file exists 0 file does not exist. -1 no access. -2 path invalid -3 unknown error -------------------------------------------------- file_time_compare : C function: int file_time_cmp (2 args) compares the modification times of two files, FILE1 and FILE2. returns positive, negative, or zero integer for FILE1 > FILE2, FILE1 < FILE2, or FILE1 == FILE2, resp. The operator '>' should be read 'is more recent than'. The convention adopted by the routine is that if a file does not exist, it was modified at the beginning of time. Thus, if 'f' exists, but 'g' does not, f g file_time_compare will return 1. -------------------------------------------------- file_type(file) returns type of file. e.g., /usr/a.b/file.c --> c -------------------------------------------------- filechgondsk : C function: int file_changed_on_disk (1 args) Returns true if FILE on disk is more recent than editor file -------------------------------------------------- find_file : C function: int find_file_in_window (1 args) finds FILE in current window returning non zero if file found. See Also: read_file -------------------------------------------------- find_file_hook(file) called AFTER a file is read in to a buffer. FILENAME is on the stack. -------------------------------------------------- find_jedlib_file(file) find a file from JED_LIBRARY, returns number of lines read or 0 if not found. -------------------------------------------------- find_tag -------------------------------------------------- float : C function: int slmath_do_float (0 args) Convert from integer or string representation to floating point. For example, "12.34" float returns 12.34 to stack. as another example, consider: 1 2 / ==> 0 since 1 and 2 are integers 1 2 float / ==> 0.5 since float converts 2 to 2.0 and floating point division is used. -------------------------------------------------- flush : C function: void flush_message (1 args) Takes 1 string argument and immediately displays it as a message in the minibuffer. It is exactly like the `message' function except that its effect is immediate. See: message, update -------------------------------------------------- flush_input -------------------------------------------------- format_paragraph_hook -------------------------------------------------- fortran_mode -------------------------------------------------- forward_paragraph : C function: void forward_paragraph (0 args) move point past current paragraph. Slang hook is_paragraph_seperator is called (if defined) to determine if line is a paragraph seperator. -------------------------------------------------- free_array : C function: void SLfree_array (0 args) Prototype: Void free_array (Array a); Frees up the space which array occupies. All reference to this space will now be meaningless and will generate an error. -------------------------------------------------- fsearch : C function: int search_forward (1 args) Prototype: Integer fsearch(String str); Search forward in buffer looking for string 'str'. If not found, this functions returns zero. However, if found, it returns non-zero and moves the Point to the start of the match. It respects the setting of the variable 'CASE_SEARCH'. See also: ffind, bsearch, bfind, re_fsearch, CASE_SEARCH -------------------------------------------------- get_doc_string : C function: int get_doc_string (2 args) read doc string for OBJECT from FILE. Returns 1 and string upon success or 0 on failure. If OBJECT is a functiion, it must be prefixed with an 'F'. If it is a variable, the prefix character is a 'V'. Example: "Fget_doc_string" -------------------------------------------------- get_key_function : C function: void get_key_function (0 args) Returns current key binding. If key has a binding, it also returns 0 if the function is S-Lang or non zero if it is internal. -------------------------------------------------- get_last_macro : C function: void get_last_macro (0 args) Prototype: String get_last_macro(); This function returns characters composing the last keyboard macro. The charactors that make up the macro are encoded as themselves except the following characters: '\n' ----> \J null ----> \@ \ ----> \\ '"' ----> \" -------------------------------------------------- get_yes_no : C function: int get_yes_no (1 args) Takes one argument-- a string that is used to get yes or no responce from user. Returns 1 if yes, 0 if no. Also returns -1 if abort and signals error. -------------------------------------------------- getbuf_info : C function: void get_buffer_info (0 args) Prototype: getbuf_info(); This function returns 4 values to the stack. The four value from the top are: Integer'flags' % buffer flags String 'buffer_name' % name of buffer String 'directory' % directory associated with buffer String 'file' % name of file associated with buffer (if any). The flags are encoded as: bit 0: buffer modified bit 1: auto save mode bit 2: file on disk modified bit 3: read only bit bit 4: overwrite mode bit 5: undo enabled bit 6: reserved bit 7: just save instead of autosaving. If bit 1 is set, this is ignored. For example, (file,,,) = getbuf_info(); returns the file associated with the buffer. See also: setbuf_info, whatbuf -------------------------------------------------- getenv : C function: void lang_getenv_cmd (1 args) Prototype: String getenv(String var); Returns value of an environment variable 'var' as a string. The empty "" is returned if the 'var' is not defined. See also: putenv -------------------------------------------------- getkey : C function: int jed_getkey (0 args) Read a key from input stream returning ASCII value read. -------------------------------------------------- getpid : C function: int jed_getpid (0 args) Prototype: Integer getpid(); Returns pid of current process. -------------------------------------------------- go_down Prototype: Void go_down (Integer n); Move down 'n' lines. See also: go_up, down -------------------------------------------------- go_left Prototype: Void go_left (Integer n); Move backward 'n' characters. See also: left, go_right -------------------------------------------------- go_right Prototype: Void go_right (Integer n); Move forward 'n' characters. See also: right, go_left -------------------------------------------------- go_up Prototype: Void go_up (Integer n); Move up 'n' lines. See also: up, go_down -------------------------------------------------- goto_bottom_of_window -------------------------------------------------- goto_column : C function: void goto_column (1 args) Move Point to COLUMN inserting spaces and tabs if necessary. -------------------------------------------------- goto_column_best_try : C function: int goto_column1 (1 args) Prototype: Integer goto_column_best_try (Integer c); This function is like goto_column except that it will not insert spaces. It returns the column number is did go to. -------------------------------------------------- goto_line : C function: void goto_line (1 args) move Point to LINE. -------------------------------------------------- help() Pop up a window containing a help file. The help file that is read in is given by the variable Help_File. -------------------------------------------------- indent_line : C function: void indent_line (0 args) Indent line according to current mode. -------------------------------------------------- init_char_array : C function: void SLinit_char_array (0 args) Prototype: Void init_char_array(Array_Type a, String s); a is an array of type 'c' (character array) and s is a string. -------------------------------------------------- input_pending : C function: int input_pending (1 args) Only argument is amount of seconds/10 to wait for input. 0 returns right away. Returns TRUE if there is input waiting. -------------------------------------------------- insbuf : C function: void insert_buffer_name (1 args) Prototype: Void insbuf (String buf); Insert buffer named 'buf' into the current buffer at Point. See also: copy_region -------------------------------------------------- insert : C function: void insert_string (1 args) Prototype: Void insert(String str); Inserts string 'str' in buffer at the current Point. See also: del, insert_file, insbuf -------------------------------------------------- insert_buffer -------------------------------------------------- insert_char(ch) insert a character into a buffer. This function should be called instead of 'insert' when it is desired to insert a 1 character string. Unlike 'insert', insert_char takes an integer argument. For example, 'x' insert_char and "x" insert are functionally equivalent but insert_char is more memory efficient. -------------------------------------------------- insert_file : C function: int insert_file (1 args) This returns <= 0 if file not found. -------------------------------------------------- insert_file_region : C function: int insert_file_region (3 args) -------------------------------------------------- insert_rect : C function: void insert_rectangle (0 args) insert contents of previously deleted rectangle at Point. -------------------------------------------------- insert_single_space () insert a single space into the buffer. -------------------------------------------------- integer : C function: void SLdo_integer (0 args) Convert from a string representation to integer. For example, "1234" integer returns 1234 to stack. -------------------------------------------------- integer : C function: void SLdo_integer (0 args) Convert from a string representation to integer. For example, "1234" integer returns 1234 to stack. -------------------------------------------------- is_defined : C function: int SLang_is_defined (1 args) Prototype: Integer is_defined (String obj); This function is used to determine whether or not 'obj' has been defined. If 'obj' is not defined, it returns 0. Otherwise, it returns a non-zero value that defpends on the type of object 'obj' represents. Specifically: +1 if arg is an intrinsic function +2 if user defined function -1 if intrinsic variable -2 if user defined variable -------------------------------------------------- is_internal : C function: int is_internal (1 args) Prototype Integer is_internal(String f); Returns non-zero is function 'f' is defined as an internal function or returns zero if not. Internal functions not immediately accessable from S-Lang; rather, they must be called using the 'call' function. See also: call, is_defined. -------------------------------------------------- is_list_element : C function: int SLang_is_list_element (3 args) Prototype: Integer is_list_element (String list, String elem, Integer delim); If 'elem' is an element of 'list' where 'list' is a 'delim' seperated list of strings, this function returns 1 plus the matching element number. If 'elem' is not a member of the list, zero is returned. Example: is_list_element ("element 0, element 1, element 2", "0,", ' '); returns 2 since "0," is element number one of the list (numbered from zero). See also: extract_element. -------------------------------------------------- is_substr : C function: void SLdo_issubstr (0 args) Syntax: "a" "b" is_substr returns the position of "b" in "a". If "b" does not occur in "a" it returns 0--- the first position is 1 -------------------------------------------------- isdigit : C function: int SLdo_isdigit (1 args) returns TRUE if CHAR (string of length 1) is a digit. -------------------------------------------------- jed_startup_hook() Function that gets executed right before JED enters its main editing loop. This is for last minute modifications of data structures that did not exist when startup files were loaded (e.g., minibuffer keymap) -------------------------------------------------- keymap_p : C function: int keymap_p (1 args) Returns TRUE if KEYMAP is defined. -------------------------------------------------- kill_rect : C function: void kill_rectangle (0 args) deletes rectangle defined by point and mark. The contents of the rectangle are saved in the rectangle buffer destroying previous contents. -------------------------------------------------- left : C function: int backwchars (1 args) Prototype: Integer left(Integer n); Move Point backward 'n' characters returning number actually moved. The number returned will be less than 'n' only if the top of the buffer is reached. See Also: right, up, down, bol, bob -------------------------------------------------- local_setkey Prototype: Void local_setkey (String fun, String key); This function is like 'setkey' but unlike 'setkey' which operates on the global keymap, 'local_setkey' operates on the current keymap which may or may not be the global one. See also: setkey, definekey, local_unsetkey -------------------------------------------------- local_unsetkey Prototype: Void local_unsetkey (String key); This function is like 'unsetkey' but unlike 'unsetkey' which unsets a key from the global keymap, 'local_unsetkey' operates on the current keymap which may or may not be the global one. See also: unsetkey, undefinekey, local_setkey -------------------------------------------------- log : C function: int math_log (0 args) -------------------------------------------------- log10 : C function: int math_log10 (0 args) -------------------------------------------------- looking_at : C function: int looking_at (1 args) Prototype: Integer looking_at(String s); Returns non-zero if Point is positioned in he buffer such that the characters immediately following it match 's' otherwise it returns 0. See also: ffind, fsearch, re_fsearch, bfind -------------------------------------------------- looking_at_char Prototype: Integer looking_at_char (Integer ch); This function returns non-zero if the character at the current editing point is 'ch' otherwise it retuns zero. This function performs a case sensitive comparison. -------------------------------------------------- lstat_file : C function: int unix_lstat_file (1 args) Prototype: Integer lstat_file(String file); This function is like 'stat_file' but it returns information about the link itself. See 'stat_file' for usage. See also: stat_file -------------------------------------------------- make_autosave_filename(dir, file) returns autosave filename. Arguments to function are dir and file. -------------------------------------------------- make_backup_filename(dir, file) returns backup filename. Arguments to function are dir and file. -------------------------------------------------- make_keymap : C function: void create_keymap (1 args) Creates a new keymap with name map. The newly created keymap is an exact copy of the global map "global". See: use_keymap, definekey, undefinekey -------------------------------------------------- make_printable_string : C function: void make_printable_string (1 args) Prototype: String make_printable_string(String str); Takes input string 'str' and creates a new string that may be used by the interpreter as an argument to the 'eval' function. The resulting string is identical to 'str' except that it is enclosed in double quotes and the backslash, newline, and double quote characters are expanded. See also: eval -------------------------------------------------- make_tmp_buffer_name Prototype: String make_tmp_buffer_name (String base); Generates a unique buffer name using the string 'base' for the beginning of the name. The buffer name is returned. The buffer is not created. -------------------------------------------------- map_input : C function: void map_character (2 args) Used to remap input characters from the keyboard to a different character before JED interprets the character. For example, '8 127 map_input' will cause JED to think that the ^H (8) is the delete character (127). Note that '8 127 map_input 127 8 map_input effectively swaps the ^H and delete keys. -------------------------------------------------- markp : C function: int markp (0 args) Prototype: Void markp(); Returns a non-zero value if a mark is set in the buffer otherwise it returns zero. A mark usually denotes a region is defined. See also: psh_mark, pop_mark, check_region, push_spot -------------------------------------------------- message : C function: void message (1 args) Prototype: Void message(String msg); Displays the string 'msg' in the MiniBuffer at the bottom of the display. This does not immediately display the message. In particular, subsequent calls to 'message' will overwrite the values of previous calls. The message is displayed when the screen is updated next. For an immediate effect, use the function 'flush' instead. See also: flush, error, update -------------------------------------------------- mkdir : C function: int make_directory (1 args) create a directory with NAME. Returns TRUE if successful, 0 otherwise. -------------------------------------------------- mode_hook (ext) This is a hook called by find_file routines to set the mode for the buffer. This function takes one parameter, the filename extension and returns nothing. -------------------------------------------------- modeline_hook() check first line for the simplest Emacs mode statement -*- modename -*- -------------------------------------------------- most_mode () Emulates MOST fileviewer The following keys are defined: SPACE next screen DELETE previous screen / search_forward ? search_backward n find next occurrence q quit most mode (usually kills buffer if not modified) e edit buffer h help summary t Top of Buffer b End of Buffer -------------------------------------------------- narrow : C function: void narrow_to_region (0 args) restrict editing to region of LINES defined by point and mark. Use 'widen' to remove the restriction. Be careful with this because it currently does not remember a previous narrow. -------------------------------------------------- newline Prototype: Void newline (Void); insert a newline in the buffer at point. See also: insert, insert_char -------------------------------------------------- no_mode() Generic mode not designed for anything in particular. See: text_mode, c_mode -------------------------------------------------- nwindows : C function: int num_windows (0 args) Prototype Integer nwindows(); Return number of windows currently visible. See also: splitwindow, onewindow, window_size -------------------------------------------------- onewindow : C function: void one_window (0 args) make current window the only one. -------------------------------------------------- open_rect : C function: void open_rectangle (0 args) insert a BLANK rectangle. The rectangle is defined by point and mark. -------------------------------------------------- otherwindow : C function: void other_window (0 args) Prototype: Void otherwindow(); Switch to next window. See also: nwindows, onewindow -------------------------------------------------- parse_filename(fn) breaks a filespec into dir filename--- this routine returns dir and filename such that a simple strcat will suffice to put them together again. For example, on unix, /a/b/c returns /a/b/ and c -------------------------------------------------- pipe_region : C function: int pipe_region (1 args) pipes region to CMD returning number of lines written. -------------------------------------------------- polynom : C function: int math_poly (0 args) Usage: a b .. c n x polynom =y This computes: ax^n + bx^(n - 1) + ... c = y -------------------------------------------------- pop : C function: void SLdo_pop (0 args) Prototype: Void pop (); 'pop' is used to remove the top object from the S-Lang stack. It is typically used to ignore values from function that return a value. -------------------------------------------------- pop2buf : C function: void pop_to_buffer (1 args) Prototype: Void pop2buf (String buf); Pop up a window containing a buffer named 'buf'. If 'buf' does not exist, it will be created. If 'buf' already exists in a window, the window containing 'buf' will be the active one. This function will create a new window if necessary. See also: pop2buf_whatbuf, setbuf, sw2buf -------------------------------------------------- pop2buf_whatbuf : C function: string pop_to_buffer (1 args) Prototype: String pop2buf_whatbuf (String buf); This function performs the same function as 'pop2buf' except that the name of the buffer that 'buf' replaced in the window is returned. This allows one to replace the buffer in the window with the one previously there. See also: pop2buf -------------------------------------------------- pop_mark : C function: void pop_mark (1 args) Pop last pushed mark off the mark stack. If argument is non zero, move point to position of mark first. -------------------------------------------------- pop_spot : C function: void pop_spot (0 args) Prototype: Void pop_spot (); This function is used after 'push_spot' to return to the location where 'push_spot' was called. See also: push_spot, pop_mark -------------------------------------------------- pow : C function: int math_pow (0 args) -------------------------------------------------- prefix_argument : C function: int do_prefix_argument (1 args) Usage: int prefix_argument(int default); Returns value of prefix argument if there is one otherwise returns 'default'. -------------------------------------------------- prev_mini_command -------------------------------------------------- print_stack : C function: void lang_print_stack (0 args) dumps tha S-Lang stack -------------------------------------------------- print_stack : C function: void lang_print_stack (0 args) dumps tha S-Lang stack -------------------------------------------------- push_mark : C function: void push_mark (0 args) Prototype: Void push_mark(); This function marks the current Point as the beginning of a region. Other functions operate on the region defined by the Point and the Mark. See also: pop_mark, push_spot, markp, dupmark, check_region -------------------------------------------------- push_spot : C function: void push_spot (0 args) Prototype: Void push_spot (); 'push_spot' pushes the location of the current buffer location onto a stack. This function does not set the mark. Use push_mark for that purpose. The spot can be returned to using 'pop_spot'. See also: pop_spot, push_mark -------------------------------------------------- putenv : C function: void lang_putenv_cmd (0 args) Prototype: Void putenv(String s); This functions adds string 's' to the environment. Typically, 's' should be a String of the form "name=value". It signals an error upon failure. -------------------------------------------------- quit_jed : C function: void quit_jed (0 args) Quit JED saving no buffers, just get out! -------------------------------------------------- random : C function: int make_random_number (2 args) Usage: seed n random Returns a random number in the range 0 to n - 1. If seed is 0, the number generated depends on previous seed. If seed is -1, a seed based on current time and pid is used, otherwise, seed is used as a seed. -------------------------------------------------- re_bsearch : C function: int re_search_backward (1 args) Prototype: Integer re_bsearch(String pattern); Search backward for regular expression 'pattern'. This function returns the 1 + length of the string matched. If no match is found, it returns 0. See also: bsearch, bol_bsearch, re_fsearch -------------------------------------------------- re_fsearch : C function: int re_search_forward (1 args) Prototype: Integer re_fsearch(String pattern); Search forward for regular expression 'pattern'. This function returns the 1 + length of the string matched. If no match is found, it returns 0. See also: fsearch, bol_fsearch, re_bsearch -------------------------------------------------- read_file : C function: int find_file_cmd (1 args) read FILE into its own buffer returning non zero if file exists. see find_file to read a file into a window. -------------------------------------------------- read_mini : C function: void mini_read (3 args) read from minibuffer with PROMPT and DEFAULT strings using STRING to stuff the minibuffer. Returns string to stack. -------------------------------------------------- read_with_completion : C function: void read_object_with_completion (4 args) Takes 4 parameters: PROMPT(string) DEFAULT(string) STUFF(string) and TYPE(integer). TYPE must be one of: 'f' file name 'b' buffer name 'F' function name 'V' variable name. STUFF is a string which is stuffed into the buffer. Using this function enables completion on the object. -------------------------------------------------- recenter : C function: void recenter (1 args) update window with current line on Nth line of window. If N is 0, recenter -------------------------------------------------- regexp_nth_match : C function: void regexp_nth_match (1 args) -------------------------------------------------- rename_file : C function: int rename_file (2 args) rename file from OLD_NAME to NEW_NAME returning 0 if the operation succeeds, and a non-zero value if it fails. Both files must be on the same file system. -------------------------------------------------- replace : C function: void replace_cmd (2 args) Prototype Void replace(String old, String new); Replaces all occurances of 'old' with 'new' from current point to the end of the buffer. The Point is returned to the initial location. -------------------------------------------------- replace_match : C function: int replace_match (2 args) Prototype: Integer replace_match(String s, Integer how); This function replaces text previously matched with `re_fsearch' or `re_bsearch' at the current editing point with string 's'. If 'how' is zero, 's' is a specially formatted string of the form described below. If 'how' is non-zero, 's' is regarded as a simple string and is used literally. If the replacement fails, this function returns zero otherwise, it returns non-zero. -------------------------------------------------- right : C function: int forwchars (1 args) Prototype: Integer right(Integer n); This function moves the Point forward forward 'n' characters and returns the number actually moved. The number returned will be smaller than 'n' if the end of the buffer is reached. See also: left, up, down, eol, eob -------------------------------------------------- rmdir : C function: int delete_directory (1 args) delete a directory with NAME. Returns TRUE if successful, 0 otherwise. The directory must be empty for the operation to succeed. -------------------------------------------------- runhooks Prototype: Void runhooks (String fun) if S-Lang function 'fun' is defined, execute it. It does nothing if 'fun' does not exist. -------------------------------------------------- save_search_string : C function: void save_search_string (1 args) Prototype: Void save_search_string(String str); Sets the value of the read-only variable 'LAST_SEARCH' to 'str'. See also: LAST_SEARCH -------------------------------------------------- search_file : C function: int search_file (3 args) search FILE for STRING returning TRUE if string found. -------------------------------------------------- set_abort_char : C function: void set_abort_char (1 args) Change Abort character to CHAR. The default is 7 which is ^G. Using this function modifies ALL keymaps -------------------------------------------------- set_buffer_hook : C function: void set_buffer_hook (2 args) Prototype: Void set_buffer_hook (String hook, String f); Set current buffer hook 'hook' to function 'f'. 'f' is a user defined S-Lang function. Currently, name can be any one of: "par_sep" -- returns zero if the current line does not constitute the beginning or end of a paragraph. It returns non-zero otherwise. The default value of 'hook' is 'is_paragraph_separator'. "indent_hook" -- returns nothing. It is called by the indent line routines. "wrap_hook" hook that is called after a line is wrapped. Returns nothing -------------------------------------------------- set_buffer_modified_flag(modif) sets buf modified flag. If argument is 1, mark buffer as modified. If argument is 0, mark buffer as unchanged. -------------------------------------------------- set_buffer_undo(modif) set undo mode for buffer. If argument is 1, undo is on. 0 turns it off -------------------------------------------------- set_color : C function: void set_term_colors (3 args) Prototype: Void set_color(String object, String fg, String bg); This function sets the foreground and background colors of an 'object' to 'fg' and 'bg'. The exact values of the strings 'fg' and 'bg' are system dependent. Valid object names are: "status", "normal", "region", and "cursor". In addition, if color syntax highlighting is enabled, the following object names are also meaningful: "number", "delimeter", "keyword", "string", "comment", "operator", "preprocess" See also: WANT_SYNTAX_HIGHLIGHT -------------------------------------------------- set_color_esc : C function: void set_term_color_esc (2 args) Prototype: Void set_color_esc (String object, String esc_seq); This function may be used to associate an escape sequence with an object. The escape sequence will be set to the terminal prior to sending the object. It may be used on mono terminals to underline objects, etc... See 'set_color' for a list of valid object names. -------------------------------------------------- set_file_translation : C function: void set_file_trans (1 args) 1 open files in binary, 0 in text (default) -------------------------------------------------- set_float_format : C function: void set_float_format (1 args) Prototype: Void set_float_format (String fmt); This function is used to set the floating point format to be used when floating point numbers are printed. The routines that use this are the traceback routines and the 'string' function. The default value is "%f". -------------------------------------------------- set_overwrite(n) Takes 1 parameter: 0 turn off overwrite 1 turn on overwrite -------------------------------------------------- set_readonly(n) Takes 1 parameter: 0 turn off readonly 1 turn on readonly -------------------------------------------------- set_status_line : C function: void set_status_format (2 args) Usage: set_status_line(String format, Integer flag); If flag is non-zero, format applies to the global format string otherwise it applies to current buffer only. Format is a string that may contain the following format specifiers: %b buffer name %f file name %v JED version %t current time --- only used if variable DISPLAY_TIME is non-zero %p line number or percent string %% literal '%' character %m mode string -------------------------------------------------- set_term_vtxxx : C function: void do_tt_set_term_vtxxx (1 args) Set terminal display appropriate for a vtxxx terminal. This function takes a single integer parameter. If non-zero, the terminal type is set for a vt100. This means the terminal lacks the ability to insert/delete lines and characters. If the parameter is zero, the terminal is assumed to be vt102 compatable. Unless you are using a VERY old terminal or a primitive emulator, use zero as the parameter. -------------------------------------------------- set_top_status_line : C function: void define_top_screen_line (1 args) Prototype: String set_top_status_line (String str); This functions sets the string to be displayed at the top of the display. It returns the value of the line that was previously displayed. See also: enable_top_status_line -------------------------------------------------- setbuf : C function: void set_buffer (1 args) Prototype: Void setbuf(String buf); Changes the default buffer to one named 'buf' for editing. This change only lasts until top level of editor loop is reached at which point the the buffer associated with current window will be made the default. See also: sw2buf, pop2buf, whatbuf -------------------------------------------------- setbuf_info : C function: void set_buffer_info (4 args) Prototype: Void setbuf_info(String file, String dir, String buf, Integer flags); Sets information of the current buffer. Here 'file' is the name of the file to be associated with the buffer; 'dir' is the directory to be associated with the buffer; buf is the name to be assigned to the buffer, and flags describe the buffer attributes. See 'getbuf_info' for a discussion of 'flags'. Note that the actual file associated with the buffer is located in directory 'dir' with the name 'file'. See also: getbuf_info -------------------------------------------------- setkey : C function: void set_key (2 args) Prototype: Void setkey(String fun, String key); 'fun' is the function that 'key' is to be assigned. 'key' can contain the '^' character which denotes that the following character is to be interpreted as a control character, e.g., setkey("bob", "^Kt"); sets the key sequence 'Ctrl-K t' to the function 'bob' which moves the editing point to the beginning of the buffer. Note that 'setkey' works on the "global" keymap. See also: unsetkey, definekey. -------------------------------------------------- setmode : C function: void set_mode_cmd (2 args) Prototype: Void setmode(String mode, Integer flags); Sets buffer mode flags and status line mode name. 'mode' is a string which is displayed on the status line if the %m status line format specifier is used. The second argument, 'flags' is an integer with the possible values: 0 : no mode. Very generic 1 : Wrap mode. Lines are automatically wrapped at wrap column. 2 : C mode. 4 : Language mode. Mode does not wrap but is useful for computer languages. 8 : S-Lang mode 0x10: Fortran mode highlighting 0x20: TeX mode highlighting See also: whatmode, getbuf_info, setbuf_info. -------------------------------------------------- shell_cmd : C function: void shell_command (1 args) executes CMD in a subshell inserting output inter buffer at Point -------------------------------------------------- shell_cmd : C function: void shell_command (1 args) executes CMD in a subshell inserting output inter buffer at Point -------------------------------------------------- sin : C function: int math_sin (0 args) -------------------------------------------------- skip_chars : C function: void skip_chars (1 args) Prototype: Void skip_chars(String s); skip past all characters in string 's'. s is a string which contains ascii chars to skip, or a rang of ascii chars. So for example, "- \t0-9ai-o_" will skip the hyphen, space, tab numerals 0 to 9, letter a, letters i to o, and underscore. If the first character of 's' is '^', then the compliment of the range is skipped instead. So for example, skip_chars("^A-Za-z"); skips ALL characters except the letters. The backslash character may be used to escape ONLY the FIRST character in the string. That is, "\\^" is to be used to skip over '^' characters. See Also: bskip_chars, skip_white -------------------------------------------------- skip_non_word_chars : C function: void skip_non_word_chars (0 args) skip over all characters that do not constitute a word. -------------------------------------------------- skip_white : C function: void skip_whitespace (0 args) Skip past whitespace. This does not cross lines. See: skip_chars -------------------------------------------------- skip_word_chars : C function: void skip_word_chars (0 args) skip over all characters that constitute a word. -------------------------------------------------- skip_word_chars : C function: void skip_word_chars (0 args) skip over all characters that constitute a word. -------------------------------------------------- slang_trace_function : C function: void SLang_trace_fun (1 args) only argument is a string that specifies a function name that is to be traced. See also the variable _slangtrace. -------------------------------------------------- slapropos : C function: void lang_apropos (1 args) -------------------------------------------------- splitwindow : C function: void split_window (0 args) Splits current window in half making two. -------------------------------------------------- sqrt : C function: int math_sqrt (0 args) -------------------------------------------------- stat_file : C function: int unix_stat_file (1 args) Prototype: Integer stat_file(String file); This function returns information about 'file' through the use of the system 'stat' call. If the stat call fails, the function returns a negative integer. If it is successful, it returns zero. Upon failure it returns a negative number. To retrieve information obtained by this call, use the 'stat_struct' function. See also: lstat_file, stat_struct -------------------------------------------------- stat_struct : C function: int unix_stat_struct (1 args) Prototype Integer stat_struct(String field); This functions returns information previously obtained by a call to the 'stat_file' or 'lstat_file' functions. The 'field' argument specifies what piece of information to return. Valid values for 'field' are: "dev" "ino" "mode" "nlink" "uid" "gid" "rdev" "size" "atime" "mtime" "ctime" See the man page for 'stat' for a discussion of these fields. The following example returns the size of the file "jed.rc": variable size; if (stat_file("jed.rc") < 0) error ("Unable to stat file!"); size = stat_struct("size"); -------------------------------------------------- str_quote_string : C function: void SLquote_string (0 args) Prototype: String str_quote_string(String str, String qlis, Integer quote); Return a string identical to 'str' except that all characters in the string 'qlis' are escaped with the 'quote' character including the quote character itself. -------------------------------------------------- str_uncomment_string : C function: void uncomment_string (3 args) Prototype: String str_uncomment_string(String s, String beg, String end); 'beg' and 'end' are strings whose characters define a set of comment delimeters. This function removes comments defined by the delimeter set from the input string 's' and returns it. For example, str_uncommen_string ("Hello (testing) 'example' World", "'(", "')"); returns the string: "Hello World"; This routine does not handle multicharacter comment delimeters and it assumes that comments are not nested. -------------------------------------------------- strcat : C function: void SLdo_strcat (0 args) Prototype: String strcat(String a, String b); Conconcatenates 'a' and 'b' and returns the result. See also: Sprintf -------------------------------------------------- strcmp : C function: void SLdo_strcmp (0 args) Prototype: Integer strcmp (String a, String b); 'strcmp' performs a case sensitive comparison between two strings. It returns 0 if the strings are identical, a negative number if 'a' is less than 'b' and a positive result if 'a' is greater than 'b' (in a lexicographic sense). See also: strup, strlow -------------------------------------------------- string : C function: void SLdo_string (0 args) Prototype: String string (obj); Here 'obj' can be of any type. The function 'string' will return a string representation of 'obj'. Example: string (12.34) returns "12.34" See also: Sprintf -------------------------------------------------- string_match : C function: int string_match (3 args) Prototype Integer string_match(String str, String pat, Integer pos); Returns 0 if 'str' does not match regular expression specified by 'pat'. This function performs the match starting at position 'pos' in 'str'. The first character of 'str' corresponds to 'pos' equal to one. This function returns the position of the start of the match. To find the exact substring actually matched, use 'string_match_nth'. See also: string_match_nth, strcmp, strncmp -------------------------------------------------- string_match_nth : C function: int string_match_nth (1 args) Prototype: Integer Integer string_match_nth(Integer nth); This function returns 2 integers describing the result of the last call to 'string_match'. It returns both the offset into the string and the length of characters matches by the 'nth' submatch. By convention, 'nth' equal to zero means the entire match. Otherwise, 'nth' must be an integer, 1 to 9, and refers to the set of characters matched by the 'nth' regular expression given by \(...\). For example, consider: variable matched, pos, len; matched = string_match("hello world", "\\([a-z]+\\) \\([a-z]+\\)", 1); if (matched) { (pos, len) = string_match_nth(2); } This will set 'matched' to 1 since a match will be found at the first position, 'pos' to 7 since 'w' is the 7th character of the string, and len to 5 since "world" is 5 characters long. -------------------------------------------------- strlen : C function: void SLdo_strlen (0 args) Prototype: Integer strlen (String a); Returns the length of 'a'. -------------------------------------------------- strlow : C function: void SLdo_strlow (0 args) Takes a string off the stack a replaces it with all characters in lowercase. -------------------------------------------------- strncat Prototype: Void strncat (String a, String b, ..., Integer n); Returns concatenated string "abc..." -------------------------------------------------- strncmp : C function: void SLdo_strncmp (0 args) like strcmp but takes an extra argument--- number of characters to compare. Example, "apple" "appliance" 3 strcmp --> 0 -------------------------------------------------- strsub : C function: void SLdo_strsub (0 args) Syntax: "string" n ascii_value strsub This forces string to have a char who asciii value is ascii_val at the nth position. The first character in the string is at position 1. -------------------------------------------------- strtrim : C function: void SLdo_strtrim (0 args) Trims leading and trailing whitespace from a string. WHitespace is defined to be spaces, tabs, and newline chars. -------------------------------------------------- strup : C function: void SLdo_strup (0 args) Takes a string off the stack a replaces it with all characters in uppercase. -------------------------------------------------- substr : C function: void SLdo_substr (0 args) Syntax: "string" n len substr returns a substring with length len of string beginning at position n. -------------------------------------------------- suspend : C function: void sys_spawn_cmd (0 args) Suspend jed and return to calling process or spawn subprocess. "suspend_hook" is called before suspension and "resume_hook" is called after. These are user defined S-Lang functions. -------------------------------------------------- sw2buf : C function: void switch_to_buffer_cmd (1 args) Switch to BUFFER. If BUFFER does not exist, one is created with name BUFFER -------------------------------------------------- system : C function: int my_system (1 args) -------------------------------------------------- tan : C function: int math_tan (0 args) -------------------------------------------------- text_mode() Mode for indenting and wrapping text Functions that affect this mode include: Function: Default Binding: indent_line_cmd TAB newline_and_indent_cmd RETURN format_paragraph ESC Q narrow_paragraph ESC N Variables include: WRAP_INDENTS, WRAP TAB, TAB_DEFAULT -------------------------------------------------- time : C function: string get_time (0 args) return current date and time string -------------------------------------------------- trim : C function: void trim_whitespace (0 args) Prototype: Void trim(); Removes all whitespace around point. See also: skip_chars, skip_white -------------------------------------------------- tt_send : C function: void do_tt_write_string (1 args) send STRING to terminal with no interpretation -------------------------------------------------- undefinekey : C function: void unset_key_in_keymap (2 args) Undefines KEY from KEYMAP. See: make_keymap. -------------------------------------------------- ungetkey : C function: void ungetkey (1 args) push ASCII value of character on input stream -------------------------------------------------- unix_ctime : C function: string unix_ctime (1 args) Prototype: String unix_ctime(Integer secs); Returns a string representation of the time as given by 'secs' seconds since 1970. -------------------------------------------------- unix_kill : C function: int unix_kill (0 args) Prototype: Integer unix_kill(Integer pid, Integer sig); -------------------------------------------------- unsetkey : C function: void unset_key (1 args) Prototype: Void unsetkey(String key); Removes the defeinition of 'key' from the "global" keymap. For example, by default, the "global" keymap binds the keys "^[[A", "^[[B", "^[[C", and "^[[D" to the character movement functions. Using 'unsetkey("^[[A")' will remove the binding of "^[[A" from the global keymap but the other three will remain. However, 'unsetkey("^[[")' will remove the definition of all the above keys. See also: setkey, undefinekey -------------------------------------------------- up : C function: int prevline (1 args) Prototype: Integer up(Integer n); Move Point up 'n' lines returning number of lines actually moved. The number returned will be less than 'n' only if the top of the buffer is reached. See also: down, left, right -------------------------------------------------- update : C function: void update_cmd (1 args) Update display. If argument it TRUE, force update otherwise update only if there is no input -------------------------------------------------- use_keymap : C function: void use_keymap (1 args) Asscoiate KEYMAP with buffer. -------------------------------------------------- w132 : C function: void screen_w132 (0 args) -------------------------------------------------- w80 : C function: void screen_w80 (0 args) -------------------------------------------------- what_char : C function: int what_char (0 args) returns ASCII value of character point is on. -------------------------------------------------- what_column : C function: int calculate_column (0 args) Prototype: Integer what_column(); Returns the current column number of the Point expanding tabs, etc... The beginning of the line is at column 1. See: whatline, whatpos, goto_column -------------------------------------------------- what_keymap : C function: string what_keymap (0 args) returns keymap name of current buffer -------------------------------------------------- whatbuf : C function: string what_buffer (0 args) Prototype: String what_buffer(); Returns the name of the current buffer. See also: getbuf_info, bufferp -------------------------------------------------- whatmode : C function: int what_mode (0 args) returns buffer mode string and mode flag. See setmode for details. -------------------------------------------------- whatpos () display row and column information in minibuffer -------------------------------------------------- which_key : C function: int which_key (1 args) returns NUMBER of keys that are bound to argument followed by NUMBER keys. Control Chars are expanded as 2 chars. -------------------------------------------------- whitespace : C function: void insert_whitespace (1 args) inserts whitespace of length n using tabs and spaces. If the global variable TAB is 0, only spaces are used. -------------------------------------------------- widen : C function: void widen (0 args) Opposite of Narrow. See narrow for additional information. -------------------------------------------------- window_info : C function: int window_size_intrinsic (1 args) Prototype Integer window_info(Integer item); Returns information specified by 'item' about the current window. Here 'item' is one of: 'r' : Number of rows 'w' : width of window 'c' : starting column (from 1) 't' : screen line of top line of window (from 1) -------------------------------------------------- window_line : C function: int window_line (0 args) returns number of line in window. top line is 1. -------------------------------------------------- write_buffer : C function: int write_buffer_cmd (1 args) writes buffer to FILE. Returns number of lines written or signals error on failure. -------------------------------------------------- write_region_to_file : C function: int write_region (1 args) write region to FILE. Returns number of lines written or signals error on failure. -------------------------------------------------- write_region_to_file : C function: int write_region (1 args) write region to FILE. Returns number of lines written or signals error on failure. -------------------------------------------------- xform_region : C function: void transform_region (1 args) takes a control character (integer) as argument: 'u' upcase_region 'd' downcase_region 'c' Capitalize region anything else will change case of region --------------------------------------------------