[Commit] jove ChangeLog, 1.6, 1.7 daemon.c, 1.4, 1.5 insert.c, 1.8,
1.9 io.c, 1.5, 1.6 jove.c, 1.7, 1.8 jovedaemon.c, 1.1.1.1,
1.2 tune.h, 1.5, 1.6
Keith Packard
commit at keithp.com
Sun Dec 19 17:13:43 PST 2004
- Previous message: [Commit] nickle ChangeLog, 1.116, 1.117 Makefile.am, 1.63,
1.64 builtin-foreign.c, 1.1, 1.2 configure.in, 1.39, 1.40
- Next message: [Commit] jove/doc .joverc,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: keithp
Update of /local/src/CVS/jove
In directory home.keithp.com:/tmp/cvs-serv23865
Modified Files:
ChangeLog daemon.c insert.c io.c jove.c jovedaemon.c tune.h
Log Message:
2004-12-19 Keith Packard <keithp at keithp.com>
* daemon.c: (InitDaemon), (closeDown), (StopDaemon), (CloseDaemon):
* jovedaemon.c:
Fix daemon stuff
* doc/.joverc:
i/d is now disabled by default
* insert.c: (NextComposeSequence):
Add more compose sequences.
* io.c: (dfollow):
use dfollow when auto-pushing tags to get absolute path names
* jove.c: (terminchar):
* tune.h:
Index: ChangeLog
===================================================================
RCS file: /local/src/CVS/jove/ChangeLog,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ChangeLog 28 Oct 2004 15:17:24 -0000 1.6
+++ ChangeLog 20 Dec 2004 01:13:39 -0000 1.7
@@ -1,3 +1,17 @@
+2004-12-19 Keith Packard <keithp at keithp.com>
+
+ * daemon.c: (InitDaemon), (closeDown), (StopDaemon), (CloseDaemon):
+ * jovedaemon.c:
+ Fix daemon stuff
+ * doc/.joverc:
+ i/d is now disabled by default
+ * insert.c: (NextComposeSequence):
+ Add more compose sequences.
+ * io.c: (dfollow):
+ use dfollow when auto-pushing tags to get absolute path names
+ * jove.c: (terminchar):
+ * tune.h:
+
2004-10-28 Keith Packard <keithp at keithp.com>
* man.c:
Index: daemon.c
===================================================================
RCS file: /local/src/CVS/jove/daemon.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- daemon.c 15 May 2003 06:01:20 -0000 1.4
+++ daemon.c 20 Dec 2004 01:13:39 -0000 1.5
@@ -23,11 +23,15 @@
*/
extern fd_set global_fd;
+extern int max_fd;
-fd_set WatchMask;
int WatchDaemon;
int WatchFd;
int WatchLock;
+fd_set WatchMask;
+
+static void
+closeDown (int fd);
struct monitoring {
struct monitoring *next;
@@ -58,9 +62,12 @@
mon->next = monitoring;
monitoring = mon;
mon->fd = new;
+ FD_SET(new, &global_fd);
+ FD_SET(new, &WatchMask);
+ if (new > max_fd)
+ max_fd = new;
mon->name[0] = '\0';
mon->count = 0;
- FD_SET(new, &WatchMask);
}
} else {
len = read (fd, fileName, sizeof (fileName));
@@ -122,37 +129,31 @@
sizeof (address.sun_family) + strlen (address.sun_path) + 1) == -1)
complain ("bind to %s failed", address.sun_path);
listen (WatchFd, 5);
+ FD_SET (WatchFd, &global_fd);
+ FD_SET (WatchFd, &WatchMask);
+ if (WatchFd > max_fd)
+ max_fd = WatchFd;
WatchDaemon = 1;
}
-closeDown (fd)
+static void
+closeDown (int fd)
{
- struct monitoring *m, *p, *n;
+ struct monitoring **p, *m;
- if (fd == 0) {
- for (m = monitoring; m; m = n) {
- n = m->next;
- FD_CLR (m->fd, &WatchMask);
+ for (p = &monitoring; m = *p;) {
+ if (fd == 0 || fd == m->fd) {
+ *p = m->next;
FD_CLR (m->fd, &global_fd);
- Watch
- WatchMask &= ~(1 << m->fd);
+ FD_CLR (m->fd, &WatchMask);
close (m->fd);
+ if (m->fd == max_fd)
+ while (--max_fd)
+ if (FD_ISSET (max_fd, &global_fd))
+ break;
free (m);
- }
- monitoring = 0;
- } else {
- p = 0;
- for (m = monitoring; m; m = n) {
- n = m->next;
- if (m->fd == fd) {
- WatchMask &= ~(1 << m->fd);
- close (m->fd);
- if (p)
- p->next = n;
- else
- monitoring = n;
- }
- }
+ } else
+ p = &m->next;
}
}
@@ -160,17 +161,21 @@
{
if (WatchFd) {
closeDown (0);
+ FD_CLR (WatchFd, &global_fd);
+ FD_CLR (WatchFd, &WatchMask);
close (WatchFd);
+ if (WatchFd == max_fd)
+ while (--max_fd)
+ if (FD_ISSET (max_fd, &global_fd))
+ break;
close (WatchLock);
}
- WatchMask = 0;
WatchDaemon = 0;
WatchFd = 0;
}
CloseDaemon ()
{
- char *ask();
char *name;
struct monitoring *mon;
char **names;
Index: insert.c
===================================================================
RCS file: /local/src/CVS/jove/insert.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- insert.c 27 Oct 2004 17:58:21 -0000 1.8
+++ insert.c 20 Dec 2004 01:13:39 -0000 1.9
@@ -465,7 +465,7 @@
char ComposeSequences[V_STRING_LEN] =
/* Latin 1 Supplement */
"!:¡|c:¢#:£$:¤y:Â¥| :¦ss:§\" :¨cr:©_a:ª<<:«~ :¬- :Ârc:®__:¯"
-". :°+-:±1 :¹2 :²3 :³' :´,u:µpp:¶ .:·, :¸m:º>>:»14:¼12:½34:¾?:¿"
+". :°+-:±^1:¹^2:²^3:³' :´,u:µpp:¶ .:·, :¸m:º>>:»14:¼12:½34:¾?:¿"
"`A:Ã'A:Ã^A:Ã~A:Ã\"A:Ã.A:Ã
AE:Ã,C:Ã`E:Ã'E:Ã^E:Ã\"E:Ã`I:Ã'I:Ã^I:Ã\"I:Ã"
"-D:Ã~N:Ã`O:Ã'O:Ã^O:Ã~O:Ã\"O:Ã* :Ã/O:Ã`U:Ã'U:Ã^U:Ã\"U:Ã'Y:ÃTR:ÃSS:Ã"
"`a:à 'a:á^a:â~a:ã\"a:ä.a:Ã¥ae:æ,c:ç`e:è'e:é^e:ê\"e:ë`i:ì'i:Ã^i:î\"i:ï"
@@ -475,18 +475,25 @@
/* Greek */
"AL:ÎBE:ÎGA:ÎDE:ÎEP:ÎZE:ÎET:ÎTH:ÎIO:ÎKA:ÎLA:ÎMU:ÎNU:ÎXI:ÎON:ÎPI:Î RH:ΡSI:ΣTA:ΤUP:Î¥PH:ΦCH:ΧPS:ΨOM:Ω"
"al:αbe:βga:γde:δep:εze:ζet:ηth:θio:ιka:κla:λmu:μnu:νxi:ξon:οpi:Ïrh:Ïsi:Ïta:Ïup:Ï
ph:Ïch:Ïps:Ïom:Ï"
-/* Currency Symbols */
-"/C:â¡CR:â¢=F:â£=L:â¤/m:â¥=N:â¦=P:â§=R:â¨=W:â©=S:âª=d:â«=C:â¬=K:â=T:â®=D:â¯=f:â°"
/* General punctuation, preceded by a space in some cases */
"||:â__:â `:â ':â ,:â``:â'':â,,:â+ :â ++:â¡o :â¢..:â¦%:â° <:â¹ >:âº"
+/* Superscripts and Subscripts */
+"^0:â°^i:â±^4:â´^5:âµ^6:â¶^7:â·^8:â¸^9:â¹^+:âº^-:â»^=:â¼^(:â½^):â¾^n:â¿"
+"_0:â_1:â_2:â_3:â_4:â_5:â
_6:â_7:â_8:â_9:â_+:â_-:â_=:â_(:â_):â"
+/* Currency Symbols */
+"/C:â¡CR:â¢=F:â£=L:â¤/m:â¥=N:â¦=P:â§=R:â¨=W:â©=S:âª=d:â«=C:â¬=K:â=T:â®=D:â¯=f:â°"
/* Letterlike Sybols */
"tm:â¢"
+/* Number forms */
+"13:â
23:â
15:â
25:â
35:â
45:â
16:â
56:â
18:â
38:â
58:â
78:â
"
/* Arrows */
"->:â<-:â|^:â|v:â<=:â=>:â=^:â=v:â<~:â~>:â"
/* Mathematical operators */
"V-:âdi:â E:â/E:â /:âsq:âoo:âin:â«~~:â/=:â <=:â¤>=:⥠-:â ~:â¼ |:â£/|:â¤||:â¥=~:â~=:â"
/* Geometric Shapes */
"<>:â"
+/* Miscellaneous Symbols */
+":(:â¹:):âº"
/* Alphabetic Presentation Forms */
"fi:ï¬fl:ï¬"
;
@@ -495,10 +502,11 @@
NextComposeSequence (char *compose)
{
ucs4 c;
+ int first = 1;
if (!compose)
return 0;
- while ((c = next_ucs4 (&compose)) && c != ':')
- ;
+ while ((c = next_ucs4 (&compose)) && (first || c != ':'))
+ first = 0;
if (!c)
return 0;
return buf_next (compose);
Index: io.c
===================================================================
RCS file: /local/src/CVS/jove/io.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- io.c 20 Oct 2004 05:26:40 -0000 1.5
+++ io.c 20 Dec 2004 01:13:39 -0000 1.6
@@ -26,6 +26,9 @@
private int tellall; /* display file io info? */
private int readonly; /* last file opened readonly */
+private
+dfollow(char *file, char *into);
+
#ifdef VMUNIX
char genbuf[LBSIZE],
linebuf[LBSIZE];
@@ -263,7 +266,7 @@
RealCD (newdir, miniadd)
char *newdir;
{
- char tag_file;
+ char tag_file[FILESIZE];
if (!strcmp (newdir, PWD))
return;
@@ -277,7 +280,10 @@
UpdModLine++;
setCWD (newdir);
if (AutoPushTag)
- AddTagFile ("tags", FALSE);
+ {
+ dfollow ("tags", tag_file);
+ AddTagFile (tag_file, FALSE);
+ }
}
#ifndef IPROCS
@@ -415,9 +421,7 @@
}
private
-dfollow(file, into)
-char *file,
- *into;
+dfollow(char *file, char *into)
{
char *dp,
*sp,
Index: jove.c
===================================================================
RCS file: /local/src/CVS/jove/jove.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- jove.c 18 Oct 2004 04:31:16 -0000 1.7
+++ jove.c 20 Dec 2004 01:13:39 -0000 1.8
@@ -192,16 +192,16 @@
extern fd_set global_fd;
extern int NumProcs,
max_fd,
-#ifdef JDAEMON
- WatchDaemon,
- WatchMask,
- WatchFd,
-#endif
errno;
register int tmp,
nfds;
fd_set reads;
int fd;
+#ifdef JDAEMON
+ extern int WatchDaemon;
+ extern int WatchFd;
+ extern fd_set WatchMask;
+#endif
if (nchars <= 0) {
/* Get a character from the keyboard, first checking for
@@ -216,11 +216,7 @@
{
do {
do {
-#ifdef JDAEMON
- reads = global_fd | WatchMask;
-#else
reads = global_fd;
-#endif
nfds = select(max_fd+1, &reads, (fd_set *) 0, (fd_set *) 0, (struct timeval *) 0);
} while (nfds < 0 && errno == EINTR);
@@ -228,6 +224,9 @@
case -1:
printf("\rerror %d in select", errno);
FD_ZERO (&global_fd);
+#ifdef JDAEMON
+ global_fd = WatchMask;
+#endif
FD_SET (0, &global_fd);
break;
default:
@@ -242,12 +241,11 @@
{
if (FD_ISSET (fd, &reads)) {
#ifdef JDAEMON
- if (WatchMask & bit)
- jdaemon (tmp);
+ if (FD_ISSET (fd, &WatchMask))
+ jdaemon (fd);
else
-#endif
+#endif
read_proc(fd);
- FD_CLR (fd, &reads);
nfds--;
}
}
Index: jovedaemon.c
===================================================================
RCS file: /local/src/CVS/jove/jovedaemon.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- jovedaemon.c 10 Mar 2001 12:23:12 -0000 1.1.1.1
+++ jovedaemon.c 20 Dec 2004 01:13:39 -0000 1.2
@@ -5,7 +5,7 @@
*/
#include "tune.h"
-#ifndef SYSV
+#ifdef JDAEMON
# include <sys/types.h>
# include <sys/socket.h>
# include <sys/un.h>
@@ -14,11 +14,10 @@
main (argc, argv)
char **argv;
{
-#ifndef SYSV
+#ifdef JDAEMON
char *home, *getenv();
struct sockaddr_un address;
int s;
- int reads;
char pathname[1024];
char wd[1024];
int gotwd = 0;
@@ -28,8 +27,8 @@
sprintf (address.sun_path, "%s/.joved", home);
address.sun_family = AF_UNIX;
s = socket (AF_UNIX, SOCK_STREAM, 0);
- connect (s, &address, sizeof (address.sun_family) +
- strlen (address.sun_path) + 1);
+ connect (s, (struct sockaddr *) &address,
+ sizeof (address.sun_family) + strlen (address.sun_path) + 1);
while (*++argv) {
if (**argv == '-') {
switch (*++*argv) {
@@ -41,7 +40,7 @@
write (s, *argv, strlen (*argv) + 1);
else {
if (!gotwd) {
- (void) getwd (wd);
+ (void) getcwd (wd, sizeof (wd));
strcat (wd, "/");
gotwd = 1;
}
@@ -51,8 +50,10 @@
}
}
if (!leave) {
- reads = 1 << s;
- select (reads+1, &reads, (int *) 0, (int *) 0, (struct timeval *) 0);
+ fd_set reads;
+ FD_ZERO(&reads);
+ FD_SET(s, &reads);
+ select (s+1, &reads, (fd_set *) 0, (fd_set *) 0, (struct timeval *) 0);
}
#endif
exit (0);
Index: tune.h
===================================================================
RCS file: /local/src/CVS/jove/tune.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- tune.h 20 Oct 2004 05:26:40 -0000 1.5
+++ tune.h 20 Dec 2004 01:13:39 -0000 1.6
@@ -116,7 +116,7 @@
# define WIRED_TERMS /* include code for wired terminals */
# define ANSICODES /* extra commands that process ANSI codes */
# ifdef BSD4_2
-/* # define JDAEMON /* support unix domain socket for daemon */
+# define JDAEMON /* support unix domain socket for daemon */
# endif
# endif
# define LISP /* include the code for Lisp Mode */
- Previous message: [Commit] nickle ChangeLog, 1.116, 1.117 Makefile.am, 1.63,
1.64 builtin-foreign.c, 1.1, 1.2 configure.in, 1.39, 1.40
- Next message: [Commit] jove/doc .joverc,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Commit
mailing list