FreeBASIC  0.91.0
fb.h File Reference
#include "fb_config.h"
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include "fb_unicode.h"
#include "fb_error.h"
#include "fb_string.h"
#include "fb_array.h"
#include "fb_system.h"
#include "fb_math.h"
#include "fb_data.h"
#include "fb_console.h"
#include "fb_file.h"
#include "fb_print.h"
#include "fb_device.h"
#include "fb_serial.h"
#include "fb_printer.h"
#include "fb_datetime.h"
#include "fb_thread.h"
#include "fb_hook.h"
#include "fb_oop.h"
#include "fb_legacy.h"
Include dependency graph for fb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _FB_LISTELEM
 
struct  _FB_LIST
 
struct  FB_RTLIB_CTX_
 

Macros

#define FB_TRUE   (-1)
 
#define FB_FALSE   0
 
#define FALSE   0
 
#define TRUE   1
 
#define NULL   0
 
#define FB_EXT_CHAR   ((char)255)
 
#define FB_STR_TMPDESCRIPTORS   256
 
#define FB_MAXDIMENSIONS   8
 
#define FB_ARRAY_TMPDESCRIPTORS   (FB_STR_TMPDESCRIPTORS / 4)
 
#define FB_TAB_WIDTH   14
 
#define FB_SCRN_DEFAULT_WIDTH   80
 
#define FB_SCRN_DEFAULT_HEIGHT   25
 
#define FB_COLOR_FG_DEFAULT   0x1
 
#define FB_COLOR_BG_DEFAULT   0x2
 
#define FB_RESERVED_FILES   2
 
#define FB_MAX_FILES   (FB_RESERVED_FILES + 255)
 
#define FB_FILE_BUFSIZE   8192
 
#define FB_LOCALBUFF_MAXLEN   32768
 
#define MAX_PATH   1024
 
#define FB_CHAR_TO_INT(ch)   ((int) ((unsigned) (unsigned char) (ch)))
 
#define FB_MAKE_EXT_KEY(ch)
 
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
 
#define MID(a, b, c)   MIN(MAX((a), (b)), (c))
 
#define SWAP(a, b)   ((a) ^= (b), (b) ^= (a), (a) ^= (b))
 
#define FB_LOCK()
 
#define FB_UNLOCK()
 
#define FB_STRLOCK()
 
#define FB_STRUNLOCK()
 
#define FB_MEMCMP(p1, p2, len)   memcmp( p1, p2, len )
 
#define FB_MEMCPY(dest, src, n)   memcpy(dest, src, n)
 
#define FB_MEMCHR(s, c, n)   memchr( s, c, n )
 
#define RORW(num, bits)   num = ( (num) >> (bits) ) | (num << (16 - bits) )
 
#define RORW1(num)   RORW(num, 1)
 
#define DBG_ASSERT(e)   ((void)0)
 
#define fb_hSign(x)   (((x) < 0) ? -1 : 1)
 
#define SC_ESCAPE   0x01
 
#define SC_1   0x02
 
#define SC_2   0x03
 
#define SC_3   0x04
 
#define SC_4   0x05
 
#define SC_5   0x06
 
#define SC_6   0x07
 
#define SC_7   0x08
 
#define SC_8   0x09
 
#define SC_9   0x0A
 
#define SC_0   0x0B
 
#define SC_MINUS   0x0C
 
#define SC_EQUALS   0x0D
 
#define SC_BACKSPACE   0x0E
 
#define SC_TAB   0x0F
 
#define SC_Q   0x10
 
#define SC_W   0x11
 
#define SC_E   0x12
 
#define SC_R   0x13
 
#define SC_T   0x14
 
#define SC_Y   0x15
 
#define SC_U   0x16
 
#define SC_I   0x17
 
#define SC_O   0x18
 
#define SC_P   0x19
 
#define SC_LEFTBRACKET   0x1A
 
#define SC_RIGHTBRACKET   0x1B
 
#define SC_ENTER   0x1C
 
#define SC_CONTROL   0x1D
 
#define SC_A   0x1E
 
#define SC_S   0x1F
 
#define SC_D   0x20
 
#define SC_F   0x21
 
#define SC_G   0x22
 
#define SC_H   0x23
 
#define SC_J   0x24
 
#define SC_K   0x25
 
#define SC_L   0x26
 
#define SC_SEMICOLON   0x27
 
#define SC_QUOTE   0x28
 
#define SC_TILDE   0x29
 
#define SC_LSHIFT   0x2A
 
#define SC_BACKSLASH   0x2B
 
#define SC_Z   0x2C
 
#define SC_X   0x2D
 
#define SC_C   0x2E
 
#define SC_V   0x2F
 
#define SC_B   0x30
 
#define SC_N   0x31
 
#define SC_M   0x32
 
#define SC_COMMA   0x33
 
#define SC_PERIOD   0x34
 
#define SC_SLASH   0x35
 
#define SC_RSHIFT   0x36
 
#define SC_MULTIPLY   0x37
 
#define SC_ALT   0x38
 
#define SC_SPACE   0x39
 
#define SC_CAPSLOCK   0x3A
 
#define SC_F1   0x3B
 
#define SC_F2   0x3C
 
#define SC_F3   0x3D
 
#define SC_F4   0x3E
 
#define SC_F5   0x3F
 
#define SC_F6   0x40
 
#define SC_F7   0x41
 
#define SC_F8   0x42
 
#define SC_F9   0x43
 
#define SC_F10   0x44
 
#define SC_NUMLOCK   0x45
 
#define SC_SCROLLLOCK   0x46
 
#define SC_HOME   0x47
 
#define SC_UP   0x48
 
#define SC_PAGEUP   0x49
 
#define SC_LEFT   0x4B
 
#define SC_CLEAR   0x4C
 
#define SC_RIGHT   0x4D
 
#define SC_PLUS   0x4E
 
#define SC_END   0x4F
 
#define SC_DOWN   0x50
 
#define SC_PAGEDOWN   0x51
 
#define SC_INSERT   0x52
 
#define SC_DELETE   0x53
 
#define SC_F11   0x57
 
#define SC_F12   0x58
 
#define SC_LWIN   0x5B
 
#define SC_RWIN   0x5C
 
#define SC_MENU   0x5D
 
#define SC_ALTGR   0x64
 
#define KEY_BACKSPACE   8
 
#define KEY_TAB   '\t'
 
#define KEY_F1   FB_MAKE_EXT_KEY( ';' )
 
#define KEY_F2   FB_MAKE_EXT_KEY( '<' )
 
#define KEY_F3   FB_MAKE_EXT_KEY( '=' )
 
#define KEY_F4   FB_MAKE_EXT_KEY( '>' )
 
#define KEY_F5   FB_MAKE_EXT_KEY( '?' )
 
#define KEY_F6   FB_MAKE_EXT_KEY( '@' )
 
#define KEY_F7   FB_MAKE_EXT_KEY( 'A' )
 
#define KEY_F8   FB_MAKE_EXT_KEY( 'B' )
 
#define KEY_F9   FB_MAKE_EXT_KEY( 'C' )
 
#define KEY_F10   FB_MAKE_EXT_KEY( 'D' )
 
#define KEY_HOME   FB_MAKE_EXT_KEY( 'G' )
 
#define KEY_UP   FB_MAKE_EXT_KEY( 'H' )
 
#define KEY_PAGE_UP   FB_MAKE_EXT_KEY( 'I' )
 
#define KEY_LEFT   FB_MAKE_EXT_KEY( 'K' )
 
#define KEY_CLEAR   FB_MAKE_EXT_KEY( 'L' )
 
#define KEY_RIGHT   FB_MAKE_EXT_KEY( 'M' )
 
#define KEY_END   FB_MAKE_EXT_KEY( 'O' )
 
#define KEY_DOWN   FB_MAKE_EXT_KEY( 'P' )
 
#define KEY_PAGE_DOWN   FB_MAKE_EXT_KEY( 'Q' )
 
#define KEY_INS   FB_MAKE_EXT_KEY( 'R' )
 
#define KEY_DEL   FB_MAKE_EXT_KEY( 'S' )
 
#define KEY_QUIT   FB_MAKE_EXT_KEY( 'k' )
 

Typedefs

typedef struct _FB_LISTELEM FB_LISTELEM
 
typedef struct _FB_LIST FB_LIST
 
typedef struct FB_RTLIB_CTX_ FB_RTLIB_CTX
 

Enumerations

enum  FB_LANG {
  FB_LANG_INVALID = -1, FB_LANG_FB = 0, FB_LANG_FB_DEPRECATED, FB_LANG_FB_FBLITE,
  FB_LANG_QB, FB_LANGS, FB_LANG_FB, FB_LANG_FB_DEPRECATED,
  FB_LANG_FB_FBLITE, FB_LANG_QB, FB_LANGS
}
 

Functions

static __inline__ void * FB_MEMCPYX (void *dest, const void *src, size_t n)
 
static __inline__ size_t FB_MEMLEN (const void *s, int c, size_t n)
 
void fb_hListInit (FB_LIST *list, void *table, size_t elem_size, size_t size)
 Initializes a list. More...
 
FB_LISTELEMfb_hListAllocElem (FB_LIST *list)
 Allocate a new list element. More...
 
void fb_hListFreeElem (FB_LIST *list, FB_LISTELEM *elem)
 Free a list element. More...
 
void fb_hListDynInit (FB_LIST *list)
 Initializes a list. More...
 
void fb_hListDynElemAdd (FB_LIST *list, FB_LISTELEM *elem)
 Adds an element to the list. More...
 
void fb_hListDynElemRemove (FB_LIST *list, FB_LISTELEM *elem)
 Remove an element from the list. More...
 
FBSTRINGfb_hMakeInkeyStr (int ch)
 
int fb_hScancodeToExtendedKey (int scancode)
 

Variables

FB_RTLIB_CTX __fb_ctx
 

Macro Definition Documentation

#define DBG_ASSERT (   e)    ((void)0)

Definition at line 273 of file fb.h.

#define FALSE   0

Definition at line 19 of file fb.h.

#define FB_ARRAY_TMPDESCRIPTORS   (FB_STR_TMPDESCRIPTORS / 4)

Definition at line 39 of file fb.h.

#define FB_CHAR_TO_INT (   ch)    ((int) ((unsigned) (unsigned char) (ch)))

Definition at line 76 of file fb.h.

#define FB_COLOR_BG_DEFAULT   0x2

Definition at line 55 of file fb.h.

#define FB_COLOR_FG_DEFAULT   0x1

Definition at line 54 of file fb.h.

#define FB_EXT_CHAR   ((char)255)

Definition at line 30 of file fb.h.

#define FB_FALSE   0

Definition at line 16 of file fb.h.

#define FB_FILE_BUFSIZE   8192

Definition at line 64 of file fb.h.

#define fb_hSign (   x)    (((x) < 0) ? -1 : 1)

Definition at line 276 of file fb.h.

#define FB_LOCALBUFF_MAXLEN   32768

Definition at line 67 of file fb.h.

#define FB_LOCK ( )

Definition at line 112 of file fb.h.

#define FB_MAKE_EXT_KEY (   ch)
Value:
((int) ((((unsigned) (unsigned char) (ch)) << 8) + \
(unsigned) (unsigned char) (FB_EXT_CHAR)))

Definition at line 82 of file fb.h.

#define FB_MAX_FILES   (FB_RESERVED_FILES + 255)

Definition at line 61 of file fb.h.

#define FB_MAXDIMENSIONS   8

Definition at line 36 of file fb.h.

#define FB_MEMCHR (   s,
  c,
 
)    memchr( s, c, n )

Definition at line 245 of file fb.h.

#define FB_MEMCMP (   p1,
  p2,
  len 
)    memcmp( p1, p2, len )

Definition at line 243 of file fb.h.

#define FB_MEMCPY (   dest,
  src,
 
)    memcpy(dest, src, n)

Definition at line 244 of file fb.h.

#define FB_RESERVED_FILES   2

Definition at line 58 of file fb.h.

#define FB_SCRN_DEFAULT_HEIGHT   25

Definition at line 51 of file fb.h.

#define FB_SCRN_DEFAULT_WIDTH   80

Definition at line 50 of file fb.h.

#define FB_STR_TMPDESCRIPTORS   256

Definition at line 33 of file fb.h.

#define FB_STRLOCK ( )

Definition at line 114 of file fb.h.

#define FB_STRUNLOCK ( )

Definition at line 115 of file fb.h.

#define FB_TAB_WIDTH   14

Definition at line 42 of file fb.h.

#define FB_TRUE   (-1)

Definition at line 15 of file fb.h.

#define FB_UNLOCK ( )

Definition at line 113 of file fb.h.

#define KEY_BACKSPACE   8

Definition at line 407 of file fb.h.

#define KEY_CLEAR   FB_MAKE_EXT_KEY( 'L' )

Definition at line 423 of file fb.h.

#define KEY_DEL   FB_MAKE_EXT_KEY( 'S' )

Definition at line 429 of file fb.h.

#define KEY_DOWN   FB_MAKE_EXT_KEY( 'P' )

Definition at line 426 of file fb.h.

#define KEY_END   FB_MAKE_EXT_KEY( 'O' )

Definition at line 425 of file fb.h.

#define KEY_F1   FB_MAKE_EXT_KEY( ';' )

Definition at line 409 of file fb.h.

#define KEY_F10   FB_MAKE_EXT_KEY( 'D' )

Definition at line 418 of file fb.h.

#define KEY_F2   FB_MAKE_EXT_KEY( '<' )

Definition at line 410 of file fb.h.

#define KEY_F3   FB_MAKE_EXT_KEY( '=' )

Definition at line 411 of file fb.h.

#define KEY_F4   FB_MAKE_EXT_KEY( '>' )

Definition at line 412 of file fb.h.

#define KEY_F5   FB_MAKE_EXT_KEY( '?' )

Definition at line 413 of file fb.h.

#define KEY_F6   FB_MAKE_EXT_KEY( '@' )

Definition at line 414 of file fb.h.

#define KEY_F7   FB_MAKE_EXT_KEY( 'A' )

Definition at line 415 of file fb.h.

#define KEY_F8   FB_MAKE_EXT_KEY( 'B' )

Definition at line 416 of file fb.h.

#define KEY_F9   FB_MAKE_EXT_KEY( 'C' )

Definition at line 417 of file fb.h.

#define KEY_HOME   FB_MAKE_EXT_KEY( 'G' )

Definition at line 419 of file fb.h.

#define KEY_INS   FB_MAKE_EXT_KEY( 'R' )

Definition at line 428 of file fb.h.

#define KEY_LEFT   FB_MAKE_EXT_KEY( 'K' )

Definition at line 422 of file fb.h.

#define KEY_PAGE_DOWN   FB_MAKE_EXT_KEY( 'Q' )

Definition at line 427 of file fb.h.

#define KEY_PAGE_UP   FB_MAKE_EXT_KEY( 'I' )

Definition at line 421 of file fb.h.

#define KEY_QUIT   FB_MAKE_EXT_KEY( 'k' )

Definition at line 430 of file fb.h.

#define KEY_RIGHT   FB_MAKE_EXT_KEY( 'M' )

Definition at line 424 of file fb.h.

#define KEY_TAB   '\t'

Definition at line 408 of file fb.h.

#define KEY_UP   FB_MAKE_EXT_KEY( 'H' )

Definition at line 420 of file fb.h.

#define MAX (   a,
 
)    ((a) > (b) ? (a) : (b))

Definition at line 87 of file fb.h.

#define MAX_PATH   1024

Definition at line 72 of file fb.h.

#define MID (   a,
  b,
 
)    MIN(MAX((a), (b)), (c))

Definition at line 88 of file fb.h.

#define MIN (   a,
 
)    ((a) < (b) ? (a) : (b))

Definition at line 86 of file fb.h.

#define NULL   0

Definition at line 25 of file fb.h.

#define RORW (   num,
  bits 
)    num = ( (num) >> (bits) ) | (num << (16 - bits) )

Definition at line 265 of file fb.h.

#define RORW1 (   num)    RORW(num, 1)

Definition at line 266 of file fb.h.

#define SC_0   0x0B

Definition at line 328 of file fb.h.

#define SC_1   0x02

Definition at line 319 of file fb.h.

#define SC_2   0x03

Definition at line 320 of file fb.h.

#define SC_3   0x04

Definition at line 321 of file fb.h.

#define SC_4   0x05

Definition at line 322 of file fb.h.

#define SC_5   0x06

Definition at line 323 of file fb.h.

#define SC_6   0x07

Definition at line 324 of file fb.h.

#define SC_7   0x08

Definition at line 325 of file fb.h.

#define SC_8   0x09

Definition at line 326 of file fb.h.

#define SC_9   0x0A

Definition at line 327 of file fb.h.

#define SC_A   0x1E

Definition at line 347 of file fb.h.

#define SC_ALT   0x38

Definition at line 373 of file fb.h.

#define SC_ALTGR   0x64

Definition at line 405 of file fb.h.

#define SC_B   0x30

Definition at line 365 of file fb.h.

#define SC_BACKSLASH   0x2B

Definition at line 360 of file fb.h.

#define SC_BACKSPACE   0x0E

Definition at line 331 of file fb.h.

#define SC_C   0x2E

Definition at line 363 of file fb.h.

#define SC_CAPSLOCK   0x3A

Definition at line 375 of file fb.h.

#define SC_CLEAR   0x4C

Definition at line 392 of file fb.h.

#define SC_COMMA   0x33

Definition at line 368 of file fb.h.

#define SC_CONTROL   0x1D

Definition at line 346 of file fb.h.

#define SC_D   0x20

Definition at line 349 of file fb.h.

#define SC_DELETE   0x53

Definition at line 399 of file fb.h.

#define SC_DOWN   0x50

Definition at line 396 of file fb.h.

#define SC_E   0x12

Definition at line 335 of file fb.h.

#define SC_END   0x4F

Definition at line 395 of file fb.h.

#define SC_ENTER   0x1C

Definition at line 345 of file fb.h.

#define SC_EQUALS   0x0D

Definition at line 330 of file fb.h.

#define SC_ESCAPE   0x01

Definition at line 318 of file fb.h.

#define SC_F   0x21

Definition at line 350 of file fb.h.

#define SC_F1   0x3B

Definition at line 376 of file fb.h.

#define SC_F10   0x44

Definition at line 385 of file fb.h.

#define SC_F11   0x57

Definition at line 400 of file fb.h.

#define SC_F12   0x58

Definition at line 401 of file fb.h.

#define SC_F2   0x3C

Definition at line 377 of file fb.h.

#define SC_F3   0x3D

Definition at line 378 of file fb.h.

#define SC_F4   0x3E

Definition at line 379 of file fb.h.

#define SC_F5   0x3F

Definition at line 380 of file fb.h.

#define SC_F6   0x40

Definition at line 381 of file fb.h.

#define SC_F7   0x41

Definition at line 382 of file fb.h.

#define SC_F8   0x42

Definition at line 383 of file fb.h.

#define SC_F9   0x43

Definition at line 384 of file fb.h.

#define SC_G   0x22

Definition at line 351 of file fb.h.

#define SC_H   0x23

Definition at line 352 of file fb.h.

#define SC_HOME   0x47

Definition at line 388 of file fb.h.

#define SC_I   0x17

Definition at line 340 of file fb.h.

#define SC_INSERT   0x52

Definition at line 398 of file fb.h.

#define SC_J   0x24

Definition at line 353 of file fb.h.

#define SC_K   0x25

Definition at line 354 of file fb.h.

#define SC_L   0x26

Definition at line 355 of file fb.h.

#define SC_LEFT   0x4B

Definition at line 391 of file fb.h.

#define SC_LEFTBRACKET   0x1A

Definition at line 343 of file fb.h.

#define SC_LSHIFT   0x2A

Definition at line 359 of file fb.h.

#define SC_LWIN   0x5B

Definition at line 402 of file fb.h.

#define SC_M   0x32

Definition at line 367 of file fb.h.

#define SC_MENU   0x5D

Definition at line 404 of file fb.h.

#define SC_MINUS   0x0C

Definition at line 329 of file fb.h.

#define SC_MULTIPLY   0x37

Definition at line 372 of file fb.h.

#define SC_N   0x31

Definition at line 366 of file fb.h.

#define SC_NUMLOCK   0x45

Definition at line 386 of file fb.h.

#define SC_O   0x18

Definition at line 341 of file fb.h.

#define SC_P   0x19

Definition at line 342 of file fb.h.

#define SC_PAGEDOWN   0x51

Definition at line 397 of file fb.h.

#define SC_PAGEUP   0x49

Definition at line 390 of file fb.h.

#define SC_PERIOD   0x34

Definition at line 369 of file fb.h.

#define SC_PLUS   0x4E

Definition at line 394 of file fb.h.

#define SC_Q   0x10

Definition at line 333 of file fb.h.

#define SC_QUOTE   0x28

Definition at line 357 of file fb.h.

#define SC_R   0x13

Definition at line 336 of file fb.h.

#define SC_RIGHT   0x4D

Definition at line 393 of file fb.h.

#define SC_RIGHTBRACKET   0x1B

Definition at line 344 of file fb.h.

#define SC_RSHIFT   0x36

Definition at line 371 of file fb.h.

#define SC_RWIN   0x5C

Definition at line 403 of file fb.h.

#define SC_S   0x1F

Definition at line 348 of file fb.h.

#define SC_SCROLLLOCK   0x46

Definition at line 387 of file fb.h.

#define SC_SEMICOLON   0x27

Definition at line 356 of file fb.h.

#define SC_SLASH   0x35

Definition at line 370 of file fb.h.

#define SC_SPACE   0x39

Definition at line 374 of file fb.h.

#define SC_T   0x14

Definition at line 337 of file fb.h.

#define SC_TAB   0x0F

Definition at line 332 of file fb.h.

#define SC_TILDE   0x29

Definition at line 358 of file fb.h.

#define SC_U   0x16

Definition at line 339 of file fb.h.

#define SC_UP   0x48

Definition at line 389 of file fb.h.

#define SC_V   0x2F

Definition at line 364 of file fb.h.

#define SC_W   0x11

Definition at line 334 of file fb.h.

#define SC_X   0x2D

Definition at line 362 of file fb.h.

#define SC_Y   0x15

Definition at line 338 of file fb.h.

#define SC_Z   0x2C

Definition at line 361 of file fb.h.

#define SWAP (   a,
 
)    ((a) ^= (b), (b) ^= (a), (a) ^= (b))

Definition at line 90 of file fb.h.

#define TRUE   1

Definition at line 22 of file fb.h.

Typedef Documentation

typedef struct _FB_LIST FB_LIST
typedef struct _FB_LISTELEM FB_LISTELEM
typedef struct FB_RTLIB_CTX_ FB_RTLIB_CTX

Enumeration Type Documentation

enum FB_LANG
Enumerator
FB_LANG_INVALID 
FB_LANG_FB 
FB_LANG_FB_DEPRECATED 
FB_LANG_FB_FBLITE 
FB_LANG_QB 
FB_LANGS 
FB_LANG_FB 
FB_LANG_FB_DEPRECATED 
FB_LANG_FB_FBLITE 
FB_LANG_QB 
FB_LANGS 

Definition at line 436 of file fb.h.

Function Documentation

FB_LISTELEM* fb_hListAllocElem ( FB_LIST list)

Allocate a new list element.

This function gets an element from the list of free elements ( struct _FB_LIST::fhead ) and adds to the tail. It also increases the number of used elements ( struct _FB_LIST::cnt ).

Parameters
listPointer to the list structure.
Returns
A new element.

Definition at line 47 of file list.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void fb_hListDynElemAdd ( FB_LIST list,
FB_LISTELEM elem 
)

Adds an element to the list.

This function adds a list element to the list. It's up to the caller to allocate the memory required by this element.

Parameters
listPointer to the list structure.
elemPointer to the element to add to the list.

Definition at line 25 of file listdyn.c.

Here is the caller graph for this function:

void fb_hListDynElemRemove ( FB_LIST list,
FB_LISTELEM elem 
)

Remove an element from the list.

This function removes a list element from the list. It's up to the caller to free the memory allocated by this element.

Parameters
listPointer to the list structure.
elemPointer to the element to remove from the list.

Definition at line 48 of file listdyn.c.

Here is the caller graph for this function:

void fb_hListDynInit ( FB_LIST list)

Initializes a list.

This list implementation doesn't care where the data will be stored to. It's up to the caller to do all memory operations.

Parameters
listPointer to list structure to initialize.

Definition at line 12 of file listdyn.c.

Here is the caller graph for this function:

void fb_hListFreeElem ( FB_LIST list,
FB_LISTELEM elem 
)

Free a list element.

This function frees a list element by removing it from the list of used elements and adding it to the list of free elements ( struct _FB_LIST::fhead ). It also decreses the number of used elements ( struct _FB_LIST::cnt ).

Parameters
listPointer to the list structure.
elemList element to add to the list of free elements.

Definition at line 74 of file list.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void fb_hListInit ( FB_LIST list,
void *  table,
size_t  elem_size,
size_t  size 
)

Initializes a list.

This list implementation is based on a static array.

Parameters
listPointer to list structure to initialize.
tablePointer to the pool of available list elements.
elem_sizeSize of elements in the array.
sizeNumber of elements in the array.

Definition at line 14 of file list.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBSTRING* fb_hMakeInkeyStr ( int  ch)

Definition at line 4 of file io_hinkey.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_hScancodeToExtendedKey ( int  scancode)

Definition at line 3 of file scancodes.c.

Here is the caller graph for this function:

static __inline__ void* FB_MEMCPYX ( void *  dest,
const void *  src,
size_t  n 
)
static

Definition at line 249 of file fb.h.

Here is the caller graph for this function:

static __inline__ size_t FB_MEMLEN ( const void *  s,
int  c,
size_t  n 
)
static

Definition at line 255 of file fb.h.

Variable Documentation

FB_RTLIB_CTX __fb_ctx

Definition at line 6 of file init.c.