mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
PL_na doesn't exist in Perl 5.004, don't use it.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1479 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
9cc1675e1d
commit
0701f53e63
@ -5,6 +5,7 @@ void
|
|||||||
theme_register(formats)
|
theme_register(formats)
|
||||||
SV *formats
|
SV *formats
|
||||||
PREINIT:
|
PREINIT:
|
||||||
|
STRLEN n_a;
|
||||||
AV *av;
|
AV *av;
|
||||||
FORMAT_REC *formatrecs;
|
FORMAT_REC *formatrecs;
|
||||||
char *key, *value;
|
char *key, *value;
|
||||||
@ -23,8 +24,8 @@ CODE:
|
|||||||
formatrecs[0].def = g_strdup("Perl script");
|
formatrecs[0].def = g_strdup("Perl script");
|
||||||
|
|
||||||
for (fpos = 1, n = 0; n < len; n++, fpos++) {
|
for (fpos = 1, n = 0; n < len; n++, fpos++) {
|
||||||
key = SvPV(*av_fetch(av, n, 0), PL_na); n++;
|
key = SvPV(*av_fetch(av, n, 0), n_a); n++;
|
||||||
value = SvPV(*av_fetch(av, n, 0), PL_na);
|
value = SvPV(*av_fetch(av, n, 0), n_a);
|
||||||
|
|
||||||
formatrecs[fpos].tag = g_strdup(key);
|
formatrecs[fpos].tag = g_strdup(key);
|
||||||
formatrecs[fpos].def = g_strdup(value);
|
formatrecs[fpos].def = g_strdup(value);
|
||||||
@ -38,6 +39,7 @@ printformat(level, format, ...)
|
|||||||
int level
|
int level
|
||||||
char *format
|
char *format
|
||||||
PREINIT:
|
PREINIT:
|
||||||
|
STRLEN n_a;
|
||||||
TEXT_DEST_REC dest;
|
TEXT_DEST_REC dest;
|
||||||
char *arglist[MAX_FORMAT_PARAMS];
|
char *arglist[MAX_FORMAT_PARAMS];
|
||||||
int n;
|
int n;
|
||||||
@ -45,7 +47,7 @@ CODE:
|
|||||||
format_create_dest(&dest, NULL, NULL, level, NULL);
|
format_create_dest(&dest, NULL, NULL, level, NULL);
|
||||||
memset(arglist, 0, sizeof(arglist));
|
memset(arglist, 0, sizeof(arglist));
|
||||||
for (n = 2; n < 2+MAX_FORMAT_PARAMS; n++) {
|
for (n = 2; n < 2+MAX_FORMAT_PARAMS; n++) {
|
||||||
arglist[n-2] = n < items ? SvPV(ST(n), PL_na) : "";
|
arglist[n-2] = n < items ? SvPV(ST(n), n_a) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
printformat_perl(&dest, format, arglist);
|
printformat_perl(&dest, format, arglist);
|
||||||
@ -61,6 +63,7 @@ printformat(server, target, level, format, ...)
|
|||||||
int level
|
int level
|
||||||
char *format
|
char *format
|
||||||
PREINIT:
|
PREINIT:
|
||||||
|
STRLEN n_a;
|
||||||
TEXT_DEST_REC dest;
|
TEXT_DEST_REC dest;
|
||||||
char *arglist[MAX_FORMAT_PARAMS];
|
char *arglist[MAX_FORMAT_PARAMS];
|
||||||
int n;
|
int n;
|
||||||
@ -68,7 +71,7 @@ CODE:
|
|||||||
format_create_dest(&dest, server, target, level, NULL);
|
format_create_dest(&dest, server, target, level, NULL);
|
||||||
memset(arglist, 0, sizeof(arglist));
|
memset(arglist, 0, sizeof(arglist));
|
||||||
for (n = 4; n < 4+MAX_FORMAT_PARAMS; n++) {
|
for (n = 4; n < 4+MAX_FORMAT_PARAMS; n++) {
|
||||||
arglist[n-4] = n < items ? SvPV(ST(n), PL_na) : "";
|
arglist[n-4] = n < items ? SvPV(ST(n), n_a) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
printformat_perl(&dest, format, arglist);
|
printformat_perl(&dest, format, arglist);
|
||||||
@ -83,6 +86,7 @@ printformat(window, level, format, ...)
|
|||||||
int level
|
int level
|
||||||
char *format
|
char *format
|
||||||
PREINIT:
|
PREINIT:
|
||||||
|
STRLEN n_a;
|
||||||
TEXT_DEST_REC dest;
|
TEXT_DEST_REC dest;
|
||||||
char *arglist[MAX_FORMAT_PARAMS];
|
char *arglist[MAX_FORMAT_PARAMS];
|
||||||
int n;
|
int n;
|
||||||
@ -90,7 +94,7 @@ CODE:
|
|||||||
format_create_dest(&dest, NULL, NULL, level, window);
|
format_create_dest(&dest, NULL, NULL, level, window);
|
||||||
memset(arglist, 0, sizeof(arglist));
|
memset(arglist, 0, sizeof(arglist));
|
||||||
for (n = 3; n < 3+MAX_FORMAT_PARAMS; n++) {
|
for (n = 3; n < 3+MAX_FORMAT_PARAMS; n++) {
|
||||||
arglist[n-3] = n < items ? SvPV(ST(n), PL_na) : "";
|
arglist[n-3] = n < items ? SvPV(ST(n), n_a) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
printformat_perl(&dest, format, arglist);
|
printformat_perl(&dest, format, arglist);
|
||||||
@ -105,6 +109,7 @@ printformat(item, level, format, ...)
|
|||||||
int level
|
int level
|
||||||
char *format
|
char *format
|
||||||
PREINIT:
|
PREINIT:
|
||||||
|
STRLEN n_a;
|
||||||
TEXT_DEST_REC dest;
|
TEXT_DEST_REC dest;
|
||||||
char *arglist[MAX_FORMAT_PARAMS];
|
char *arglist[MAX_FORMAT_PARAMS];
|
||||||
int n;
|
int n;
|
||||||
@ -112,7 +117,7 @@ CODE:
|
|||||||
format_create_dest(&dest, item->server, item->name, level, NULL);
|
format_create_dest(&dest, item->server, item->name, level, NULL);
|
||||||
memset(arglist, 0, sizeof(arglist));
|
memset(arglist, 0, sizeof(arglist));
|
||||||
for (n = 3; n < 3+MAX_FORMAT_PARAMS; n++) {
|
for (n = 3; n < 3+MAX_FORMAT_PARAMS; n++) {
|
||||||
arglist[n-3] = n < items ? SvPV(ST(n), PL_na) : "";
|
arglist[n-3] = n < items ? SvPV(ST(n), n_a) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
printformat_perl(&dest, format, arglist);
|
printformat_perl(&dest, format, arglist);
|
||||||
|
Loading…
Reference in New Issue
Block a user