obj_hand.html
NAME
obj_handler, obj_clear, obj_nnames, obj_name - object name support
SYNOPSIS
int obj_handler( int argc, char **argv )void obj_clear( void )
extern int obj_nnames
extern char **obj_name
DESCRIPTION
The obj_handler routine should be assigned to the MG_E_OBJECT entry of the parser's mg_ehand array prior to calling mg_load if the loader/translator wishes to support hierarchical object names.The obj_clear function may be used to clear the object name stack and free any associated memory, but this is usually not necessary since o begin and end entities are normally balanced in the input.
The global obj_nnames variable indicates the number of names currently in the object stack, and the obj_name list contains the name strings in the same order as they were encountered on the input. (I.e. the most recently pushed name is last.)
DIAGNOSTICS
The obj_handler function returns MG_OK (0) if the color is handled correctly, or one of the predefined error values if there is a problem. (See the mg_load page for a list of errors.)
SEE ALSO
mg_init, mg_load, xf_handler
by
admin
—
last modified
Apr 21, 2025 09:12 PM