void g4logical( (int) row, (int) column, (int *) logical_ptr ) // Gets a logical value
void g4long( (int) row, (int) column, (long*) long_ptr ) // Gets a long integer
int g4menu( (GET *) get_ptr, (char *) buffer, (int) window_ref ) // Gets a menu item for entry into the entry area
int g4menu_help( (GET *) get_ptr, (char *) buffer, (int) window_ref ) // Gets data from user or from menu item list
void g4message( (char *) message ) // Specifies a message to entry area created earlier using a Post-Modifier routine
void g4numeric( (int) row, (int) column, (char *) num_str ) // Gets a numeric value as a character string
void g4picture( (char *) picture) // Specifies allowable input characters for previous Get Initialize routine's entry area
int g4read() // Gets data from user using pre-defined entry areas
void g4release( (int) do_release ) // Specifies whether information from last 'g4read' is released immediately
void g4upper() // Converts all characters from previous entry area to upper case upon entry
void g4valid( (*routine) () ) // Specifies a validation routine for previous Get Initialize routine
Index File Routines
long i4check( index_ref) // Verifies accuracy of an index file
int i4close( (int) index_ref ) // Closes specified index file
int i4free( (int) index_ref ) // Frees up memory by writing buffered information for specified index file to disk
int i4index( (char *) name, (char *) expr, (int) unique, (int) safety ) // Creates, opens and selects an index file
int i4lock( (int) index_ref, (int) do_wait ) // Locks index file unless file is previously locked by other user
int i4open( (char *) file_name ) // Opens and selects specified index file
int i4ref( (char *) name ) // Returns the index file's reference number
int i4reindex( (int) index_ref ) // Reindexes the specified index file
int i4select( (int) index_ref ) // Selects the specified index file
int i4unlock( (int) index_ref ) // Unlocks the specified index file
void i4unselect() // Chooses record number ordering for the selected database
Memo Routines
long * m4check( (long) field_ref ) // Analyses memo file contents to obtain data storage information
int m4edit( (long) field_ref, (long) rec_num, (char *) editor_name, (int) max_size ) // Allows memo field modifying from an editor
int m4exist( (long) field_ref ) // Detects presence of memo field data
int m4read( (long) field_ref, (long) rec_num, (char *) str, (int) str_len ) // Reads a memo field into a string
int m4write( (long) field_ref, (long) rec_num, (char *) str, (int) str_len ) // Writes a string to specified memo field
Menuing Routines
int n4( (char *) label) // Defines a single menu item, without specific menu positioning
int n4action( (ACTION *) action_routine, [p1,] [p2,] ... ) // Specifies an action routine for menu item created with n4, or n4item
int n4activate( (int *) window_ref_ptr ) // Activates a menu
void n4arrow_exit() // Changes arrow key defaults for the currently selected horizontal or vertical menu
void n4attribute( (long) attribute, (long) attribute_prompt ) // Sets default attributes for menu items of selected window
void n4attribute_item( (item) item_ref, (long) attribute ) // Assigns an attribute to a specific menu item
void n4calc( (int) w_ref, (int) start_row, (int) start_col ) // Sets the dimensions for a window
void n4get_calc( (int) w_ref ) // Calculates the dimension and position of a menu used for data entry
void n4horizontal() // Changes the menu default from vertical to horizontal
int n4item( (int) row, (int) column, (char *) label ) // Defines a single menu item, specifying item position within the window
char * n4item_text( (int) item_ref ) // Returns a pointer to the text of a menu item
void n4item_width( (int) width ) // Determines the width of a menu whose items have been defined using 'n4'
void n4key( (int) chr, (int) activate, (int) highlight_pos ) // Allows the activation of a menu item by pressing a character key
void n4key_set( (int) set_code, (int) ingnore_case ) // Specifies keyboard input options, applicable to current menu window
void n4key_special( (int) up_key, (int) exit_key, (int) return_start, (int) return_end ) // Specifies keyboard characters which cause 'n4activate' to do something special
void n4lotus( (int) window_ref ) // Calculates the window positions and dimensions of a lotus menu
void n4message( (char *) message ) // Specifies a message that relates to a menu item, which was just created using 'n4' or 'n4item'
void n4message_do( (char *) message ) // Displays the message strings specified by 'n4message'
void n4pulldown( (int) window_ref ) // Caluculates the window positions and dimensions of a pulldown menu
void n4reaction( (ACTION *) reaction_routine, [p1,] [p2,] [p3,] [p4] ) // Specifies a reaction routine for a menu item just defined using 'n4' or 'n4item'
void n4refresh( (int) window_ref ) // Called by action or reaction routines to change display attributes or menu item labels
int n4search( (char *) description_ptr ) // Searches in a selected window for a particular menu item description
int n4skip_over( (int) menu_ref, (int) flag ) // Specifies whether a menu prompt can move to a particular menu item
void n4start_item( (int) start_item_ref ) // Starts the menu prompt on a particular menu item
Utility Routines
int u4error( (int) error_num, (char *) string 1, (char *) string 2, ..., (char *) string n, (char *) 0 ) // Displays error message when an error occurs
int u4file_first( (char *) pattern, (char *) first_match ) // Obtains list of file names which match a DOS wild card file specification
int u4file_next( (char *) next_match ) // Works with 'u4file_first' to find the next matching file pattern
int u4lock( (int) dos_file, (long) offset, (long) num_bytes, (int) do_wait ) // Locks a section of any file
int u4name_char( (char) test_char ) // Checks to see if a test character is valid for a file name
void u4name_full( (char *) result, (char *) name, (char *) extension ) // Adds a default file name extension to a file name
void u4name_part( (char *) result, (char *) name, (int) give_dir, (int) give_ext ) // Removes the directory and/or extension parts of a file name
int u4open( (char *) file_name, (int) code ) // Opens a file
void u4sort( (void *) base, (size_t) num, (size_t) width, (int) (*compare) ((void *) e1, (void *) e2)) // Replaces 'qsort' in Turbo C and Microsoft C
int u4unlock( (int) dos_file, (long) offset, (long) num_bytes ) // Unlocks a section of any file which has been previously locked
Windowing Routines
void w4( (int) row, (int) column, (char *) str ) // Displays a null terminated string at the specified coordinates
void w4activate( (int) window_ref ) // Selects and displays a window
long w4attribute( (long) attribute ) // Sets the attribute character used for the selected window
void w4border( (char *) box_chars, (long) attribute ) // Sets the window border of the currently selected window
void w4box( (char *) box_chars, (int) start_row, (int) start_col, (int) end_row, (int) end_col ) // Draws a box in selected window
void w4centre( (int) row, (char *) str ) // Centres a string within a selected window
void w4clear( (int) row ) // Clears the selected window starting from the specified row
void w4close( (int) window_ref ) // Frees all memory associated with the window
int w4col() // Returns the current column
void w4cursor( (int) row, (int) column ) // Positions cursor to the specified coordinates within the selected window
void w4deactivate( (int) window_ref ) // Removes a window from the screen, which was previously active and selected
int w4define( (int) top_row, (int) left_column, (int) bottom_row, (int) right_column ) // Creates a window
int w4display( (char *) title, (char *) m1, (char *) m2, ..., (char *) 0 ) // Creates popup window & displays message strings in it
void w4double( (int) row, (int) column, (double) double_value, (int) len, (int) dec ) // Displays a double value
void w4eject() // Sends form feed character to current window' output handle and sets current row, column positions to (0,0)
void w4exit( exit_rc ) // Positions the cursor to row 23 and column 0 and then exits using standard 'exit' routine
void w4field( (int) row, (int) column, (long) field_ref ) // Displays the value of a database field
int w4handle( (int) hand ) // Specifies the handle to be associated with the selected window
int w4height( (int) new_height ) // Sets and returns the number of rows in the selected window
int w4init( (int) num_window, (int) num_get, (int) num_memu ) // Initializes Code Base 4 sreen management
void w4int( (int) row, (int) column, (int) int_value, (int) len ) // Displays an integer
void w4long( (int) row, (int) column, (long) long_value, (int) len ) // Displays a long integer
void w4memory() // Causes a copy of the currently selected window to be kept in memory for re-activation later
void w4num( (int) row, (int) column, (char *) str, (int) num ) // Displays a string of specified length
void w4num_att( (int) row, (int) col, (char *) str, (int) num, (long) attribute ) // Displays a string of specified length and attribute
void w4out( (char * ) str ) // Displays a string at the current row and column positions
void w4popup() // Makes the selected window a popup window
void w4position( (int) row, (int) column ) // Sets the current row and column position of the selected window
void w4read( (int) row, (int) col, (char *) data_buffer, (int) len_data ) // Reads information from video memory
void w4read_window( (int) window_ref, (char *) ptr ) // Reads character information for entire window from video memory
void w4repeat( (int) row, (int) column, (char) chr, (int) num_repeat ) // Displays a character repeatedly
int w4row() // Returns the current row position
void w4scroll( (int) num_lines ) // Scrolls the window up or down
int w4select( (int) window_ref ) // Causes the specified window to become the currently selected window
void w4title( (int) row, (int) col, (char *) title, (int) title_attribute ) // Displays a string automatically in a specified window when the window is selected
int w4width( (int) new_width ) // Sets and returns the number of columns per row for the selected windows
void w4write( (int) row, (int) col, (char *) data_ptr, (int) len_data ) // Writes information from memory buffer directly to video memory
void w4write_att( (int) row, (int) col, (char *) data_ptr, (int) len_data, (long) attribute ) // Writes character data from memory buffer directly to video memory
void w4write_window( window_ref, ptr ) // Displays information read with 'w4read_window'
Extended Routines
int x4blank() // Determines if current record of the current database is blank
int x4bottom() // Same as 'd4bottom' except filtering and relations are used
int x4buffer( (long) start_record, (char *) buffer, (unsigned int) len_buffer ) // Sequentially reads as many database records as possible into memory buffer
void x4buffer_copy( (int) i, (char *) buffer ) // Copies a database record from a large memory buffer into the internal database record buffer
int x4edit() // Allows the current database to be edited interactively, one record at a time
int x4filter( (*filter_routine) () ) // Works with 'x4seek', 'x4skip', 'x4top', & 'x4bottom' to make it appear that certain records do not exist
int x4filter_pop() // Removes last filter routine from the list of filter routines attached to the current database
void x4filter_reset() // Removes all of the filter routines attached to the current database
int x4filter_do() // Evaluates all of the filtering routines for the current database to determine if the current database record should be filtered
int x4go( (long) rec_num ) // Same as 'd4go' except relations are used
int x4insert( (long) rec_num ) // Causes the record in the record buffer to become 'rec_num'
int x4list() // Writes contents of the database to the current output device applying filtering by 'x4filter'
int x4relate( (char *) expr, (int) base_ref, (int) index_ref, (long) miss_code ) // Creates a relation between a controlling database and a related database
int x4relate_do() // Processes all of the relations for the current database
void x4relate_reset() // Removes all of the relations for the currently selected database