head 1.7; access; symbols OPENPKG_E1_MP_HEAD:1.7 OPENPKG_E1_MP:1.7 OPENPKG_E1_MP_2_STABLE:1.6.2.2 OPENPKG_E1_FP:1.6.2.2 OPENPKG_2_STABLE_MP:1.6 OPENPKG_2_STABLE_20061018:1.6.2.2 OPENPKG_2_STABLE:1.6.0.2 OPENPKG_CW_FP:1.4; locks; strict; comment @# @; 1.7 date 2007.01.06.09.56.11; author rse; state Exp; branches; next 1.6; commitid bzQU1sqdUoBvKq1s; 1.6 date 2006.06.18.07.49.31; author rse; state Exp; branches 1.6.2.1; next 1.5; commitid JfUuIVg9VaGCxsBr; 1.5 date 2006.03.10.17.21.31; author rse; state Exp; branches; next 1.4; commitid gvEbxhTlj8T8VEor; 1.4 date 2005.03.01.12.22.02; author ms; state Exp; branches; next 1.3; 1.3 date 2004.12.01.18.40.42; author ms; state Exp; branches; next 1.2; 1.2 date 2004.09.09.16.41.25; author ms; state Exp; branches; next 1.1; 1.1 date 2004.07.27.19.11.17; author rse; state Exp; branches; next ; 1.6.2.1 date 2006.06.18.07.49.31; author rse; state dead; branches; next 1.6.2.2; commitid iZxwRSmmWscPXUQr; 1.6.2.2 date 2006.10.16.14.53.55; author rse; state Exp; branches; next ; commitid iZxwRSmmWscPXUQr; desc @@ 1.7 log @finally upgrade and port to libgda 2.99.x @ text @Index: backend/Makefile.in --- backend/Makefile.in.orig 2006-10-10 09:53:36 +0200 +++ backend/Makefile.in 2007-01-06 10:46:22 +0100 @@@@ -116,7 +116,7 @@@@ papyrus_backend_SOURCES = backend.c $(libpapyrus_backend_la_SOURCES) papyrus_backend_LDFLAGS = -rdynamic @@LDFLAGS@@ @@GLIB_CFLAGS@@ -papyrus_backend_LDADD = -ldl -L../common -lpapyrus_common -L../equation -lpapyrus_equation @@GLIB_LIBS@@ @@LDFLAGS@@ @@PQ_LIBS@@ @@MYSQL_LIBS@@ @@ORACLE_LIBS@@ @@LIBGDA_LIBS@@ +papyrus_backend_LDADD = -L../common -lpapyrus_common -L../equation -lpapyrus_equation @@GLIB_LIBS@@ @@LDFLAGS@@ @@PQ_LIBS@@ @@MYSQL_LIBS@@ @@ORACLE_LIBS@@ @@LIBGDA_LIBS@@ libpapyrus_binding_pg_la_SOURCES = binding_pg.c Index: backend/binding_gda.c --- backend/binding_gda.c.orig 2006-10-10 09:53:36 +0200 +++ backend/binding_gda.c 2007-01-06 10:51:45 +0100 @@@@ -27,6 +27,7 @@@@ GdaCommand *command; GdaConnection *conn = connection; GdaDataModel *dm; + GError *error; if (!conn) { errormsg("Invalid connection"); @@@@ -42,7 +43,7 @@@@ GDA_COMMAND_TYPE_SQL, GDA_COMMAND_OPTION_STOP_ON_ERRORS); - dm = gda_connection_execute_single_command(conn, command, NULL); + dm = gda_connection_execute_select_command(conn, command, NULL, &error); if (!dm) { g_error("LibGda error returning data model from SQL query"); @@@@ -130,13 +131,28 @@@@ return (q->cur_record <= (pap_query_length(query) - 1)); } +static gint OLD_gda_data_model_get_column_position(GdaDataModel *model, gchar *field) +{ + const gchar *title; + gint fieldno; + + for (fieldno = 0; fieldno < 100; fieldno++) { + title = gda_data_model_get_column_title(model, fieldno); + if (strcmp(title, field) == 0) + break; + } + if (fieldno == 100) + fieldno = 0; + return fieldno; +} + gchar * pap_query_get_value(void *query, gchar *field) { gda_query *q = query; gint fieldno; gchar *retval; - GdaValue *value; + GValue *value; if (q == NULL || q->res == NULL) { errormsg("Invalid query recordset"); @@@@ -148,13 +164,13 @@@@ return NULL; } - fieldno = gda_data_model_get_column_position(q->res, field); + fieldno = OLD_gda_data_model_get_column_position(q->res, field); if (fieldno == -1) { errormsg("Invalid field: %s in query %s", field, q->string); return NULL; } - value = (GdaValue *)gda_data_model_get_value_at(q->res, fieldno, q->cur_record); + value = (GValue *)gda_data_model_get_value_at(q->res, fieldno, q->cur_record); if (!value) { g_error("Failed to get value at row %d, col %d", q->cur_record, fieldno); return NULL; @@@@ -177,6 +193,7 @@@@ GdaConnection *conn; GdaClient *client; gchar *newconnectstr; + GError *error; client = gda_client_new(); @@@@ -187,7 +204,8 @@@@ conn = gda_client_open_connection_from_string(client, provider, newconnectstr, - GDA_CONNECTION_OPTIONS_READ_ONLY); + NULL, NULL, + GDA_CONNECTION_OPTIONS_READ_ONLY, &error); if (!GDA_IS_CONNECTION(conn)) { g_error("Could not open connection from string `%s', using provider `%s'", Index: backend/convert.c --- backend/convert.c.orig 2006-10-10 09:53:36 +0200 +++ backend/convert.c 2007-01-06 10:46:11 +0100 @@@@ -618,6 +618,9 @@@@ xmlNodePtr child; char *old, *eq_str = NULL; char *data; +#ifndef INFINITY +#define INFINITY 99999999 +#endif double retval = INFINITY; for (child = equation->children; child != NULL; child = child->next) Index: equation/lexer.l --- equation/lexer.l.orig 2006-10-10 09:53:35 +0200 +++ equation/lexer.l 2007-01-06 10:46:11 +0100 @@@@ -3,24 +3,18 @@@@ #include #include #include -#ifndef WIN32 -#include -#else -#endif #include "parser.h" -double strtod(const char *nptr, char **endptr); - %} %option noyywrap %option yylineno %% -[0-9]* { eqnlval.d = strtod (eqntext, NULL); return NUMBER; } -[0-9]*\.[0-9]+ { eqnlval.d = strtod (eqntext, NULL); return NUMBER; } -[0-9]+\.[0-9]* { eqnlval.d = strtod (eqntext, NULL); return NUMBER; } -"NaN" { eqnlval.d = NAN; return NUMBER;} +[0-9]* { eqnlval.d = (double)strtod (eqntext, NULL); return NUMBER; } +[0-9]*\.[0-9]+ { eqnlval.d = (double)strtod (eqntext, NULL); return NUMBER; } +[0-9]+\.[0-9]* { eqnlval.d = (double)strtod (eqntext, NULL); return NUMBER; } +"NaN" { eqnlval.d = __builtin_nan(""); return NUMBER;} "lt" { return '<';} "gt" { return '>';} [a-zA-Z_]+ { eqnlval.string = g_strdup (eqntext); return STRING; } Index: html/xml2html.c --- html/xml2html.c.orig 2006-10-10 09:53:36 +0200 +++ html/xml2html.c 2007-01-06 10:46:11 +0100 @@@@ -220,7 +220,8 @@@@ /* Calculate size of number. e.g. "123cm" would be 3 and "12345cm" would be 5 */ for (i = 0; i < str_size && isdigit(size[i]); i++); - num_str = strndup(size, i); + num_str = strdup(size); + num_str[i] = '\0'; for (i = 0; i < atoi(size); i++) { fputs("
", output); @@@@ -240,7 +241,8 @@@@ /* Calculate size of number. e.g. "123cm" would be 3 and "12345cm" would be 5 */ for (i = 0; i < str_size && isdigit(size[i]); i++); - num_str = strndup(size, i); + num_str = strdup(size); + num_str[i] = '\0'; for (i = 0; i < atoi(size); i++) { fputs("  ", output); @ 1.6 log @URLs have changed @ text @d2 2 a3 2 --- backend/Makefile.in.orig 2005-09-14 02:14:17 +0200 +++ backend/Makefile.in 2006-04-30 09:53:16 +0200 d14 2 a15 2 --- backend/binding_gda.c.orig 2004-03-16 04:52:22 +0100 +++ backend/binding_gda.c 2006-04-30 09:53:16 +0200 d29 1 a29 1 + dm = gda_connection_execute_single_command(conn, command, NULL, &error); d33 1 a33 1 @@@@ -130,6 +131,21 @@@@ d55 9 a63 1 @@@@ -148,7 +164,7 @@@@ d72 7 d87 1 a87 1 @@@@ -187,7 +204,7 @@@@ d92 1 d98 3 a100 3 --- backend/convert.c.orig 2005-12-21 04:29:53 +0100 +++ backend/convert.c 2006-04-30 09:53:16 +0200 @@@@ -337,6 +337,9 @@@@ d111 3 a113 3 --- equation/lexer.l.orig 2005-09-14 02:14:18 +0200 +++ equation/lexer.l 2006-04-30 09:53:16 +0200 @@@@ -3,21 +3,18 @@@@ d117 1 d119 2 d141 1 a141 1 [a-zA-Z_]+ { eqnlval.string = strdup (eqntext); return STRING; } d143 3 a145 3 --- html/xml2html.c.orig 2005-11-23 02:34:13 +0100 +++ html/xml2html.c 2006-04-30 09:53:16 +0200 @@@@ -215,7 +215,8 @@@@ d155 1 a155 1 @@@@ -235,7 +236,8 @@@@ @ 1.6.2.1 log @file papyrus.patch was added on branch OPENPKG_2_STABLE on 2006-10-16 14:53:55 +0000 @ text @d1 145 @ 1.6.2.2 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @a0 145 Index: backend/Makefile.in --- backend/Makefile.in.orig 2005-09-14 02:14:17 +0200 +++ backend/Makefile.in 2006-04-30 09:53:16 +0200 @@@@ -116,7 +116,7 @@@@ papyrus_backend_SOURCES = backend.c $(libpapyrus_backend_la_SOURCES) papyrus_backend_LDFLAGS = -rdynamic @@LDFLAGS@@ @@GLIB_CFLAGS@@ -papyrus_backend_LDADD = -ldl -L../common -lpapyrus_common -L../equation -lpapyrus_equation @@GLIB_LIBS@@ @@LDFLAGS@@ @@PQ_LIBS@@ @@MYSQL_LIBS@@ @@ORACLE_LIBS@@ @@LIBGDA_LIBS@@ +papyrus_backend_LDADD = -L../common -lpapyrus_common -L../equation -lpapyrus_equation @@GLIB_LIBS@@ @@LDFLAGS@@ @@PQ_LIBS@@ @@MYSQL_LIBS@@ @@ORACLE_LIBS@@ @@LIBGDA_LIBS@@ libpapyrus_binding_pg_la_SOURCES = binding_pg.c Index: backend/binding_gda.c --- backend/binding_gda.c.orig 2004-03-16 04:52:22 +0100 +++ backend/binding_gda.c 2006-04-30 09:53:16 +0200 @@@@ -27,6 +27,7 @@@@ GdaCommand *command; GdaConnection *conn = connection; GdaDataModel *dm; + GError *error; if (!conn) { errormsg("Invalid connection"); @@@@ -42,7 +43,7 @@@@ GDA_COMMAND_TYPE_SQL, GDA_COMMAND_OPTION_STOP_ON_ERRORS); - dm = gda_connection_execute_single_command(conn, command, NULL); + dm = gda_connection_execute_single_command(conn, command, NULL, &error); if (!dm) { g_error("LibGda error returning data model from SQL query"); @@@@ -130,6 +131,21 @@@@ return (q->cur_record <= (pap_query_length(query) - 1)); } +static gint OLD_gda_data_model_get_column_position(GdaDataModel *model, gchar *field) +{ + const gchar *title; + gint fieldno; + + for (fieldno = 0; fieldno < 100; fieldno++) { + title = gda_data_model_get_column_title(model, fieldno); + if (strcmp(title, field) == 0) + break; + } + if (fieldno == 100) + fieldno = 0; + return fieldno; +} + gchar * pap_query_get_value(void *query, gchar *field) { @@@@ -148,7 +164,7 @@@@ return NULL; } - fieldno = gda_data_model_get_column_position(q->res, field); + fieldno = OLD_gda_data_model_get_column_position(q->res, field); if (fieldno == -1) { errormsg("Invalid field: %s in query %s", field, q->string); return NULL; @@@@ -177,6 +193,7 @@@@ GdaConnection *conn; GdaClient *client; gchar *newconnectstr; + GError *error; client = gda_client_new(); @@@@ -187,7 +204,7 @@@@ conn = gda_client_open_connection_from_string(client, provider, newconnectstr, - GDA_CONNECTION_OPTIONS_READ_ONLY); + GDA_CONNECTION_OPTIONS_READ_ONLY, &error); if (!GDA_IS_CONNECTION(conn)) { g_error("Could not open connection from string `%s', using provider `%s'", Index: backend/convert.c --- backend/convert.c.orig 2005-12-21 04:29:53 +0100 +++ backend/convert.c 2006-04-30 09:53:16 +0200 @@@@ -337,6 +337,9 @@@@ xmlNodePtr child; char *old, *eq_str = NULL; char *data; +#ifndef INFINITY +#define INFINITY 99999999 +#endif double retval = INFINITY; for (child = equation->children; child != NULL; child = child->next) Index: equation/lexer.l --- equation/lexer.l.orig 2005-09-14 02:14:18 +0200 +++ equation/lexer.l 2006-04-30 09:53:16 +0200 @@@@ -3,21 +3,18 @@@@ #include #include #include -#include #include "parser.h" -double strtod(const char *nptr, char **endptr); - %} %option noyywrap %option yylineno %% -[0-9]* { eqnlval.d = strtod (eqntext, NULL); return NUMBER; } -[0-9]*\.[0-9]+ { eqnlval.d = strtod (eqntext, NULL); return NUMBER; } -[0-9]+\.[0-9]* { eqnlval.d = strtod (eqntext, NULL); return NUMBER; } -"NaN" { eqnlval.d = NAN; return NUMBER;} +[0-9]* { eqnlval.d = (double)strtod (eqntext, NULL); return NUMBER; } +[0-9]*\.[0-9]+ { eqnlval.d = (double)strtod (eqntext, NULL); return NUMBER; } +[0-9]+\.[0-9]* { eqnlval.d = (double)strtod (eqntext, NULL); return NUMBER; } +"NaN" { eqnlval.d = __builtin_nan(""); return NUMBER;} "lt" { return '<';} "gt" { return '>';} [a-zA-Z_]+ { eqnlval.string = strdup (eqntext); return STRING; } Index: html/xml2html.c --- html/xml2html.c.orig 2005-11-23 02:34:13 +0100 +++ html/xml2html.c 2006-04-30 09:53:16 +0200 @@@@ -215,7 +215,8 @@@@ /* Calculate size of number. e.g. "123cm" would be 3 and "12345cm" would be 5 */ for (i = 0; i < str_size && isdigit(size[i]); i++); - num_str = strndup(size, i); + num_str = strdup(size); + num_str[i] = '\0'; for (i = 0; i < atoi(size); i++) { fputs("
", output); @@@@ -235,7 +236,8 @@@@ /* Calculate size of number. e.g. "123cm" would be 3 and "12345cm" would be 5 */ for (i = 0; i < str_size && isdigit(size[i]); i++); - num_str = strndup(size, i); + num_str = strdup(size); + num_str[i] = '\0'; for (i = 0; i < atoi(size); i++) { fputs("  ", output); @ 1.5 log @upgrading package: papyrus 1.4.4 -> 1.6.0 @ text @d2 2 a3 2 --- backend/Makefile.in.orig 2006-03-08 08:25:17 +0100 +++ backend/Makefile.in 2006-03-10 16:14:35 +0100 d14 2 a15 2 --- backend/binding_gda.c.orig 2006-03-08 08:25:17 +0100 +++ backend/binding_gda.c 2006-03-10 16:36:27 +0100 d82 3 a84 3 --- backend/convert.c.orig 2006-03-08 08:25:17 +0100 +++ backend/convert.c 2006-03-10 16:14:23 +0100 @@@@ -617,6 +617,9 @@@@ d95 2 a96 2 --- equation/lexer.l.orig 2006-03-08 08:25:16 +0100 +++ equation/lexer.l 2006-03-10 16:14:23 +0100 d122 1 a122 1 [a-zA-Z_]+ { eqnlval.string = g_strdup (eqntext); return STRING; } d124 3 a126 3 --- html/xml2html.c.orig 2006-03-08 08:25:18 +0100 +++ html/xml2html.c 2006-03-10 16:14:23 +0100 @@@@ -220,7 +220,8 @@@@ d136 1 a136 1 @@@@ -240,7 +241,8 @@@@ a145 14 Index: latex/xml2latex.c --- latex/xml2latex.c.orig 2006-03-08 08:25:18 +0100 +++ latex/xml2latex.c 2006-03-10 18:18:45 +0100 @@@@ -4,8 +4,9 @@@@ #include #include +#include -#include +#include "debug.h" #include "xml2latex.h" #include "latex_output.h" #include "xml_funcs.h" @ 1.4 log @upgrading package: papyrus 1.4.3 -> 1.4.4 @ text @d1 70 a70 4 Index: equation/eqntest.c --- equation/eqntest.c.orig 2002-05-07 07:38:45 +0200 +++ equation/eqntest.c 2004-06-08 20:31:13 +0200 @@@@ -12,7 +12,7 @@@@ d72 22 a93 7 d = equation_evaluate (eqn); printf ("%s = %f", eqn, d); - if (lrintl (d) != answer) + if ((long int)(d) != answer) { printf (" INCORRECT\n"); return -1; d95 2 a96 2 --- equation/lexer.l.orig 2005-02-09 14:41:23 +0100 +++ equation/lexer.l 2005-03-01 13:20:03 +0100 d122 1 a122 27 [a-zA-Z_]+ { eqnlval.string = strdup (eqntext); return STRING; } Index: backend/Makefile.in --- backend/Makefile.in.orig 2004-06-08 20:40:27 +0200 +++ backend/Makefile.in 2004-06-08 20:44:47 +0200 @@@@ -176,7 +176,7 @@@@ libpapyrus_backend_la_LIBADD = papyrus_backend_SOURCES = backend.c $(libpapyrus_backend_la_SOURCES) papyrus_backend_LDFLAGS = -rdynamic @@LDFLAGS@@ @@GLIB_CFLAGS@@ -papyrus_backend_LDADD = -ldl \ +papyrus_backend_LDADD = \ -L../common -lpapyrus_common \ -L../equation -lpapyrus_equation \ @@GLIB_LIBS@@ @@LDFLAGS@@ @@PQ_LIBS@@ \ Index: backend/convert.c --- backend/convert.c.orig 2004-06-08 12:59:25 +0200 +++ backend/convert.c 2004-06-08 20:42:33 +0200 @@@@ -331,6 +331,9 @@@@ xmlNodePtr child; char *old, *eq_str = NULL; char *data; +#ifndef INFINITY +#define INFINITY 99999999 +#endif double retval = INFINITY; for (child = equation->children; child != NULL; child = child->next) d124 3 a126 3 --- html/xml2html.c.orig 2004-05-28 04:46:26 +0200 +++ html/xml2html.c 2004-06-08 20:48:36 +0200 @@@@ -215,7 +215,8 @@@@ d136 1 a136 1 @@@@ -235,7 +236,8 @@@@ d146 14 @ 1.3 log @upgrading package: papyrus 1.4.0 -> 1.4.1 @ text @d7 1 a7 1 printf ("%s = %Lf", eqn, d); d14 2 a15 2 --- equation/lexer.l.orig 2002-05-07 07:38:45 +0200 +++ equation/lexer.l 2004-06-08 20:32:13 +0200 d24 1 a24 1 -long double strtold(const char *nptr, char **endptr); d31 3 a33 3 -[0-9]* { eqnlval.d = strtold (eqntext, NULL); return NUMBER; } -[0-9]*\.[0-9]+ { eqnlval.d = strtold (eqntext, NULL); return NUMBER; } -[0-9]+\.[0-9]* { eqnlval.d = strtold (eqntext, NULL); return NUMBER; } d35 4 a38 4 +[0-9]* { eqnlval.d = (long double)strtod (eqntext, NULL); return NUMBER; } +[0-9]*\.[0-9]+ { eqnlval.d = (long double)strtod (eqntext, NULL); return NUMBER; } +[0-9]+\.[0-9]* { eqnlval.d = (long double)strtod (eqntext, NULL); return NUMBER; } +"NaN" { eqnlval.d = __builtin_nan(""); return NUMBER;} d45 1 a45 1 @@@@ -242,7 +242,7 @@@@ d47 1 d65 1 a65 1 long double retval = INFINITY; @ 1.2 log @upgrading package: papyrus 1.3.8 -> 1.3.9 @ text @d45 2 a46 2 @@@@ -176,7 +176,7 @@@@ linkchecker-%{V_linkchecker}/linkcheck/HtmlParser/htmllex.c d57 1 a57 1 @@@@ -333,6 +333,9 @@@@ @ 1.1 log @upgrading package: papyrus 1.3.7 -> 1.3.8 @ text @d45 2 a46 2 @@@@ -172,7 +172,7 @@@@ d57 1 a57 1 @@@@ -315,6 +315,9 @@@@ @