About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

basics.h File Reference
#include <fontforge-config.h>
#include <stdio.h>
#include <inttypes.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
Include dependency graph for basics.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define UNUSED(x)   x
#define TRACE(...)
#define IS_IN_ORDER3(a, b, c)   ( ((a)<=(b)) && ((b)<=(c)) )
#define FFLIST_SINGLE_LINKED_APPEND(head, last, newitem)


typedef int32_t int32
typedef uint32_t uint32
typedef int16_t int16
typedef uint16_t uint16
typedef int8_t int8
typedef uint8_t uint8
typedef intptr_t intpt
typedef uint32 unichar_t


void NoMoreMemMessage (void)
static int imin (int a, int b)
static int imax (int a, int b)

Macro Definition Documentation


if ( !last ) \
{ \
newitem->next = 0; \
head = last = newitem; \
} \
else \
{ \
last->next = newitem; \
last = newitem; \
static int32_t last
Definition: ppagelist.c:29

Many lists in FontForge are singly linked. At times you might want to append to the list which, when you only have a pointer to the start of the list can be more verbose than one would like. To use this macro you must defined a null initialized variable 'last' outside of any loop that traverses the source list. The last variable is used used by this macro to quickly append to the list as you go. This macro also assumes that the 'last' and 'newitem' types have a member "->next" which contains the single linked list pointer to the next element.

Efficient list append should really be a one line call in the bulk of the code :)

example: MyListObjectType* newfoolast = 0; MyListObjectType* newfoolist = 0;

for( ... iterate a source collection of foos ... ) { MyListObjectType* foocopy = CopyIt( foo ); FFLIST_SINGLE_LINKED_APPEND( newfoolist, newfoolast, foocopy ); }

Definition at line 112 of file basics.h.


#define IS_IN_ORDER3 (   a,
)    ( ((a)<=(b)) && ((b)<=(c)) )

Definition at line 85 of file basics.h.


#define TRACE (   ...)

Definition at line 70 of file basics.h.


#define UNUSED (   x)    x

Definition at line 62 of file basics.h.

Typedef Documentation

◆ int16

typedef int16_t int16

Definition at line 43 of file basics.h.

◆ int32

typedef int32_t int32

Definition at line 41 of file basics.h.

◆ int8

typedef int8_t int8

Definition at line 45 of file basics.h.

◆ intpt

typedef intptr_t intpt

Definition at line 49 of file basics.h.

◆ uint16

typedef uint16_t uint16

Definition at line 44 of file basics.h.

◆ uint32

typedef uint32_t uint32

Definition at line 42 of file basics.h.

◆ uint8

typedef uint8_t uint8

Definition at line 46 of file basics.h.

◆ unichar_t

typedef uint32 unichar_t

Definition at line 51 of file basics.h.

Function Documentation

◆ imax()

◆ imin()

static int imin ( int  a,
int  b 

Definition at line 75 of file basics.h.

References a, and b.

◆ NoMoreMemMessage()

void NoMoreMemMessage ( void  )

Definition at line 77 of file memory.c.

References fprintf.