Author: Thibaut Paumard <paumard@users.sourceforge.net>
Bug-Debian: http://bugs.debian.org/506334
Forwarded: yes
Last-Update: 2010-03-07
Description: use the actual curses.h file rather than second-guessing it

--- yorick-curses-0.1.orig/Makefile
+++ yorick-curses-0.1/Makefile
@@ -1,8 +1,8 @@
-Y_MAKEDIR=/Users/frigaut/yorick-2.1/Darwin-Power_Macintosh
-Y_EXE=/Users/frigaut/yorick-2.1/Darwin-Power_Macintosh/bin/yorick
+Y_MAKEDIR=/usr/lib/yorick
+Y_EXE=/usr/lib/yorick/bin/yorick
 Y_EXE_PKGS=
-Y_EXE_HOME=/Users/frigaut/yorick-2.1/Darwin-Power_Macintosh
-Y_EXE_SITE=/Users/frigaut/yorick-2.1
+Y_EXE_HOME=/usr/lib/yorick
+Y_EXE_SITE=/usr/lib/yorick
 
 # ----------------------------------------------------- optimization flags
 
@@ -14,7 +14,7 @@ TGT=$(DEFAULT_TGT)
 PKG_NAME=curses
 PKG_I=curses.i
 
-OBJS=curses.o
+OBJS=curses.o ywrap_static.o
 
 # change to give the executable a name other than yorick
 PKG_EXENAME=yorick
--- yorick-curses-0.1.orig/curses.i
+++ yorick-curses-0.1/curses.i
@@ -47,179 +47,179 @@ if (strmatch(get_env("TERM"),"emacs")) \
 plug_in, "curses";
 
 extern kbdinit;
-/* PROTOTYPE
+/* xPROTOTYPE
    void kbdinit(void)
 */
 extern kbd;
-/* PROTOTYPE
+/* xPROTOTYPE
    int kbd(int wait)
 */
 extern kbdend;
-/* PROTOTYPE
+/* xPROTOTYPE
    void kbdend(void)
 */
 extern cgetch;
-/* PROTOTYPE
+/* xPROTOTYPE
    int getch(void)
 */
 extern cinitscr;
-/* PROTOTYPE
-   int initscr(void)
+/* xPROTOTYPE
+   long initscr(void)
 */
 extern cendwin;
-/* PROTOTYPE
+/* xPROTOTYPE
    int endwin(void)
 */
 extern cisendwin;
-/* PROTOTYPE
+/* xPROTOTYPE
    int isendwin(void)
 */
 extern ccbreak;
-/* PROTOTYPE
+/* xPROTOTYPE
    int cbreak(void)
 */
 extern cnocbreak;
-/* PROTOTYPE
+/* xPROTOTYPE
    int nocbreak(void)
 */
 extern chalfdelay;
-/* PROTOTYPE
+/* xPROTOTYPE
    int halfdelay(int tenths)
 */
 extern craw;
-/* PROTOTYPE
+/* xPROTOTYPE
    int raw(void)
 */
 extern cnoraw;
-/* PROTOTYPE
+/* xPROTOTYPE
    int noraw(void)
 */
 extern ctimeout;
-/* PROTOTYPE
+/* xPROTOTYPE
    void timeout(int delay)
 */
 extern cnl;
-/* PROTOTYPE
+/* xPROTOTYPE
    int nl(void)
 */
 extern cnonl;
-/* PROTOTYPE
+/* xPROTOTYPE
    int nonl(void)
 */
 extern cprintw;
-/* PROTOTYPE
+/* xPROTOTYPE
    int printw(string fmt, string str)
 */
 extern cmvprintw;
-/* PROTOTYPE
+/* xPROTOTYPE
    int mvprintw(int y, int x, string fmt, string str)
 */
 extern crefresh;
-/* PROTOTYPE
+/* xPROTOTYPE
    int refresh(void)
 */
 extern caddch;
-/* PROTOTYPE
+/* xPROTOTYPE
    int addch(char ch)
 */
 extern cmvaddch;
-/* PROTOTYPE
+/* xPROTOTYPE
    int mvaddch(int y, int x, char ch)
 */
 extern cerase;
-/* PROTOTYPE
+/* xPROTOTYPE
    int erase(void)
 */
 extern cclear;
-/* PROTOTYPE
+/* xPROTOTYPE
    int clear(void)
 */
 extern cclrtobot;
-/* PROTOTYPE
+/* xPROTOTYPE
    int clrtobot(void)
 */
 extern cclrtoeol;
-/* PROTOTYPE
+/* xPROTOTYPE
    int clrtoeol(void)
 */
 extern cbkgdset;
-/* PROTOTYPE
-   int bkgdset(char ch)
+/* xPROTOTYPE
+   void bkgdset(char ch)
 */
 extern cgetlines;
-/* PROTOTYPE
+/* xPROTOTYPE
    int getlines(void)
 */
 extern cgetcols;
-/* PROTOTYPE
+/* xPROTOTYPE
    int getcols(void)
 */
 extern ccurs_set;
-/* PROTOTYPE
+/* xPROTOTYPE
   int curs_set(int visibility)
 */
 extern ccurs_move;
-/* PROTOTYPE
+/* xPROTOTYPE
   int move(int y, int x)
 */
 extern cbeep;
-/* PROTOTYPE
+/* xPROTOTYPE
    int beep(void)
 */
 extern cflash;
-/* PROTOTYPE
+/* xPROTOTYPE
    int flash(void)
 */
 extern cecho;
-/* PROTOTYPE
+/* xPROTOTYPE
    int echo(void)
 */
 extern cnoecho;
-/* PROTOTYPE
+/* xPROTOTYPE
    int noecho(void)
 */
 extern cgetstr;
-/* PROTOTYPE
+/* xPROTOTYPE
    int getstr(string str);
 */
 extern cmvgetstr;
-/* PROTOTYPE
+/* xPROTOTYPE
    int mvgetstr(int y, int x, string str);
 */
 extern cnodelay;
-/* PROTOTYPE
+/* xPROTOTYPE
    int ynodelay(int condition)
 */
 extern cnotimeout;
-/* PROTOTYPE
+/* xPROTOTYPE
    int ynotimeout(int condition)
 */
 extern ckeypad;
-/* PROTOTYPE
+/* xPROTOTYPE
    int ykeypad(int condition)
 */
 extern cmeta;
-/* PROTOTYPE
+/* xPROTOTYPE
    int ymeta(int condition)
 */
 extern cintrflush;
-/* PROTOTYPE
+/* xPROTOTYPE
    int yintrflush(int condition)
 */
 extern cscrollok;
-/* PROTOTYPE
+/* xPROTOTYPE
    int yscrollok(int condition)
 */
 extern cleaveok;
-/* PROTOTYPE
+/* xPROTOTYPE
    int yleaveok(int condition)
 */
 extern cclearok;
-/* PROTOTYPE
+/* xPROTOTYPE
    int yclearok(int condition)
 */
 extern cidlok;
-/* PROTOTYPE
+/* xPROTOTYPE
    int yidlok(int condition)
 */
 
--- /dev/null
+++ yorick-curses-0.1/ywrap_static.c
@@ -0,0 +1,449 @@
+/* codger-generated yorick package wrapper file */
+#include "play.h"
+#include "ydata.h"
+#include <curses.h>
+
+/*----------------begin curses.i */
+//extern BuiltIn Y_kbdinit;
+
+//extern void kbdinit(void );
+void
+Y_kbdinit(int n)
+{
+  if (n!=0) YError("kbdinit takes exactly 0 arguments");
+  kbdinit();
+}
+
+//extern BuiltIn Y_kbd;
+
+//extern int kbd(int );
+void
+Y_kbd(int n)
+{
+  if (n!=1) YError("kbd takes exactly 1 arguments");
+  PushIntValue(kbd(yarg_si(0)));
+}
+
+//extern BuiltIn Y_kbdend;
+
+//extern void kbdend(void );
+void
+Y_kbdend(int n)
+{
+  if (n!=0) YError("kbdend takes exactly 0 arguments");
+  kbdend();
+}
+
+//extern BuiltIn Y_cgetch;
+
+//extern int getch(void );
+void
+Y_cgetch(int n)
+{
+  if (n>1) YError("cgetch takes void argument");
+  PushIntValue(getch());
+}
+
+//extern BuiltIn Y_cinitscr;
+
+//extern long initscr(void );
+void
+Y_cinitscr(int n)
+{
+  if (n>1) YError("cinitscr takes void argument");
+  PushLongValue((long)initscr());
+}
+
+//extern BuiltIn Y_cendwin;
+
+//extern int endwin(void );
+void
+Y_cendwin(int n)
+{
+  if (n>1) YError("cendwin takes void argument");
+  PushIntValue(endwin());
+}
+
+//extern BuiltIn Y_cisendwin;
+
+//extern int isendwin(void );
+void
+Y_cisendwin(int n)
+{
+  if (n>1) YError("cisendwin takes void argument");
+  PushIntValue(isendwin());
+}
+
+//extern BuiltIn Y_ccbreak;
+
+//extern int cbreak(void );
+void
+Y_ccbreak(int n)
+{
+  if (n>1) YError("ccbreak takes void argument");
+  PushIntValue(cbreak());
+}
+
+//extern BuiltIn Y_cnocbreak;
+
+//extern int nocbreak(void );
+void
+Y_cnocbreak(int n)
+{
+  if (n>1) YError("cnocbreak takes void argument");
+  PushIntValue(nocbreak());
+}
+
+//extern BuiltIn Y_chalfdelay;
+
+//extern int halfdelay(int );
+void
+Y_chalfdelay(int n)
+{
+  if (n!=1) YError("chalfdelay takes exactly 1 arguments");
+  PushIntValue(halfdelay(yarg_si(0)));
+}
+
+//extern BuiltIn Y_craw;
+
+//extern int raw(void );
+void
+Y_craw(int n)
+{
+  if (n>1) YError("craw takes void argument");
+  PushIntValue(raw());
+}
+
+//extern BuiltIn Y_cnoraw;
+
+//extern int noraw(void );
+void
+Y_cnoraw(int n)
+{
+  if (n>1) YError("cnoraw takes void argument");
+  PushIntValue(noraw());
+}
+
+//extern BuiltIn Y_ctimeout;
+
+//extern void timeout(int );
+void
+Y_ctimeout(int n)
+{
+  if (n!=1) YError("ctimeout takes exactly 1 arguments");
+  timeout(yarg_si(0));
+}
+
+//extern BuiltIn Y_cnl;
+
+//extern int nl(void );
+void
+Y_cnl(int n)
+{
+  if (n>1) YError("cnl takes void argument");
+  PushIntValue(nl());
+}
+
+//extern BuiltIn Y_cnonl;
+
+//extern int nonl(void );
+void
+Y_cnonl(int n)
+{
+  if (n>1) YError("cnonl takes void argument");
+  PushIntValue(nonl());
+}
+
+//extern BuiltIn Y_cprintw;
+
+//extern int printw(char *, char *);
+void
+Y_cprintw(int n)
+{
+  if (n!=2) YError("cprintw takes exactly 2 arguments");
+  PushIntValue(printw(yarg_sq(1), yarg_sq(0)));
+}
+
+//extern BuiltIn Y_cmvprintw;
+
+//extern int mvprintw(int , int , char *, char *);
+void
+Y_cmvprintw(int n)
+{
+  if (n!=4) YError("cmvprintw takes exactly 4 arguments");
+  PushIntValue(mvprintw(yarg_si(3), yarg_si(2), yarg_sq(1), 
+    yarg_sq(0)));
+}
+
+//extern BuiltIn Y_crefresh;
+
+//extern int refresh(void );
+void
+Y_crefresh(int n)
+{
+  if (n>1) YError("crefresh takes void argument");
+  PushIntValue(refresh());
+}
+
+//extern BuiltIn Y_caddch;
+
+//extern int addch(char );
+void
+Y_caddch(int n)
+{
+  if (n!=1) YError("caddch takes exactly 1 arguments");
+  PushIntValue(addch(yarg_sc(0)));
+}
+
+//extern BuiltIn Y_cmvaddch;
+
+//extern int mvaddch(int , int , char );
+void
+Y_cmvaddch(int n)
+{
+  if (n!=3) YError("cmvaddch takes exactly 3 arguments");
+  PushIntValue(mvaddch(yarg_si(2), yarg_si(1), yarg_sc(0)));
+}
+
+//extern BuiltIn Y_cerase;
+
+//extern int erase(void );
+void
+Y_cerase(int n)
+{
+  if (n>1) YError("cerase takes void argument");
+  PushIntValue(erase());
+}
+
+//extern BuiltIn Y_cclear;
+
+//extern int clear(void );
+void
+Y_cclear(int n)
+{
+  if (n>1) YError("cclear takes void argument");
+  PushIntValue(clear());
+}
+
+//extern BuiltIn Y_cclrtobot;
+
+//extern int clrtobot(void );
+void
+Y_cclrtobot(int n)
+{
+  if (n>1) YError("cclrtobot takes void argument");
+  PushIntValue(clrtobot());
+}
+
+//extern BuiltIn Y_cclrtoeol;
+
+//extern int clrtoeol(void );
+void
+Y_cclrtoeol(int n)
+{
+  if (n>1) YError("cclrtoeol takes void argument");
+  PushIntValue(clrtoeol());
+}
+
+//extern BuiltIn Y_cbkgdset;
+
+//extern void bkgdset(char );
+void
+Y_cbkgdset(int n)
+{
+  if (n!=1) YError("cbkgdset takes exactly 1 arguments");
+  bkgdset(yarg_sc(0));
+}
+
+//extern BuiltIn Y_cgetlines;
+
+//extern int getlines(void );
+void
+Y_cgetlines(int n)
+{
+  if (n>1) YError("cgetlines takes void argument");
+  PushIntValue(getlines());
+}
+
+//extern BuiltIn Y_cgetcols;
+
+//extern int getcols(void );
+void
+Y_cgetcols(int n)
+{
+  if (n>1) YError("cgetcols takes void argument");
+  PushIntValue(getcols());
+}
+
+//extern BuiltIn Y_ccurs_set;
+
+//extern int curs_set(int );
+void
+Y_ccurs_set(int n)
+{
+  if (n!=1) YError("ccurs_set takes exactly 1 arguments");
+  PushIntValue(curs_set(yarg_si(0)));
+}
+
+//extern BuiltIn Y_ccurs_move;
+
+//extern int move(int , int );
+void
+Y_ccurs_move(int n)
+{
+  if (n!=2) YError("ccurs_move takes exactly 2 arguments");
+  PushIntValue(move(yarg_si(1), yarg_si(0)));
+}
+
+//extern BuiltIn Y_cbeep;
+
+//extern int beep(void );
+void
+Y_cbeep(int n)
+{
+  if (n>1) YError("cbeep takes void argument");
+  PushIntValue(beep());
+}
+
+//extern BuiltIn Y_cflash;
+
+//extern int flash(void );
+void
+Y_cflash(int n)
+{
+  if (n>1) YError("cflash takes void argument");
+  PushIntValue(flash());
+}
+
+//extern BuiltIn Y_cecho;
+
+//extern int echo(void );
+void
+Y_cecho(int n)
+{
+  if (n>1) YError("cecho takes void argument");
+  PushIntValue(echo());
+}
+
+//extern BuiltIn Y_cnoecho;
+
+//extern int noecho(void );
+void
+Y_cnoecho(int n)
+{
+  if (n>1) YError("cnoecho takes void argument");
+  PushIntValue(noecho());
+}
+
+//extern BuiltIn Y_cgetstr;
+
+//extern int getstr(char *);
+void
+Y_cgetstr(int n)
+{
+  if (n!=1) YError("cgetstr takes exactly 1 arguments");
+  PushIntValue(getstr(yarg_sq(0)));
+}
+
+//extern BuiltIn Y_cmvgetstr;
+
+//extern int mvgetstr(int , int , char *);
+void
+Y_cmvgetstr(int n)
+{
+  if (n!=3) YError("cmvgetstr takes exactly 3 arguments");
+  PushIntValue(mvgetstr(yarg_si(2), yarg_si(1), yarg_sq(0)));
+}
+
+//extern BuiltIn Y_cnodelay;
+
+//extern int ynodelay(int );
+void
+Y_cnodelay(int n)
+{
+  if (n!=1) YError("cnodelay takes exactly 1 arguments");
+  PushIntValue(ynodelay(yarg_si(0)));
+}
+
+//extern BuiltIn Y_cnotimeout;
+
+//extern int ynotimeout(int );
+void
+Y_cnotimeout(int n)
+{
+  if (n!=1) YError("cnotimeout takes exactly 1 arguments");
+  PushIntValue(ynotimeout(yarg_si(0)));
+}
+
+//extern BuiltIn Y_ckeypad;
+
+//extern int ykeypad(int );
+void
+Y_ckeypad(int n)
+{
+  if (n!=1) YError("ckeypad takes exactly 1 arguments");
+  PushIntValue(ykeypad(yarg_si(0)));
+}
+
+//extern BuiltIn Y_cmeta;
+
+//extern int ymeta(int );
+void
+Y_cmeta(int n)
+{
+  if (n!=1) YError("cmeta takes exactly 1 arguments");
+  PushIntValue(ymeta(yarg_si(0)));
+}
+
+//extern BuiltIn Y_cintrflush;
+
+//extern int yintrflush(int );
+void
+Y_cintrflush(int n)
+{
+  if (n!=1) YError("cintrflush takes exactly 1 arguments");
+  PushIntValue(yintrflush(yarg_si(0)));
+}
+
+//extern BuiltIn Y_cscrollok;
+
+//extern int yscrollok(int );
+void
+Y_cscrollok(int n)
+{
+  if (n!=1) YError("cscrollok takes exactly 1 arguments");
+  PushIntValue(yscrollok(yarg_si(0)));
+}
+
+//extern BuiltIn Y_cleaveok;
+
+//extern int yleaveok(int );
+void
+Y_cleaveok(int n)
+{
+  if (n!=1) YError("cleaveok takes exactly 1 arguments");
+  PushIntValue(yleaveok(yarg_si(0)));
+}
+
+//extern BuiltIn Y_cclearok;
+
+//extern int yclearok(int );
+void
+Y_cclearok(int n)
+{
+  if (n!=1) YError("cclearok takes exactly 1 arguments");
+  PushIntValue(yclearok(yarg_si(0)));
+}
+
+//extern BuiltIn Y_cidlok;
+
+//extern int yidlok(int );
+void
+Y_cidlok(int n)
+{
+  if (n!=1) YError("cidlok takes exactly 1 arguments");
+  PushIntValue(yidlok(yarg_si(0)));
+}
+
+
+/*----------------list include files */
