1 |
/* |
/* |
2 |
* Copyright (c) 2004 Tama Communications Corporation |
* Copyright (c) 2004, 2005 Tama Communications Corporation |
3 |
* |
* |
4 |
* This file is part of GNU GLOBAL. |
* This file is part of GNU GLOBAL. |
5 |
* |
* |
202 |
} |
} |
203 |
|
|
204 |
/* |
/* |
205 |
|
* Generate image tag. |
206 |
|
* |
207 |
|
* i) where Where is the icon directory? |
208 |
|
* CURRENT: current directory |
209 |
|
* PARENT: parent directory |
210 |
|
* i) file icon file without suffix. |
211 |
|
* i) alt alt string |
212 |
|
*/ |
213 |
|
char * |
214 |
|
gen_image(where, file, alt) |
215 |
|
int where; |
216 |
|
const char *file; |
217 |
|
const char *alt; |
218 |
|
{ |
219 |
|
static char buf[1024]; |
220 |
|
char *dir = (where == PARENT) ? "../icons" : "icons"; |
221 |
|
|
222 |
|
snprintf(buf, sizeof(buf), "<img src='%s/%s.%s' alt='[%s]' %s>", |
223 |
|
dir, file, icon_suffix, alt, icon_spec); |
224 |
|
return buf; |
225 |
|
} |
226 |
|
/* |
227 |
* Generate list begin tag. |
* Generate list begin tag. |
228 |
*/ |
*/ |
229 |
char * |
char * |