summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/.gitignore1
-rw-r--r--lib-src/ChangeLog58
-rw-r--r--lib-src/emacsclient.c77
-rw-r--r--lib-src/etags.c19
-rw-r--r--lib-src/makefile.w32-in44
5 files changed, 144 insertions, 55 deletions
diff --git a/lib-src/.gitignore b/lib-src/.gitignore
index faf263e740d..157ce12c972 100644
--- a/lib-src/.gitignore
+++ b/lib-src/.gitignore
@@ -24,3 +24,4 @@ makefile
blessmail
*-spd
*.pdb
+stamp_BLD
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index f15644050d9..76a0dcf1b9e 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,36 @@
+2006-12-28 Francesco Potort,Al(B <pot@gnu.org>
+
+ * etags.c (readline): When creating a relative file name from a
+ #line directive, leave the file name alone. The previous
+ behaviour was to make it relative to the tags file directory,
+ under the hypothesis that the #line directive file name was
+ relative to the directory of the tagged file. That hypothesis is
+ wrong with Cpp and Lex.
+ (Makefile_targets): Do not include spaces in tag names.
+
+2006-12-22 Eli Zaretskii <eliz@gnu.org>
+
+ * makefile.w32-in (make-docfile, ctags, etags, ebrowse, hexl)
+ (movemail, fakemail, sorted-doc, digest-doc, emacsclient)
+ (test-distrib, $(DOC), all): depend on stamp_BLD instead of $(BLD).
+ ($(BLD)/make-docfile.$(O) $(BLD)/hexl.$(O) $(BLD)/fakemail.$(O))
+ ($(BLD)/sorted-doc.$(O) $(BLD)/digest-doc.$(O))
+ ($(BLD)/test-distrib.$(O) $(GETOPTOBJS) $(MOVEMAILOBJS))
+ ($(BLD)/emacsclient.$(O) $(BLD)/etags.$(O) $(BLD)/regex.$(O))
+ ($(BLD)/ebrowse.$(O) $(BLD)/ctags.$(O)): Depend on stamp_BLD.
+ (clean): Delete stamp_BLD.
+
+2006-12-20 Francesco Potort,Al(B <pot@gnu.org>
+
+ * etags.c (C_entries): DEFUN names were longer by one: corrected.
+
+2006-12-18 Juanma Barranquero <lekktu@gmail.com>
+
+ * emacsclient.c [WINDOWSNT] (set_fg, get_wc): New variables.
+ [WINDOWSNT] (w32_find_emacs_process, w32_give_focus): New functions.
+ (main) [WINDOWSNT]: Remove code to release the focus; call
+ w32_give_focus instead.
+
2006-12-15 Juanma Barranquero <lekktu@gmail.com>
* emacsclient.c (w32_execvp): New function; wrapper for `execvp'.
@@ -26,7 +59,7 @@
(set_tcp_socket): Make the message for non-local connections
informational rather than an error.
-2006-11-28 Kevin Ryde <user42@zip.com.au> (tiny change)
+2006-11-28 Kevin Ryde <user42@zip.com.au>
* etags.c (readline): Check for double quote after #line.
@@ -454,10 +487,9 @@
2005-07-13 Ken Raeburn <raeburn@gnu.org>
- * pop.c: Don't include des.h (or variants thereof); krb.h will do
- it.
- (sendline): Add the \r\n to the line in a temporary buffer, and
- write it all at once.
+ * pop.c: Don't include des.h (or variants thereof); krb.h will do it.
+ (sendline): Add the \r\n to the line in a temporary buffer, and write
+ it all at once.
2005-07-04 Lute Kamstra <lute@gnu.org>
@@ -497,10 +529,9 @@
2005-02-04 Andreas Schwab <schwab@suse.de>
- * movemail.c (fatal): Accept third parameter and pass down to
- error.
- (pfatal_with_name): Pass error string as format parameter instead
- of as part of format string.
+ * movemail.c (fatal): Accept third parameter and pass down to error.
+ (pfatal_with_name): Pass error string as format parameter instead of
+ as part of format string.
(pfatal_and_delete): Likewise.
(main): Adjust call to fatal.
(xmalloc): Likewise.
@@ -511,8 +542,7 @@
2004-12-26 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
- * make-docfile.c: Include stdlib.h even if WINDOWSNT is not
- defined.
+ * make-docfile.c: Include stdlib.h even if WINDOWSNT is not defined.
2004-12-15 Andreas Schwab <schwab@suse.de>
@@ -578,8 +608,7 @@
2004-05-10 Thien-Thi Nguyen <ttn@gnu.org>
- * test-distrib.c (main): For failing cases, exit with
- `EXIT_FAILURE'.
+ * test-distrib.c (main): For failing cases, exit with `EXIT_FAILURE'.
2004-05-08 Jason Rumney <jasonr@gnu.org>
@@ -752,8 +781,7 @@
2003-04-27 Oliver Scholz <alkibiades@gmx.de>
- * update-game-score.c (read_scores): Fix corruption of scores on
- read.
+ * update-game-score.c (read_scores): Fix corruption of scores on read.
2003-04-12 Stefan Monnier <monnier@cs.yale.edu>
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index bbd6cbe239b..419cdd94b88 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -523,7 +523,7 @@ initialize_sockets ()
/*
* Read the information needed to set up a TCP comm channel with
* the Emacs server: host, port, pid and authentication string.
-*/
+ */
int
get_server_config (server, authentication)
struct sockaddr_in *server;
@@ -845,6 +845,62 @@ set_socket ()
exit (EXIT_FAILURE);
}
+#ifdef WINDOWSNT
+FARPROC set_fg; /* Pointer to AllowSetForegroundWindow. */
+FARPROC get_wc; /* Pointer to RealGetWindowClassA. */
+
+BOOL CALLBACK
+w32_find_emacs_process (hWnd, lParam)
+ HWND hWnd;
+ LPARAM lParam;
+{
+ DWORD pid;
+ char class[6];
+
+ /* Reject any window not of class "Emacs". */
+ if (! get_wc (hWnd, class, sizeof (class))
+ || strcmp (class, "Emacs"))
+ return TRUE;
+
+ /* We only need the process id, not the thread id. */
+ (void) GetWindowThreadProcessId (hWnd, &pid);
+
+ /* Not the one we're looking for. */
+ if (pid != (DWORD) emacs_pid) return TRUE;
+
+ /* OK, let's raise it. */
+ set_fg (emacs_pid);
+
+ /* Stop enumeration. */
+ return FALSE;
+}
+
+/*
+ * Search for a window of class "Emacs" and owned by a process with
+ * process id = emacs_pid. If found, allow it to grab the focus.
+ */
+void
+w32_give_focus ()
+{
+ HMODULE hUser32;
+
+ /* It should'nt happen when dealing with TCP sockets. */
+ if (!emacs_pid) return;
+
+ if (!(hUser32 = LoadLibrary ("user32.dll"))) return;
+
+ /* Modern Windows restrict which processes can set the foreground window.
+ emacsclient can allow Emacs to grab the focus by calling the function
+ AllowSetForegroundWindow. Unfortunately, older Windows (W95, W98 and
+ NT) lack this function, so we have to check its availability. */
+ if ((set_fg = GetProcAddress (hUser32, "AllowSetForegroundWindow"))
+ && (get_wc = GetProcAddress (hUser32, "RealGetWindowClassA")))
+ EnumWindows (w32_find_emacs_process, (LPARAM) 0);
+
+ FreeLibrary (hUser32);
+}
+#endif
+
int
main (argc, argv)
int argc;
@@ -889,24 +945,7 @@ main (argc, argv)
}
#ifdef WINDOWSNT
- /*
- Modern Windows restrict which processes can set the foreground window.
- emacsclient can allow Emacs to grab the focus by calling the function
- AllowSetForegroundWindow. Unfortunately, older Windows (W95, W98
- and NT) lack this function, so we have to check its availability.
- */
- if (emacs_pid)
- {
- HMODULE hUser32;
-
- if (hUser32 = LoadLibrary ("user32.dll"))
- {
- FARPROC set_fg;
- if (set_fg = GetProcAddress (hUser32, "AllowSetForegroundWindow"))
- set_fg (emacs_pid);
- FreeLibrary (hUser32);
- }
- }
+ w32_give_focus ();
#endif
if (nowait)
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 26dac368b4d..c4f7fdc4d69 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -41,7 +41,7 @@
* configuration file containing regexp definitions for etags.
*/
-char pot_etags_version[] = "@(#) pot revision number is $Revision: 3.61 $";
+char pot_etags_version[] = "@(#) pot revision number is 17.25";
#define TRUE 1
#define FALSE 0
@@ -3163,7 +3163,7 @@ static void
make_C_tag (isfun)
bool isfun;
{
- /* This function should never be called when token.valid is FALSE, but
+ /* This function is never called when token.valid is FALSE, but
we must protect against invalid input or internal errors. */
if (!DEBUG && !token.valid)
return;
@@ -3493,7 +3493,6 @@ C_entries (c_ext, inf)
off += 1;
len -= 1;
}
- len = toklen;
linebuffer_setlen (&token_name, len);
strncpy (token_name.buffer,
newlb.buffer + off, len);
@@ -4687,8 +4686,16 @@ Makefile_targets (inf)
while (*bp != '\0' && *bp != '=' && *bp != ':')
bp++;
if (*bp == ':' || (globals && *bp == '='))
- make_tag (lb.buffer, bp - lb.buffer, TRUE,
- lb.buffer, bp - lb.buffer + 1, lineno, linecharno);
+ {
+ /* We should detect if there is more than one tag, but we do not.
+ We just skip initial and final spaces. */
+ char * namestart = skip_spaces (lb.buffer);
+ while (--bp > namestart)
+ if (!notinname (*bp))
+ break;
+ make_tag (namestart, bp - namestart + 1, TRUE,
+ lb.buffer, bp - lb.buffer + 2, lineno, linecharno);
+ }
}
}
@@ -6278,7 +6285,7 @@ readline (lbp, stream)
name = lbp->buffer + start;
*endp = '\0';
canonicalize_filename (name); /* for DOS */
- taggedabsname = absolute_filename (name, curfdp->infabsdir);
+ taggedabsname = absolute_filename (name, tagfiledir);
if (filename_is_absolute (name)
|| filename_is_absolute (curfdp->infname))
taggedfname = savestr (taggedabsname);
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in
index 65d40255ae7..7b669c42bd4 100644
--- a/lib-src/makefile.w32-in
+++ b/lib-src/makefile.w32-in
@@ -24,7 +24,7 @@ ALL = make-docfile hexl ctags etags movemail ebrowse sorted-doc digest-doc emacs
.PHONY: $(ALL)
-VERSION = 22.0.91
+VERSION = 22.0.92
LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
-DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \
@@ -45,18 +45,18 @@ $(BLD)/digest-doc.exe: $(BLD)/digest-doc.$(O)
$(BLD)/test-distrib.exe: $(BLD)/test-distrib.$(O)
$(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/test-distrib.$(O) $(LIBS)
-make-docfile: $(BLD) $(BLD)/make-docfile.exe
-ctags: $(BLD) $(BLD)/ctags.exe
-etags: $(BLD) $(BLD)/etags.exe
-ebrowse: $(BLD) $(BLD)/ebrowse.exe
-hexl: $(BLD) $(BLD)/hexl.exe
-movemail: $(BLD) $(BLD)/movemail.exe
-fakemail: $(BLD) $(BLD)/fakemail.exe
-sorted-doc: $(BLD) $(BLD)/sorted-doc.exe
-digest-doc: $(BLD) $(BLD)/digest-doc.exe
-emacsclient: $(BLD) $(BLD)/emacsclient.exe $(BLD)/emacsclientw.exe
-
-test-distrib: $(BLD) $(BLD)/test-distrib.exe
+make-docfile: stamp_BLD $(BLD)/make-docfile.exe
+ctags: stamp_BLD $(BLD)/ctags.exe
+etags: stamp_BLD $(BLD)/etags.exe
+ebrowse: stamp_BLD $(BLD)/ebrowse.exe
+hexl: stamp_BLD $(BLD)/hexl.exe
+movemail: stamp_BLD $(BLD)/movemail.exe
+fakemail: stamp_BLD $(BLD)/fakemail.exe
+sorted-doc: stamp_BLD $(BLD)/sorted-doc.exe
+digest-doc: stamp_BLD $(BLD)/digest-doc.exe
+emacsclient: stamp_BLD $(BLD)/emacsclient.exe $(BLD)/emacsclientw.exe
+
+test-distrib: stamp_BLD $(BLD)/test-distrib.exe
"$(BLD)/test-distrib.exe" "$(SRC)/testfile"
GETOPTOBJS = $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O)
@@ -275,7 +275,7 @@ lisp2 = \
- $(DEL) temacs.exe
DOC = DOC
-$(DOC): $(BLD) $(BLD)/make-docfile.exe ../src/$(BLD)/temacs.exe $(lisp1) $(lisp2)
+$(DOC): stamp_BLD $(BLD)/make-docfile.exe ../src/$(BLD)/temacs.exe $(lisp1) $(lisp2)
- $(DEL) $(DOC)
"$(THISDIR)/$(BLD)/make-docfile" -o $(DOC) -d ../src $(obj)
"$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1)
@@ -291,7 +291,7 @@ $(DOC): $(BLD) $(BLD)/make-docfile.exe ../src/$(BLD)/temacs.exe $(lisp1) $(lisp
#
# Build the executables
#
-all: $(BLD) $(ALL) $(DOC)
+all: stamp_BLD $(ALL) $(DOC)
#
# Assuming INSTALL_DIR is defined, build and install emacs in it.
@@ -319,6 +319,7 @@ clean:
- $(DEL) ctags.c
- $(DEL) getopt.h
- $(DEL_TREE) $(OBJDIR)
+ - $(DEL) stamp_BLD
cleanall: clean
- $(DEL_TREE) obj
@@ -472,3 +473,16 @@ $(BLD)/timer.$(O) : \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/lib-src/../src/config.h
+
+# The following dependencies are for supporting parallel builds, where
+# we must make sure $(BLD) exists before any compilation starts.
+#
+$(BLD)/make-docfile.$(O) $(BLD)/hexl.$(O) $(BLD)/fakemail.$(O): stamp_BLD
+
+$(BLD)/sorted-doc.$(O) $(BLD)/digest-doc.$(O): stamp_BLD
+
+$(BLD)/test-distrib.$(O) $(GETOPTOBJS) $(MOVEMAILOBJS): stamp_BLD
+
+$(BLD)/emacsclient.$(O) $(BLD)/etags.$(O) $(BLD)/regex.$(O): stamp_BLD
+
+$(BLD)/ebrowse.$(O) $(BLD)/ctags.$(O): stamp_BLD