Go to the source code of this file.
Functions | |
int | min (int a, int b) |
int | max (int a, int b) |
void | fexpand (char *) |
char | hotKey (const char *s) |
ushort | ctrlToArrow (ushort keyCode) |
char | getAltChar (ushort keyCode) |
ushort | getAltCode (char ch) |
char | getCtrlChar (ushort keyCode) |
ushort | getCtrlCode (uchar ch) |
ushort | historyCount (uchar id) |
const char* | historyStr (uchar id, int index) |
void | historyAdd (uchar id, const char *str) |
int | cstrlen (const char *s) |
void* | message (TView *receiver, ushort what, ushort command, void *infoPtr) |
Boolean | lowMemory () |
char* | newStr (const char *s) |
Boolean | isDir (const char *str) |
Boolean | pathValid (const char *path) |
Boolean | validFileName (const char *fileName) |
void | getCurDir (char *dir) |
Boolean | isWild (const char *f) |
void | expandPath (const char *path, char *dir, char *file) |
long int | filelength (int fd) |
Definition in file util.h.
|
Returns the length of string `s', where `s' is a control string using tilde characters (`~') to designate hot keys. The tildes are excluded from the length of the string, as they will not appear on the screen. For example, given the argument "~B~roccoli", cstrlen() returns 8. |
|
Converts a WordStar-compatible control key code to the corresponding cursor key code. If the low byte of `keyCode' matches one of the following key values, the result is the corresponding constant. Otherwise, `keyCode' is returned unchanged.
Keystroke Lo(keyCode) Result Ctrl-A 0x01 kbHome Ctrl-C 0x03 kbPgDn Ctrl-D 0x04 kbRight Ctrl-E 0x05 kbUp Ctrl-F 0x06 kbEnd Ctrl-G 0x07 kbDel Ctrl-H 0x08 kbBack Ctrl-R 0x12 kbPgUp Ctrl-S 0x13 kbLeft Ctrl-V 0x16 kbIns Ctrl-X 0x18 kbDown |
|
Undocumented. |
|
Undocumented. |
|
Undocumented. |
|
Returns the character ch for which Alt-ch produces the 2-byte scan code given by the argument `keyCode'. This function gives the reverse mapping to getAltCode().
|
|
Returns the 2-byte scan code (key code) corresponding to Alt-ch. This function gives the reverse mapping to getAltChar().
|
|
Returns the character, ch, for which Ctrl+ch produces the 2-byte scan code given by the argument `keyCode'. Gives the reverse mapping to getCtrlCode().
|
|
Returns the 2-byte scan code (keycode) corresponding to Ctrl+ch, where `ch' is the argument. This function gives the reverse mapping to getCtrlChar().
|
|
Undocumented. |
|
Adds the string `str' to the history list indicated by `id'.
|
|
Returns the number of strings in the history list corresponding to ID number `id'.
|
|
Returns the index'th string in the history list corresponding to ID number `id'.
|
|
Undocumented. |
|
Undocumented. |
|
Undocumented. |
|
Calls TVMemMgr::safetyPoolExhausted() to check the state of the safety pool.
|
|
Undocumented. Definition at line 30 of file util.h. Referenced by TRect::Union(), and TRect::intersect().
|
|
message() sets up a command event with the arguments `event', `command', and `infoPtr', and then, if possible, invokes receiver->handleEvent() to handle this event.
The latter can be used to determine which view actually handled the dispatched event. The event argument is usually set to evBroadcast. For example, the default TScrollBar::scrollDraw() sends the following message to the scroll bar's owner:
message(owner, evBroadcast, cmScrollBarChanged, this); The above message ensures that the appropriate views are redrawn whenever the scroll bar's value changes. |
|
Undocumented. Definition at line 22 of file util.h. Referenced by TRect::Union(), and TRect::intersect().
|
|
Dynamic string creation. If `s' is a null pointer, newStr() returns a 0 pointer; otherwise, strlen(s)+ 1 bytes are allocated, containing a copy of `s' (with a terminating '\0'), and a pointer to the first byte is returned. You can use delete to dispose of such strings. Referenced by TSItem::TSItem().
|
|
Undocumented. |
|
Undocumented. |