SHA256
1
0
forked from pool/emacs
emacs/emacs-23.1-gcc45.dif

309 lines
8.9 KiB
Plaintext

--- lib-src/pop.c
+++ lib-src/pop.c 2010-03-17 14:07:55.904126829 +0000
@@ -28,6 +28,7 @@ along with GNU Emacs. If not, see <http
#ifdef MAIL_USE_POP
+#include <ctype.h>
#include <sys/types.h>
#ifdef WINDOWSNT
#include "ntlib.h"
@@ -1232,9 +1233,10 @@ socket_connection (host, flags)
for (cp = realhost; *cp; cp++)
{
- if (isupper (*cp))
+ const int c = *cp;
+ if (isupper (c))
{
- *cp = tolower (*cp);
+ *cp = tolower (c);
}
}
--- oldXMenu/Error.c
+++ oldXMenu/Error.c 2010-03-17 13:48:49.380126642 +0000
@@ -1,5 +1,6 @@
/* Copyright Massachusetts Institute of Technology 1985 */
+#include <stdio.h>
#include "copyright.h"
--- src/ccl.c
+++ src/ccl.c 2010-03-17 13:50:29.380626270 +0000
@@ -27,6 +27,9 @@ along with GNU Emacs. If not, see <http
#include <config.h>
#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#include "lisp.h"
#include "character.h"
--- src/charset.c
+++ src/charset.c 2010-03-18 09:41:44.856306456 +0000
@@ -272,7 +272,7 @@ load_charset_map (charset, entries, n_en
int n_entries;
int control_flag;
{
- Lisp_Object vec, table;
+ Lisp_Object vec = 0, table = 0;
unsigned max_code = CHARSET_MAX_CODE (charset);
int ascii_compatible_p = charset->ascii_compatible_p;
int min_char, max_char, nonascii_min_char;
@@ -640,7 +640,7 @@ load_charset (charset, control_flag)
struct charset *charset;
int control_flag;
{
- Lisp_Object map;
+ Lisp_Object map = 0;
if (inhibit_load_charset_map
&& temp_charset_work
--- src/cm.c
+++ src/cm.c 2010-03-18 09:45:28.412126540 +0000
@@ -33,13 +33,6 @@ along with GNU Emacs. If not, see <http
configure finds a non-standard termcap.h that the main build
won't find. */
-#if defined HAVE_TERMCAP_H && 0
-#include <termcap.h>
-#else
-extern void tputs P_ ((const char *, int, int (*)(int)));
-extern char *tgoto P_ ((const char *, int, int));
-#endif
-
#define BIG 9999 /* 9999 good on VAXen. For 16 bit machines
use about 2000.... */
@@ -339,7 +332,7 @@ cmgoto (tty, row, col)
llcost,
relcost,
directcost;
- int use;
+ int use = 0;
char *p,
*dcm;
--- src/cm.h
+++ src/cm.h 2010-03-18 08:15:28.376126640 +0000
@@ -160,7 +160,17 @@ extern char PC; /* Pad character */
extern int cost;
extern int evalcost ();
-#define emacs_tputs(tty, str, affcnt, putc) (current_tty = (tty), tputs (str, affcnt, putc))
+#if defined HAVE_TERMCAP_H && 0
+#include <termcap.h>
+#else
+/*
+ * #include <curses.h>
+ * #include <term.h>
+ */
+extern int tputs P_ ((const char *, int, int (*)(int)));
+extern char *tgoto P_ ((const char *, int, int));
+#endif
+#define emacs_tputs(tty, str, affcnt, putc) ({ current_tty = (tty); (void)tputs (str, affcnt, putc); })
extern struct tty_display_info *current_tty;
extern void cmcheckmagic P_ ((struct tty_display_info *));
--- src/coding.c
+++ src/coding.c 2010-03-18 09:44:45.360626578 +0000
@@ -3060,7 +3060,7 @@ detect_coding_iso_2022 (coding, detect_i
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
int single_shifting = 0;
- int id;
+ int id = 0;
int c, c1;
int consumed_chars = 0;
int i;
@@ -3573,7 +3573,7 @@ decode_coding_iso_2022 (coding)
int charset_id_0 = CODING_ISO_INVOKED_CHARSET (coding, 0);
int charset_id_1 = CODING_ISO_INVOKED_CHARSET (coding, 1);
int charset_id_2, charset_id_3;
- struct charset *charset;
+ struct charset *charset = (struct charset*)0;
int c;
struct composition_status *cmp_status = CODING_ISO_CMP_STATUS (coding);
Lisp_Object attrs, charset_list;
@@ -5591,7 +5591,7 @@ decode_coding_charset (coding)
{
int c;
Lisp_Object val;
- struct charset *charset;
+ struct charset *charset = (struct charset*)0;
int dim;
int len = 1;
unsigned code;
@@ -7739,12 +7739,12 @@ decode_coding_object (coding, src_object
Lisp_Object dst_object;
{
int count = specpdl_ptr - specpdl;
- unsigned char *destination;
- EMACS_INT dst_bytes;
+ unsigned char *destination = (unsigned char*)0;
+ EMACS_INT dst_bytes = 0;
EMACS_INT chars = to - from;
EMACS_INT bytes = to_byte - from_byte;
Lisp_Object attrs;
- int saved_pt = -1, saved_pt_byte;
+ int saved_pt = -1, saved_pt_byte = 0;
int need_marker_adjustment = 0;
Lisp_Object old_deactivate_mark;
@@ -7933,7 +7933,7 @@ encode_coding_object (coding, src_object
EMACS_INT chars = to - from;
EMACS_INT bytes = to_byte - from_byte;
Lisp_Object attrs;
- int saved_pt = -1, saved_pt_byte;
+ int saved_pt = -1, saved_pt_byte = 0;
int need_marker_adjustment = 0;
int kill_src_buffer = 0;
Lisp_Object old_deactivate_mark;
@@ -8273,8 +8273,8 @@ detect_coding_system (src, src_chars, sr
base_category = XINT (CODING_ATTR_CATEGORY (attrs));
if (base_category == coding_category_undecided)
{
- enum coding_category category;
- struct coding_system *this;
+ enum coding_category category = 0;
+ struct coding_system *this = (struct coding_system*)0;
int c, i;
/* Skip all ASCII bytes except for a few ISO2022 controls. */
--- src/doprnt.c
+++ src/doprnt.c 2010-03-17 14:05:00.296126178 +0000
@@ -154,8 +154,9 @@ doprnt1 (lispstrings, buffer, bufsize, f
while ('0' <= fmt[1] && fmt[1] <= '9')
{
unsigned m = n * 10;
+ unsigned o = n;
if (m / 10 != n
- || (n = m + (fmt[1] - '0')) < n)
+ || (n = m + (fmt[1] - '0')) < o)
error ("Format width or precision too large");
*string++ = *++fmt;
}
--- src/fns.c
+++ src/fns.c 2010-03-17 13:48:06.940163237 +0000
@@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http
#include <config.h>
+#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
--- src/font.c
+++ src/font.c 2010-03-18 09:34:23.476126798 +0000
@@ -1491,7 +1491,7 @@ font_parse_fcname (name, font)
else
{
/* KEY=VAL pairs */
- Lisp_Object key;
+ Lisp_Object key = (Lisp_Object)0;
int prop;
if (q - p == 10 && memcmp (p + 1, "pixelsize", 9) == 0)
@@ -1618,7 +1618,7 @@ font_unparse_fcname (font, pixel_size, n
{
Lisp_Object family, foundry;
Lisp_Object tail, val;
- int point_size;
+ int point_size = 0;
int i, len = 1;
char *p;
Lisp_Object styles[3];
@@ -2933,7 +2933,7 @@ font_open_entity (f, entity, pixel_size)
Lisp_Object objlist, size, val, font_object;
struct font *font;
int min_width, height;
- int scaled_pixel_size;
+ int scaled_pixel_size = 0;
font_assert (FONT_ENTITY_P (entity));
size = AREF (entity, FONT_SIZE_INDEX);
--- src/keyboard.c
+++ src/keyboard.c 2010-03-18 09:25:58.544126669 +0000
@@ -3041,7 +3041,7 @@ read_char (commandflag, nmaps, maps, pre
if (NILP (c))
{
- KBOARD *kb;
+ KBOARD *kb = (KBOARD*)0;
if (end_time)
{
@@ -4517,7 +4517,7 @@ timer_check (do_it_now)
int do_it_now;
{
EMACS_TIME nexttime;
- EMACS_TIME now, idleness_now;
+ EMACS_TIME now, idleness_now = {0,0};
Lisp_Object timers, idle_timers, chosen_timer;
struct gcpro gcpro1, gcpro2, gcpro3;
@@ -4554,7 +4554,7 @@ timer_check (do_it_now)
Lisp_Object *vector;
Lisp_Object timer = Qnil, idle_timer = Qnil;
EMACS_TIME timer_time, idle_timer_time;
- EMACS_TIME difference, timer_difference, idle_timer_difference;
+ EMACS_TIME difference, timer_difference = {0,0}, idle_timer_difference = {0,0};
/* Skip past invalid timers and timers already handled. */
if (!NILP (timers))
--- src/md5.c
+++ src/md5.c 2010-03-17 13:51:35.852626322 +0000
@@ -26,6 +26,7 @@
# include <config.h>
#endif
+#include <stdio.h>
#include <sys/types.h>
#if STDC_HEADERS || defined _LIBC
--- src/syntax.c
+++ src/syntax.c 2010-03-18 09:35:21.984126762 +0000
@@ -491,7 +491,7 @@ back_comment (from, from_byte, stop, com
EMACS_INT comment_end = from;
EMACS_INT comment_end_byte = from_byte;
EMACS_INT comstart_pos = 0;
- EMACS_INT comstart_byte;
+ EMACS_INT comstart_byte = 0;
/* Place where the containing defun starts,
or 0 if we didn't come across it yet. */
EMACS_INT defun_start = 0;
@@ -1408,7 +1408,7 @@ skip_chars (forwardp, string, lim, handl
register unsigned int c;
unsigned char fastmap[0400];
/* Store the ranges of non-ASCII characters. */
- int *char_ranges;
+ int *char_ranges = (int*)0;
int n_char_ranges = 0;
int negate = 0;
register int i, i_byte;
--- src/term.c
+++ src/term.c 2010-03-18 08:56:44.632126575 +0000
@@ -70,7 +70,6 @@ static int been_here = -1;
#if defined HAVE_TERMCAP_H && 0
#include <termcap.h>
#else
-extern void tputs P_ ((const char *, int, int (*)(int)));
extern int tgetent P_ ((char *, const char *));
extern int tgetflag P_ ((char *id));
extern int tgetnum P_ ((char *id));
--- src/unexhp9k800.c
+++ src/unexhp9k800.c 2010-03-17 13:52:28.540626294 +0000
@@ -54,6 +54,9 @@
#endif
#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#include <fcntl.h>
#include <errno.h>