emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103633: Adapt MSDOS build according


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103633: Adapt MSDOS build according to changes in revno 103623.
Date: Sat, 12 Mar 2011 14:07:24 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103633 [merge]
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2011-03-12 14:07:24 +0200
message:
  Adapt MSDOS build according to changes in revno 103623.
  
   src/termcap.c [MSDOS]: Include "msdos.h.
   (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
   Constify `char *' arguments and their references according to
   prototypes in tparam.h.
   src/deps.mk (termcap.o): Depend on tparam.h and msdos.h.
   src/msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
   Adapt all references accordingly.
   src/msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
modified:
  src/ChangeLog
  src/deps.mk
  src/msdos.c
  src/msdos.h
  src/termcap.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-03-11 16:49:16 +0000
+++ b/src/ChangeLog     2011-03-12 12:05:05 +0000
@@ -1,3 +1,17 @@
+2011-03-12  Eli Zaretskii  <address@hidden>
+
+       * termcap.c [MSDOS]: Include "msdos.h.
+       (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
+       Constify `char *' arguments and their references according to
+       prototypes in tparam.h.
+
+       * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
+
+       * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
+       Adapt all references accordingly.
+
+       * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
+
 2011-03-11  Tom Tromey  <address@hidden>
 
        * buffer.c (syms_of_buffer): Remove obsolete comment.

=== modified file 'src/deps.mk'
--- a/src/deps.mk       2011-03-08 18:26:34 +0000
+++ b/src/deps.mk       2011-03-12 12:03:24 +0000
@@ -191,7 +191,7 @@
    cm.h frame.h disptab.h keyboard.h character.h charset.h coding.h ccl.h \
    xterm.h msdos.h window.h keymap.h blockinput.h atimer.h systime.h \
    systty.h syssignal.h tparam.h $(INTERVALS_H) buffer.h ../lib/unistd.h
-termcap.o: termcap.c lisp.h $(config_h)
+termcap.o: termcap.c lisp.h tparam.h msdos.h $(config_h)
 terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \
    keyboard.h lisp.h globals.h $(config_h) dispextern.h composite.h systime.h \
    msdos.h

=== modified file 'src/msdos.c'
--- a/src/msdos.c       2011-03-11 09:41:56 +0000
+++ b/src/msdos.c       2011-03-12 10:51:31 +0000
@@ -2999,17 +2999,17 @@
    to do.  */
 
 int
-XMenuAddPane (Display *foo, XMenu *menu, char *txt, int enable)
+XMenuAddPane (Display *foo, XMenu *menu, const char *txt, int enable)
 {
   int len;
-  char *p;
+  const char *p;
 
   if (!enable)
     abort ();
 
   IT_menu_make_room (menu);
   menu->submenu[menu->count] = IT_menu_create ();
-  menu->text[menu->count] = txt;
+  menu->text[menu->count] = (char *)txt;
   menu->panenumber[menu->count] = ++menu->panecount;
   menu->help_text[menu->count] = NULL;
   menu->count++;

=== modified file 'src/msdos.h'
--- a/src/msdos.h       2011-02-27 19:46:39 +0000
+++ b/src/msdos.h       2011-03-12 10:51:31 +0000
@@ -105,7 +105,7 @@
 } XMenu;
 
 XMenu *XMenuCreate (Display *, Window, char *);
-int XMenuAddPane (Display *, XMenu *, char *, int);
+int XMenuAddPane (Display *, XMenu *, const char *, int);
 int XMenuAddSelection (Display *, XMenu *, int, int, char *, int, char *);
 void XMenuLocate (Display *, XMenu *, int, int, int, int,
                  int *, int *, int *, int *);

=== modified file 'src/termcap.c'
--- a/src/termcap.c     2011-02-19 19:41:00 +0000
+++ b/src/termcap.c     2011-03-12 12:03:24 +0000
@@ -25,6 +25,10 @@
 #include <unistd.h>
 
 #include "lisp.h"
+#include "tparam.h"
+#ifdef MSDOS
+#include "msdos.h"
+#endif
 
 #ifndef NULL
 #define NULL (char *) 0
@@ -65,7 +69,7 @@
    0 if not found.  */
 
 static char *
-find_capability (register char *bp, register char *cap)
+find_capability (register char *bp, register const char *cap)
 {
   for (; *bp; bp++)
     if (bp[0] == ':'
@@ -76,7 +80,7 @@
 }
 
 int
-tgetnum (char *cap)
+tgetnum (const char *cap)
 {
   register char *ptr = find_capability (term_entry, cap);
   if (!ptr || ptr[-1] != '#')
@@ -85,7 +89,7 @@
 }
 
 int
-tgetflag (char *cap)
+tgetflag (const char *cap)
 {
   register char *ptr = find_capability (term_entry, cap);
   return ptr && ptr[-1] == ':';
@@ -97,7 +101,7 @@
    If AREA is null, space is allocated with `malloc'.  */
 
 char *
-tgetstr (char *cap, char **area)
+tgetstr (const char *cap, char **area)
 {
   register char *ptr = find_capability (term_entry, cap);
   if (!ptr || (ptr[-1] != '=' && ptr[-1] != '~'))
@@ -263,7 +267,7 @@
 char PC;
 
 void
-tputs (register char *str, int nlines, register int (*outfun) (/* ??? */))
+tputs (register const char *str, int nlines, int (*outfun) (int))
 {
   register int padcount = 0;
   register int speed;
@@ -355,7 +359,7 @@
    in it, and some other value otherwise.  */
 
 int
-tgetent (char *bp, char *name)
+tgetent (char *bp, const char *name)
 {
   register char *termcap_name;
   register int fd;
@@ -442,7 +446,7 @@
   buf.size = BUFSIZE;
   /* Add 1 to size to ensure room for terminating null.  */
   buf.beg = (char *) xmalloc (buf.size + 1);
-  term = indirect ? indirect : name;
+  term = indirect ? indirect : (char *)name;
 
   if (!bp)
     {


reply via email to

[Prev in Thread] Current Thread [Next in Thread]