Skip to content

Commit

Permalink
Fixed name collisions mostly with stl
Browse files Browse the repository at this point in the history
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@52 d0cd1f9f-072b-0410-8dd7-cf729c803f20
  • Loading branch information
theraysmith committed May 16, 2007
1 parent 8d64397 commit 3366cd0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions cutil/oldlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*
* BASICS:
* -------
* first - Macro to return the first list node (not the cell).
* first_node - Macro to return the first list node (not the cell).
* rest - Macro the return the second list cell
* pop - Destroy one list cell
* push - Create one list cell and set the node and next fields
Expand All @@ -48,7 +48,7 @@
* LIST CELL COUNTS:
* -----------------
* count - Returns the number of list cells in the list.
* second - Returns the second node.
* second_node - Returns the second node.
* third - Returns the third node.
* fourth - Returns the fourth node.
* fifth - Returns the fifth node.
Expand Down Expand Up @@ -135,7 +135,7 @@ typedef _LIST_ *LIST;
----------------------------------------------------------------------*/
/* Predefinitions */
#define rest(l) ((l) ? (l)->next : NIL)
#define first(l) ((l) ? (l)->node : NIL)
#define first_node(l) ((l) ? (l)->node : NIL)

/**********************************************************************
* c o p y f i r s t
Expand All @@ -146,7 +146,7 @@ typedef _LIST_ *LIST;
**********************************************************************/

#define copy_first(l1,l2) \
(l2=push(l2, first(l1)))
(l2=push(l2, first_node(l1)))

/**********************************************************************
* i t e r a t e
Expand Down Expand Up @@ -204,11 +204,11 @@ for ((x)=(l); (x)!=0; (x)=rest(x))
*
* Return the contents of the second list element.
*
* #define second(l) first (rest (l))
* #define second_node(l) first_node (rest (l))
**********************************************************************/

#define second(l) \
first (rest (l))
#define second_node(l) \
first_node (rest (l))

/**********************************************************************
* s e t r e s t
Expand All @@ -226,11 +226,11 @@ first (rest (l))
*
* Return the contents of the third list element.
*
* #define third(l) first (rest (rest (l)))
* #define third(l) first_node (rest (rest (l)))
**********************************************************************/

#define third(l) \
first (rest (rest (l)))
first_node (rest (rest (l)))

/*----------------------------------------------------------------------
Public Funtion Prototypes
Expand Down

0 comments on commit 3366cd0

Please sign in to comment.