removed old C lists
@@ -33,86 +33,7 @@ | ||
33 | 33 | typedef uint32_t pinmask_t; |
34 | 34 | |
35 | 35 | |
36 | -/* formerly lists.h */ | |
37 | 36 | |
38 | -/*---------------------------------------------------------------------- | |
39 | - General purpose linked list routines - header file declarations. | |
40 | - | |
41 | - Author : Brian Dean | |
42 | - Date : 10 January, 1990 | |
43 | - ----------------------------------------------------------------------*/ | |
44 | - | |
45 | -typedef void * LISTID; | |
46 | -typedef void * LNODEID; | |
47 | - | |
48 | - | |
49 | -#define PUSH(s,d) lins_n(s,d,1) /* push 'd' onto the stack */ | |
50 | -#define POP(s) lrmv_n(s,1) /* pop the stack */ | |
51 | -#define LOOKSTACK(s) lget_n(s,1) /* look at the top of the stack, | |
52 | - but don't pop */ | |
53 | - | |
54 | - | |
55 | -#define ENQUEUE(q,d) lins_n(q,d,1) /* put 'd' on the end of the queue */ | |
56 | -#define DEQUEUE(q) lrmv(q) /* remove next item from the front of | |
57 | - the queue */ | |
58 | -#define REQUEUE(q,d) ladd(q,d) /* re-insert (push) item back on the | |
59 | - front of the queue */ | |
60 | -#define LOOKQUEUE(q) lget(q) /* return next item on the queue, | |
61 | - but don't dequeue */ | |
62 | -#define QUEUELEN(q) lsize(q) /* length of the queue */ | |
63 | - | |
64 | - | |
65 | -#define LISTADD(l,d) ladd(l,d) /* add to end of the list */ | |
66 | -#define LISTRMV(l,d) lrmv_d(l,d) /* remove from end of the list */ | |
67 | - | |
68 | - | |
69 | -//#ifdef __cplusplus | |
70 | -//extern "C" { | |
71 | -//#endif | |
72 | - | |
73 | -/* .................... Function Prototypes .................... */ | |
74 | - | |
75 | -LISTID lcreat ( void * liststruct, int poolsize ); | |
76 | -void ldestroy ( LISTID lid ); | |
77 | -void ldestroy_cb ( LISTID lid, void (*ucleanup)(void * data_ptr) ); | |
78 | - | |
79 | -LNODEID lfirst ( LISTID ); /* head of the list */ | |
80 | -LNODEID llast ( LISTID ); /* tail of the list */ | |
81 | -LNODEID lnext ( LNODEID ); /* next item in the list */ | |
82 | -LNODEID lprev ( LNODEID ); /* previous item in the list */ | |
83 | -void * ldata ( LNODEID ); /* data at the current position */ | |
84 | -int lsize ( LISTID ); /* number of elements in the list */ | |
85 | - | |
86 | -int ladd ( LISTID lid, void * p ); | |
87 | -int laddo ( LISTID lid, void *p, | |
88 | - int (*compare)(const void *p1,const void *p2), | |
89 | - LNODEID * firstdup ); | |
90 | -int laddu ( LISTID lid, void * p, | |
91 | - int (*compare)(const void *p1,const void *p2)); | |
92 | -int lins_n ( LISTID lid, void * d, unsigned int n ); | |
93 | -int lins_ln ( LISTID lid, LNODEID lnid, void * data_ptr ); | |
94 | - | |
95 | -void * lget ( LISTID lid ); | |
96 | -void * lget_n ( LISTID lid, unsigned int n ); | |
97 | -LNODEID lget_ln ( LISTID lid, unsigned int n ); | |
98 | - | |
99 | -void * lrmv ( LISTID lid ); | |
100 | -void * lrmv_n ( LISTID lid, unsigned int n ); | |
101 | -void * lrmv_ln ( LISTID lid, LNODEID lnid ); | |
102 | -void * lrmv_d ( LISTID lid, void * data_ptr ); | |
103 | - | |
104 | -LISTID lcat ( LISTID lid1, LISTID lid2 ); | |
105 | - | |
106 | -void lsort ( LISTID lid, int (*compare)(void * p1, void * p2)); | |
107 | - | |
108 | -void * lsrch ( LISTID lid, void * p, int (*compare)(void *p1,void *p2)); | |
109 | - | |
110 | -int lprint ( FILE * f, LISTID lid ); | |
111 | - | |
112 | -//#ifdef __cplusplus | |
113 | -//} | |
114 | -//#endif | |
115 | - | |
116 | 37 | /* formerly avrpart.h */ |
117 | 38 | |
118 | 39 | /* |
@@ -892,11 +813,11 @@ | ||
892 | 813 | //extern "C" { |
893 | 814 | //#endif |
894 | 815 | |
895 | -const PROGRAMMER_TYPE * locate_programmer_type(/*LISTID programmer_types, */const char * id); | |
816 | +const PROGRAMMER_TYPE * locate_programmer_type(const char * id); | |
896 | 817 | |
897 | 818 | typedef void (*walk_programmer_types_cb)(const char *id, const char *desc, |
898 | 819 | void *cookie); |
899 | -void walk_programmer_types(/*LISTID programmer_types,*/ walk_programmer_types_cb cb, void *cookie); | |
820 | +void walk_programmer_types(walk_programmer_types_cb cb, void *cookie); | |
900 | 821 | |
901 | 822 | // New std::vector lists |
902 | 823 | void remove_programmer(std::vector<PROGRAMMER> &programmers, PROGRAMMER *data_ptr); |
@@ -125,7 +125,7 @@ | ||
125 | 125 | // interface - management |
126 | 126 | static void usbasp_setup(PROGRAMMER * pgm); |
127 | 127 | static void usbasp_teardown(PROGRAMMER * pgm); |
128 | -static int usbasp_parseextparms(PROGRAMMER * pgm, LISTID extparms); | |
128 | +static int usbasp_parseextparms(PROGRAMMER * pgm, std::vector<const char*> &extparms); | |
129 | 129 | // internal functions |
130 | 130 | static int usbasp_transmit(PROGRAMMER * pgm, unsigned char receive, |
131 | 131 | unsigned char functionid, const unsigned char *send, |