#include "spice.h"
#include "sced.h"
#include "scedmacs.h"
#include <time.h>
#include <sys/types.h>
Go to the source code of this file.
char* CopyString |
( |
char * |
s | ) |
|
Definition at line 36 of file dir.c.
Definition at line 76 of file dir.c.
90 while (isspace(*s)) s++;
95 while (!isspace(*s) && *s !=
'\0')
113 strcat(buf,
"\n no symbol files found\n ");
static char buf[MAXPROMPT]
static void display_lines()
char * CopyString(char *s)
static void format_lines()
static struct list * symfiles()
static void display_lines |
( |
| ) |
|
|
static |
static void display_lines |
( |
struct list * |
wl | ) |
|
|
static |
Definition at line 191 of file dir.c.
197 for (; wl; wl = wl->
l_next)
void ShowPrompt(char *str)
static void format_lines |
( |
| ) |
|
|
static |
static void format_lines |
( |
struct list * |
li | ) |
|
|
static |
Definition at line 127 of file dir.c.
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;
static char buf[MAXPROMPT]
char * CopyString(char *s)
struct ka * kvLargeCoarseViewport
static int lcomp |
( |
char ** |
s, |
|
|
char ** |
t |
|
) |
| |
|
static |
Definition at line 256 of file dir.c.
260 return (strcmp(*
s,*
t));
static void list_free |
( |
| ) |
|
|
static |
static void list_free |
( |
struct list * |
wl | ) |
|
|
static |
Definition at line 210 of file dir.c.
216 for (; wl; wl = nw) {
static void list_sort |
( |
| ) |
|
|
static |
static void list_sort |
( |
struct list * |
wl | ) |
|
|
static |
Definition at line 226 of file dir.c.
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];
static struct list* symfiles |
( |
| ) |
|
|
static |
static struct list* symfiles |
( |
char * |
dir | ) |
|
|
static |
Definition at line 265 of file dir.c.
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]
char * CopyString(char *s)