Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: tgoto issue in zsh-5.0.0
On Thu, 16 Aug 2012 14:04:21 +0200
Thomas Klausner <tk@xxxxxxxxxx> wrote:
> zsh-5.0.0 has two prototypes for tgoto (in case they lack in the
> system headers) which do not have the same signature (except on AIX).
I suppose that's what you get for having too many header
files... presumably the older one is redundant.
Index: Src/prototypes.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/prototypes.h,v
retrieving revision 1.7
diff -p -u -r1.7 prototypes.h
--- Src/prototypes.h 3 May 2011 12:03:47 -0000 1.7
+++ Src/prototypes.h 16 Aug 2012 13:06:18 -0000
@@ -49,11 +49,18 @@ extern int tgetent _((char *bp, TC_CONST
extern int tgetnum _((char *id));
extern int tgetflag _((char *id));
extern char *tgetstr _((char *id, char **area));
-extern char *tgoto _((TC_CONST char *cm, int destcol, int destline));
extern int tputs _((TC_CONST char *cp, int affcnt, int (*outc) (int)));
#undef TC_CONST
#endif
+/*
+ * Some systems that do have termcap headers nonetheless don't
+ * declare tgoto, so we detect if that is missing separately.
+ */
+#ifdef TGOTO_PROTO_MISSING
+char *tgoto(const char *cap, int col, int row);
+#endif
+
/* MISSING PROTOTYPES FOR VARIOUS OPERATING SYSTEMS */
#if defined(__hpux) && defined(_HPUX_SOURCE) && !defined(_XPG4_EXTENDED)
Index: Src/zsh_system.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/zsh_system.h,v
retrieving revision 1.2
diff -p -u -r1.2 zsh_system.h
--- Src/zsh_system.h 21 Jun 2012 08:45:03 -0000 1.2
+++ Src/zsh_system.h 16 Aug 2012 13:06:18 -0000
@@ -874,7 +874,3 @@ extern short ospeed;
# endif
# endif
#endif
-
-#ifdef TGOTO_PROTO_MISSING
-char *tgoto(const char *cap, int col, int row);
-#endif
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
Messages sorted by:
Reverse Date,
Date,
Thread,
Author