parent
16491b4d25
commit
b1228e176b
26
eesh/E.h
26
eesh/E.h
|
@ -67,18 +67,18 @@
|
|||
#define LIST_TYPE_CLIENT 1
|
||||
|
||||
typedef struct _list
|
||||
{
|
||||
{
|
||||
int type;
|
||||
char *name;
|
||||
int id;
|
||||
void *item;
|
||||
|
||||
struct _list *next;
|
||||
}
|
||||
}
|
||||
List;
|
||||
|
||||
typedef struct _client
|
||||
{
|
||||
{
|
||||
char *name;
|
||||
Window win;
|
||||
char *msg;
|
||||
|
@ -90,11 +90,11 @@ typedef struct _client
|
|||
char *address;
|
||||
char *info;
|
||||
Pixmap pmap;
|
||||
}
|
||||
}
|
||||
Client;
|
||||
|
||||
typedef struct _root
|
||||
{
|
||||
{
|
||||
Window win;
|
||||
Visual *vis;
|
||||
int depth;
|
||||
|
@ -102,7 +102,7 @@ typedef struct _root
|
|||
int scr;
|
||||
int w, h;
|
||||
Window focuswin;
|
||||
}
|
||||
}
|
||||
Root;
|
||||
|
||||
int EExit(void *code);
|
||||
|
@ -219,11 +219,17 @@ extern int debug_level;
|
|||
}
|
||||
#endif
|
||||
|
||||
void Alert(char *fmt,...);
|
||||
void Alert(char *fmt, ...);
|
||||
void InitStringList(void);
|
||||
void AssignIgnoreFunction(int (*FunctionToAssign) (void *), void *params);
|
||||
void AssignRestartFunction(int (*FunctionToAssign) (void *), void *params);
|
||||
void AssignExitFunction(int (*FunctionToAssign) (void *), void *params);
|
||||
void AssignIgnoreFunction(int (*FunctionToAssign) (void *),
|
||||
|
||||
void *params);
|
||||
void AssignRestartFunction(int (*FunctionToAssign) (void *),
|
||||
|
||||
void *params);
|
||||
void AssignExitFunction(int (*FunctionToAssign) (void *),
|
||||
|
||||
void *params);
|
||||
void AssignTitleText(char *text);
|
||||
void AssignIgnoreText(char *text);
|
||||
void AssignRestartText(char *text);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
/*
|
||||
Copyright (C) 2000 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
|
||||
|
@ -41,7 +42,7 @@ int call_level;
|
|||
int debug_level;
|
||||
|
||||
void
|
||||
Alert(char *fmt,...)
|
||||
Alert(char *fmt, ...)
|
||||
{
|
||||
char text[10240];
|
||||
va_list ap;
|
||||
|
|
|
@ -49,8 +49,8 @@ CommsFindCommsWindow()
|
|||
if (a != None)
|
||||
{
|
||||
s = NULL;
|
||||
XGetWindowProperty(disp, root.win, a, 0, 14, False, AnyPropertyType, &ar,
|
||||
&format, &num, &after, &s);
|
||||
XGetWindowProperty(disp, root.win, a, 0, 14, False, AnyPropertyType,
|
||||
&ar, &format, &num, &after, &s);
|
||||
if (s)
|
||||
{
|
||||
comms_win = 0;
|
||||
|
@ -68,8 +68,8 @@ CommsFindCommsWindow()
|
|||
if (comms_win)
|
||||
{
|
||||
XGetWindowProperty(disp, comms_win, a, 0, 14, False,
|
||||
AnyPropertyType, &ar, &format, &num, &after,
|
||||
&s);
|
||||
AnyPropertyType, &ar, &format, &num,
|
||||
&after, &s);
|
||||
if (s)
|
||||
XFree(s);
|
||||
else
|
||||
|
|
13
eesh/file.c
13
eesh/file.c
|
@ -230,8 +230,7 @@ cp(char *s, char *ss)
|
|||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
time_t
|
||||
moddate(char *s)
|
||||
time_t moddate(char *s)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
|
@ -327,6 +326,7 @@ char *
|
|||
username(int uid)
|
||||
{
|
||||
char *s;
|
||||
|
||||
#ifndef __EMX__
|
||||
struct passwd *pwd;
|
||||
|
||||
|
@ -349,6 +349,7 @@ char *
|
|||
homedir(int uid)
|
||||
{
|
||||
char *s;
|
||||
|
||||
#ifndef __EMX__
|
||||
struct passwd *pwd;
|
||||
|
||||
|
@ -612,7 +613,7 @@ pathtoexec(char *file)
|
|||
s[len] = 0;
|
||||
s = Erealloc(s, len + 2 + exelen);
|
||||
#ifdef __EMX__
|
||||
if (s[len-1] != '/')
|
||||
if (s[len - 1] != '/')
|
||||
#endif
|
||||
strcat(s, "/");
|
||||
strcat(s, file);
|
||||
|
@ -630,7 +631,7 @@ pathtoexec(char *file)
|
|||
s[len] = 0;
|
||||
s = Erealloc(s, len + 2 + exelen);
|
||||
#ifdef __EMX__
|
||||
if (s[len-1] != '/')
|
||||
if (s[len - 1] != '/')
|
||||
#endif
|
||||
strcat(s, "/");
|
||||
strcat(s, file);
|
||||
|
@ -679,7 +680,7 @@ pathtofile(char *file)
|
|||
s[len] = 0;
|
||||
s = Erealloc(s, len + 2 + exelen);
|
||||
#ifdef __EMX__
|
||||
if (s[len-1] != '/')
|
||||
if (s[len - 1] != '/')
|
||||
#endif
|
||||
strcat(s, "/");
|
||||
strcat(s, file);
|
||||
|
@ -697,7 +698,7 @@ pathtofile(char *file)
|
|||
s[len] = 0;
|
||||
s = Erealloc(s, len + 2 + exelen);
|
||||
#ifdef __EMX__
|
||||
if (s[len-1] != '/')
|
||||
if (s[len - 1] != '/')
|
||||
#endif
|
||||
strcat(s, "/");
|
||||
strcat(s, file);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
/*
|
||||
* Copyright (C) 2000 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
*
|
||||
|
@ -52,7 +53,8 @@ FindItem(char *name, int id, int find_by, int type)
|
|||
{
|
||||
while (ptr)
|
||||
{
|
||||
if ((ptr->type == type) && (!strcmp(name, ptr->name)) && (ptr->id == id))
|
||||
if ((ptr->type == type) && (!strcmp(name, ptr->name))
|
||||
&& (ptr->id == id))
|
||||
EDBUG_RETURN(ptr->item);
|
||||
ptr = ptr->next;
|
||||
}
|
||||
|
@ -140,7 +142,8 @@ RemoveItem(char *name, int id, int find_by, int type)
|
|||
{
|
||||
while (ptr)
|
||||
{
|
||||
if ((ptr->type == type) && (!strcmp(name, ptr->name)) && (ptr->id == id))
|
||||
if ((ptr->type == type) && (!strcmp(name, ptr->name))
|
||||
&& (ptr->id == id))
|
||||
{
|
||||
if (pptr)
|
||||
pptr->next = ptr->next;
|
||||
|
|
|
@ -33,7 +33,9 @@ extern char waitonly;
|
|||
|
||||
static int stdin_state;
|
||||
void restore_stdin_state(void);
|
||||
void restore_stdin_state(void) {
|
||||
void
|
||||
restore_stdin_state(void)
|
||||
{
|
||||
fcntl(0, F_SETFL, stdin_state);
|
||||
}
|
||||
|
||||
|
@ -75,8 +77,7 @@ main(int argc, char **argv)
|
|||
}
|
||||
else if ((!strcmp(argv[i], "-h")) ||
|
||||
(!strcmp(argv[i], "--h")) ||
|
||||
(!strcmp(argv[i], "-help")) ||
|
||||
(!strcmp(argv[i], "--help")))
|
||||
(!strcmp(argv[i], "-help")) || (!strcmp(argv[i], "--help")))
|
||||
{
|
||||
printf("%s [ -e \"Command to Send to Enlightenment then exit\"]\n"
|
||||
" [ -ewait \"Command to Send to E then wait for a reply then exit\"]\n",
|
||||
|
@ -120,7 +121,7 @@ main(int argc, char **argv)
|
|||
XSync(disp, False);
|
||||
j = 0;
|
||||
stdin_state = fcntl(0, F_GETFL, 0);
|
||||
atexit( restore_stdin_state );
|
||||
atexit(restore_stdin_state);
|
||||
fcntl(0, F_SETFL, O_NONBLOCK);
|
||||
for (;;)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue