summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-04-10 08:49:40 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-04-10 08:49:40 -0700
commit4073e537492ac700f926d1ed0f27d6160a142ae4 (patch)
treedfaca3760efeffcb9fc41bbbb7265e85240a533d
parentda0e53381fb37a43706634ada4b3e04ba4e5e366 (diff)
parent37f1c9309eb0e6b3bc3dda1ffa7f99410c22355d (diff)
downloademacs-4073e537492ac700f926d1ed0f27d6160a142ae4.tar.gz
Merge from mainline.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/emacs-lisp/tabulated-list.el2
-rw-r--r--src/ChangeLog12
-rw-r--r--src/gnutls.c15
-rw-r--r--src/gnutls.h12
-rw-r--r--src/process.c4
6 files changed, 34 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 17136dddd26..13776503dfb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,8 +1,13 @@
-2011-04-09 Paul Eggert <eggert@cs.ucla.edu>
+2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
Remove the doprnt implementation, as Emacs now uses vsnprintf.
* emacs-lisp/find-gc.el (find-gc-source-files): Remove doprnt.c.
+2011-04-10 Leo Liu <sdl.web@gmail.com>
+
+ * emacs-lisp/tabulated-list.el (tabulated-list-print-entry): Fix
+ typo.
+
2011-04-09 Chong Yidong <cyd@stupidchicken.com>
* image-mode.el (image-toggle-display-image): Signal an error if
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index 03ee59dd89c..6409c2206bc 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -271,7 +271,7 @@ of column descriptors."
;; Truncate labels if necessary.
(and (> width 6)
(> (length label) width)
- (setq label (concat (substring desc 0 (- width 3))
+ (setq label (concat (substring label 0 (- width 3))
"...")))
(if (stringp desc)
(insert (propertize label 'help-echo help-echo))
diff --git a/src/ChangeLog b/src/ChangeLog
index 5ed6826d429..d3a387d1e63 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
-2011-04-09 Paul Eggert <eggert@cs.ucla.edu>
+2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
* xdisp.c (vmessage): Use a better test for character truncation.
@@ -78,6 +78,16 @@
* xdisp.c, lisp.h (message_nolog): Remove; unused.
+2011-04-10 Jim Meyering <meyering@redhat.com>
+
+ use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
+ * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
+ return ssize_t not "int", and use size_t as the buffer length.
+ (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
+ * gnutls.h: Update declarations.
+ * process.c (read_process_output): Use ssize_t, to match.
+ (send_process): Likewise.
+
2011-04-09 Chong Yidong <cyd@stupidchicken.com>
* image.c (Fimagemagick_types): Doc fix, and comment cleanup.
diff --git a/src/gnutls.c b/src/gnutls.c
index 3a461891e2e..d9e4dcec15a 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -70,11 +70,12 @@ emacs_gnutls_handshake (struct Lisp_Process *proc)
}
}
-int
-emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf,
- unsigned int nbyte)
+ssize_t
+emacs_gnutls_write (int fildes, struct Lisp_Process *proc, const char *buf,
+ size_t nbyte)
{
- register int rtnval, bytes_written;
+ ssize_t rtnval;
+ size_t bytes_written;
gnutls_session_t state = proc->gnutls_state;
if (proc->gnutls_initstage != GNUTLS_STAGE_READY) {
@@ -109,11 +110,11 @@ emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf,
return (bytes_written);
}
-int
+ssize_t
emacs_gnutls_read (int fildes, struct Lisp_Process *proc, char *buf,
- unsigned int nbyte)
+ size_t nbyte)
{
- register int rtnval;
+ ssize_t rtnval;
gnutls_session_t state = proc->gnutls_state;
if (proc->gnutls_initstage != GNUTLS_STAGE_READY)
diff --git a/src/gnutls.h b/src/gnutls.h
index 43a9eefce1b..b39131b6236 100644
--- a/src/gnutls.h
+++ b/src/gnutls.h
@@ -50,15 +50,15 @@ typedef enum
#define GNUTLS_LOG2(level, max, string, extra) if (level <= max) { gnutls_log_function2 (level, "(Emacs) " string, extra); }
-int
-emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf,
- unsigned int nbyte);
-int
+ssize_t
+emacs_gnutls_write (int fildes, struct Lisp_Process *proc, const char *buf,
+ size_t nbyte);
+ssize_t
emacs_gnutls_read (int fildes, struct Lisp_Process *proc, char *buf,
- unsigned int nbyte);
+ size_t nbyte);
extern void syms_of_gnutls (void);
-#endif
+#endif
#endif
diff --git a/src/process.c b/src/process.c
index 6cddbf6d1a9..624610069d8 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4898,7 +4898,7 @@ read_process_output_error_handler (Lisp_Object error_val)
static int
read_process_output (Lisp_Object proc, register int channel)
{
- register int nbytes;
+ register ssize_t nbytes;
char *chars;
register Lisp_Object outstream;
register struct Lisp_Process *p = XPROCESS (proc);
@@ -5243,7 +5243,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
{
/* Use volatile to protect variables from being clobbered by longjmp. */
struct Lisp_Process *p = XPROCESS (proc);
- EMACS_INT rv;
+ ssize_t rv;
struct coding_system *coding;
struct gcpro gcpro1;
void (*volatile old_sigpipe) (int);