System Types Instructions manual |
| OKit: Object Tree, RPL Virtual Machine and compiler shared library Copyright (C) 2000 Yann LANDRIN-SCHWEITZER This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Author: Yann LANDRIN-SCHWEITZER Contact: varkhan@free.fr Homepage: http://varkhan.free.fr/ |
OKit_Stack definition |
| Args | ||||
| _chksz | : | buffer size increment | ||
| Returns | ||||
| _NULL | : | if no memory was available | ||
| else the newly allocated OKit_Stack. | ||||
| Errors | ||||
| _ENOMEM | : | if no memory was available | ||
| Args | ||||
| _stk | : | OKit_Stack to free | ||
| Args | ||||
| _stk | : | OKit_Stack we want to get information about | ||
| Returns | ||||
| _-1 | : | if a NULL OKit_Stack was passed as argument | ||
| else the OKit_Stack's depth. | ||||
| Errors | ||||
| _EINVAL | : | if a NULL OKit_Stack was passed as argument | ||
| Args | ||||
| _stk | : | OKit_Stack | ||
| _obj | : | OKit_Object to push | ||
| Returns | ||||
| _-1 | : | if some error occurred | ||
| else the new depth of the OKit_Stack. | ||||
| Errors | ||||
| _EINVAL | : | if a NULL OKit_Stack or OKit_Object was passed as argument | ||
| _EACCES | : | if the OKit_Stack was freezed and consequently cannot receive OKit_Objects | ||
| _ENOMEM | : | if no memory was available | ||
| Args | ||||
| _stk | : | non-empty OKit_Stack | ||
| Returns | ||||
| _NULL | : | if the OKit_Stack was NULL, empty or freezed | ||
| else the object popped from the stack. | ||||
| Errors | ||||
| _EINVAL | : | if a NULL OKit_Stack was passed as argument | ||
| _EACCES | : | if the OKit_Stack was freezed and consequently cannot yield OKit_Objects | ||
| _ENOMEM | : | if a memory disallocation failed (non-fatal error) | ||
| Args | ||||
| _stk | : | non-empty OKit_Stack | ||
| _num | : | level at which to look for an object | ||
| Returns | ||||
| _NULL | : | if the OKit_Stack was NULL, or the level invalid | ||
| else the object at level 'num' of the OKit_Stack (first level is 1). | ||||
| Errors | ||||
| _EINVAL | : | if a NULL or empty OKit_Stack was passed as argument, or the level was invalid | ||
| Args | ||||
| _stk | : | OKit_Stack | ||
| _obj | : | OKit_Object to put | ||
| _num | : | level at which to put an object | ||
| Returns | ||||
| _NULL | : | if the OKit_Stack was NULL, or the level invalid | ||
| else the old object at the specified level of the OKit_Stack (first level is 1). | ||||
| Errors | ||||
| _EINVAL | : | if a NULL OKit_Stack or OKit_Object was passed as argument, or the level was invalid | ||
| Args | ||||
| _stk | : | OKit_Stack | ||
| _argc | : | number of OKit_Objects to check | ||
| _argt | : | types of OKit_Objects to check (or-ed types of admissible objects, level by level) | ||
| Returns | ||||
| _-1 | : | if the OKit_Stack was NULL or there was not enough OKit_Objects on OKit_Stack | ||
| else an error flag (0 if all arguments were OK, every bit standing as an individual | ||||
| error flag for each level). | ||||
| Errors | ||||
| _EINVAL | : | if a NULL OKit_Stack was passed as argument | ||
| Args | ||||
| _stk | : | OKit_Stack | ||
| _out | : | output character string | ||
| _max | : | maximum number of characters to print (final nil char EXCEPTED) | ||
| _head | : | head string | ||
| _rowfmt | : | row printing format | ||
| _tail | : | tail string | ||
| _rows | : | number of rows (height in chars) | ||
| Returns | ||||
| _-1 | : | if the OKit_Stack was NULL | ||
| else the number of characters printed. | ||||
| or the total number of characters that should be printed, if 'out' was NULL. | ||||
| Errors | ||||
| _EINVAL | : | if a NULL OKit_Stack was passed as argument | ||
| Note | ||||
| The row format string is printed for each stack row between 0 and rows-1. | ||||
| Escape sequences take the form %fdd..dd?, where the 'f' char is an optionnal | ||||
| fill character (by dfault ' '), 'd' chars are digits and '?' denotes either | ||||
| the 'n' or 's' characters. They are replaced by the stack row number, for the 'n' | ||||
| format, and the corresponding object, for the 's' format, each written on | ||||
| the number of chars denoted by the digits. | ||||
| Args | ||||
| _stk | : | OKit_Stack | ||
| Returns | ||||
| _-1 | : | if the OKit_Stack was NULL | ||
| else 0. | ||||
| Errors | ||||
| any error generated by the 'printf' libc call. | ||||
Variables domain definition |
| Args | ||||
| _chksz | : | buffer size increment | ||
| Returns | ||||
| _NULL | : | if no memory was available | ||
| else the newly allocated OKit_NameSpace. | ||||
| Errors | ||||
| _ENOMEM | : | if no memory was available | ||
| Args | ||||
| _nms | : | OKit_NameSpace to free | ||
| Args | ||||
| _nms | : | OKit_NameSpace | ||
| _name | : | key, or "OKit_Object name" | ||
| Returns | ||||
| _NULL | : | if a NULL OKit_NameSpace or name was passed as argument, or no OKit_Object was known by this key | ||
| else the OKit_Object under name 'name'. | ||||
| Errors | ||||
| _EINVAL | : | if a NULL OKit_NameSpace or name was passed as argument | ||
| _ENOMEM | : | if no memory was available | ||
| Args | ||||
| _nms | : | OKit_NameSpace | ||
| _name | : | key, or "OKit_Object name" | ||
| _obj | : | OKit_Object to set under its "name" | ||
| Returns | ||||
| _NULL | : | if some error occurred | ||
| else the old OKit_Object under this key, if it existed (and it is then dereferenced) | ||||
| or the OKit_Object passed as argument. | ||||
| Errors | ||||
| _EINVAL | : | if a NULL OKit_NameSpace, name or OKit_Object was passed as argument | ||
| _EACCES | : | if the OKit_NameSpace was freezed and consequently cannot receive OKit_Objects | ||
| _ENOMEM | : | if no memory was available | ||
| Args | ||||
| _nms | : | OKit_NameSpace | ||
| _name | : | key, or "OKit_Object name" | ||
| Returns | ||||
| _NULL | : | if a NULL OKit_NameSpace or name was passed as argument, | ||
| or the key was not found | ||||
| else the OKit_Object under name 'name'. | ||||
| Errors | ||||
| _EINVAL | : | if a NULL OKit_NameSpace or name was passed as argument | ||
| _EACCES | : | if the OKit_NameSpace was freezed and consequently cannot yield OKit_Objects | ||
| _ENOMEM | : | if a disallocation failed (non-fatal error) | ||
| Args | ||||
| _nms | : | OKit_NameSpace | ||
| Returns | ||||
| _NULL | : | if a NULL OKit_NameSpace was passed as argument, or the OKit_List allocation failed | ||
| else the OKit_List of all names in nms. | ||||
| Errors | ||||
| _EINVAL | : | if a NULL OKit_NameSpace or name was passed as argument | ||
| _ENOMEM | : | if no memory was available | ||
| Args | ||||
| _nms | : | OKit_NameSpace | ||
| _out | : | output character string | ||
| _max | : | maximum number of characters to print (final nil char EXCEPTED) | ||
| _head | : | head string | ||
| _rowfmt | : | row printing format | ||
| _tail | : | tail string | ||
| _rows | : | number of rows (height in chars) | ||
| Returns | ||||
| _-1 | : | if the OKit_Stack was NULL | ||
| else the number of characters printed. | ||||
| or the total number of characters that should be printed, if 'out' was NULL. | ||||
| Errors | ||||
| _EINVAL | : | if a NULL OKit_NameSpace was passed as argument | ||
| Note | ||||
| The row format string is printed for each name entry in the OKit_NameSpace. | ||||
| Escape sequences take the form %fdd..dd?, where the 'f' char is an optionnal | ||||
| fill character (by dfault ' '), 'd' chars are digits and '?' denotes either | ||||
| the 'n' or 's' characters. They are replaced by the entry name, for the 'n' | ||||
| format, and the corresponding object, for the 's' format, each written on | ||||
| the number of chars denoted by the digits. | ||||
| Args | ||||
| _nms | : | OKit_NameSpace | ||
| Returns | ||||
| _-1 | : | if the OKit_NameSpace was NULL | ||
| else 0. | ||||
| Errors | ||||
| any error generated by the 'printf' libc call. | ||||