14 #include <sys/types.h> 63 static int lcomp(
char**,
char**);
90 while (isspace(*s)) s++;
95 while (!isspace(*s) && *s !=
'\0')
113 strcat(buf,
"\n no symbol files found\n ");
133 int width, colw, nfiles = 0;
137 if (li ==
NULL)
return;
147 for (wl = li; wl; wl = wl->
l_next) {
149 if (i > colw) colw = i;
154 fpc = nfiles/width + 1;
155 ptr = (
char**)
tmalloc(nfiles*
sizeof(
char*));
156 for (i = 0, wl = li; wl; i++, wl = wl->
l_next) {
157 *(ptr+i) = wl->l_word;
161 for (i = 0; i < fpc; i++) {
163 for (j = 0; j < width; j++) {
167 sprintf(b,
"%-*s", colw, *(ptr+k));
168 b = buf + strlen(buf);
176 wl->l_next->l_next =
NULL;
197 for (; wl; wl = wl->l_next)
216 for (; wl; wl = nw) {
235 for (i = 0, ww = wl; ww; i++, ww = ww->
l_next) ;
238 stuff = (
char **)
tmalloc(i *
sizeof (
char *));
240 for (i = 0, ww = wl; ww; i++, ww = ww->l_next)
241 stuff[i] = ww->l_word;
242 qsort((
char *) stuff, i,
sizeof (
char *),
244 (
int(*)(
const void*,
const void*))
lcomp);
248 for (i = 0, ww = wl; ww; i++, ww = ww->l_next)
249 ww->l_word = stuff[i];
260 return (strcmp(*s,*t));
276 if (!(wdir = opendir(dir)))
279 while ((de = readdir(wdir)) !=
NULL) {
281 sprintf(buf,
"%s%c%s",dir,DIR_TERM,de->d_name);
288 for (i = 0; i <7; i++)
293 if (strcmp(buf,
"(Symbol"))
static char buf[MAXPROMPT]
static void display_lines()
char * CopyString(char *s)
struct ka * kvLargeCoarseViewport
static void format_lines()
static struct list * symfiles()
void ShowPrompt(char *str)