tesseract v5.3.3.20231005
oldlist.h File Reference
#include <tesseract/export.h>
#include <cstddef>

Go to the source code of this file.

Classes

struct  tesseract::list_rec
 

Namespaces

namespace  tesseract
 

Macros

#define NIL_LIST   static_cast<LIST>(nullptr)
 
#define iterate(l)   for (; (l) != nullptr; (l) = (l)->list_rest())
 
#define set_rest(l, cell)   ((l)->next = (cell))
 

Typedefs

using tesseract::int_compare = int(*)(void *, void *)
 
using tesseract::void_dest = void(*)(void *)
 
using tesseract::LIST = list_rec *
 

Functions

LIST tesseract::delete_d (LIST list, void *key, int_compare is_equal)
 
LIST tesseract::destroy (LIST list)
 
void tesseract::destroy_nodes (LIST list, void_dest destructor)
 
LIST tesseract::last (LIST var_list)
 
LIST tesseract::pop (LIST list)
 
LIST tesseract::push (LIST list, void *element)
 
LIST tesseract::push_last (LIST list, void *item)
 
LIST tesseract::search (LIST list, void *key, int_compare is_equal)
 

Macro Definition Documentation

◆ iterate

#define iterate (   l)    for (; (l) != nullptr; (l) = (l)->list_rest())

Definition at line 91 of file oldlist.h.

◆ NIL_LIST

#define NIL_LIST   static_cast<LIST>(nullptr)

Definition at line 75 of file oldlist.h.

◆ set_rest

#define set_rest (   l,
  cell 
)    ((l)->next = (cell))

Definition at line 101 of file oldlist.h.