CBL-Mariner/SPECS-EXTENDED/perl-Newt/newt-perl-1.08-xs.patch

187 строки
3.2 KiB
Diff

--- Newt-1.08/Newt.xs.exes 2006-11-15 16:18:19.000000000 +0000
+++ Newt-1.08/Newt.xs 2006-11-15 16:20:20.000000000 +0000
@@ -64,14 +64,6 @@
perl_call_sv(perl_suspend_cb, G_DISCARD | G_NOARGS);
}
-static int
-not_here(s)
-char *s;
-{
- croak("%s not implemented on this architecture", s);
- return -1;
-}
-
static double
constant(name, arg)
char *name;
@@ -94,12 +86,6 @@
case 'G':
break;
case 'H':
- if (strEQ(name, "H_NEWT"))
-#ifdef H_NEWT
- return H_NEWT;
-#else
- goto not_there;
-#endif
break;
case 'I':
break;
@@ -706,10 +692,6 @@
int arg
-void
-va_end(arg0)
- __gnuc_va_list arg0
-
int
newtInit()
@@ -720,10 +702,6 @@
newtCls()
void
-newtResizeScreen(redraw)
- int redraw
-
-void
newtWaitForKey()
void
@@ -857,11 +835,6 @@
newtRadioGetCurrent(setMember)
newtComponent setMember
-void
-newtGetScreenSize(cols, rows)
- int * cols
- int * rows
-
newtComponent
newtLabel(left, top, text)
int left
@@ -894,13 +867,11 @@
int height
int flags
-long
+SV *
newtListboxGetCurrent(co)
newtComponent co
- CODE:
- RETVAL = (long) newtListboxGetCurrent(co);
- OUTPUT:
- RETVAL
+ PPCODE:
+ XPUSHs(sv_2mortal(newSVsv((SV *)newtListboxGetCurrent(co))));
void
newtListboxSetCurrent(co, num)
@@ -927,25 +898,48 @@
newtListboxSetData(co, num, data)
newtComponent co
int num
- void * data
+ SV * data
+ PREINIT:
+ char * text;
+ void * old;
+ PPCODE:
+ newtListboxGetEntry(co, num, &text, &old);
+ if (old) SvREFCNT_dec((SV *) old);
+ newtListboxSetData(co, num, data);
+ SvREFCNT_inc(data);
int
newtListboxAppendEntry(co, text, data)
newtComponent co
char * text
SV * data
-
+ CODE:
+ RETVAL = newtListboxAppendEntry(co, text, data);
+ if (!RETVAL) SvREFCNT_inc(data);
+ OUTPUT:
+ RETVAL
+
int
newtListboxInsertEntry(co, text, data, key)
newtComponent co
char * text
SV * data
SV * key
+ CODE:
+ RETVAL = newtListboxInsertEntry(co, text, data, key);
+ if (!RETVAL) SvREFCNT_inc(data);
+ OUTPUT:
+ RETVAL
int
newtListboxDeleteEntry(co, data)
newtComponent co
SV * data
+ CODE:
+ RETVAL = newtListboxDeleteEntry(co, data);
+ if (!RETVAL) SvREFCNT_dec(data);
+ OUTPUT:
+ RETVAL
void
@@ -979,8 +973,8 @@
void
newtListboxSelectItem(co, key, sense)
newtComponent co
- void * key
- int sense
+ SV * key
+ enum newtFlagsSense sense
newtComponent
newtCheckboxTree(left, top, height, flags)
@@ -1094,9 +1088,14 @@
newtFormSetSize(co)
newtComponent co
-newtComponent
+void
newtFormGetCurrent(co)
newtComponent co
+ PREINIT:
+ SV sv; /* joe: do I need this? just copying newtFormRun */
+ PPCODE:
+ XPUSHs(sv_2mortal(sv_setref_pv(newSViv(0), "newtComponent",
+ (void*)newtFormGetCurrent(co))));
void
newtFormSetBackground(co, color)
@@ -1313,12 +1312,6 @@
int recurse
newtGrid
-newtButtonBarv(button1, b1comp, args)
- char * button1
- newtComponent * b1comp
- va_list args
-
-newtGrid
newtButtonBar(button1, b1comp, ...)
char * button1
newtComponent * b1comp
@@ -1329,13 +1322,6 @@
char * buttonText
char * text
-void
-newtWinMessagev(title, buttonText, text, argv)
- char * title
- char * buttonText
- char * text
- va_list argv
-
int
newtWinChoice(title, button1, button2, text, ...)
char * title