msgstr ""
"Project-Id-Version: PSPP 0.4.2\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2006-07-04 09:03+0800\n"
+"POT-Creation-Date: 2006-07-04 10:49+0800\n"
"PO-Revision-Date: 2006-05-26 17:49+0800\n"
"Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
"Language-Team: German <pspp-dev@gnu.org>\n"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2006-07-04 09:03+0800\n"
+"POT-Creation-Date: 2006-07-04 10:49+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
m.category = MSG_DATA;
m.severity = MSG_ERROR;
- msg_location (&m.where);
m.text = ds_cstr (&text);
msg_emit (&m);
struct msg m;
va_list args;
- /* FIXME: we can do better about saying where the error
- occurred. */
m.category = MSG_SYNTAX;
m.severity = MSG_ERROR;
- msg_location (&m.where);
va_start (args, format);
m.text = xvasprintf (format, args);
va_end (args);
/* File locator stack. */
static const struct msg_locator **file_loc;
+
static int nfile_loc, mfile_loc;
\f
/* Close getl. */
nfile_loc--;
}
-/* Puts the current file and line number in F, or NULL and -1 if
+/* Puts the current file and line number into LOC, or NULL and -1 if
none. */
void
-msg_location (struct msg_locator *loc)
+get_msg_location (struct msg_locator *loc)
{
if (nfile_loc)
*loc = *file_loc[nfile_loc - 1];
bool getl_read_line (bool *interactive);
-void getl_location (const char **, int *);
-
const char *getl_get_prompt (enum getl_prompt_style);
void getl_set_prompt (enum getl_prompt_style, const char *);
void getl_set_prompt_style (enum getl_prompt_style);
+struct msg_locator;
+void get_msg_location (struct msg_locator *loc);
+
+
#endif /* line-buffer.h */
/* PSPP - computes sample statistics.
- Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
Written by Ben Pfaff <blp@gnu.org>.
This program is free software; you can redistribute it and/or
static char *command_name;
/* Message handler as set by msg_init(). */
-static void (*msg_handler) (const struct msg *);
+static void (*msg_handler) (const struct msg *);
+static void (*msg_location) (struct msg_locator *);
+
/* Public functions. */
m.category = msg_class_to_category (class);
m.severity = msg_class_to_severity (class);
- msg_location (&m.where);
va_start (args, format);
m.text = xvasprintf (format, args);
va_end (args);
}
void
-msg_init (void (*handler) (const struct msg *))
+msg_init ( void (*handler) (const struct msg *),
+ void (*location) (struct msg_locator *) )
{
msg_handler = handler;
+ msg_location = location;
}
void
void
msg_emit (struct msg *m)
{
+ msg_location (&m->where);
msg_handler (m);
free (m->text);
}
};
/* Initialization. */
-void msg_init (void (*handler) (const struct msg *));
+void msg_init ( void (*handler) (const struct msg *),
+ void (*location) (struct msg_locator *) ) ;
+
void msg_done (void);
struct msg * msg_dup(const struct msg *m);
const char *msg_get_command_name (void);
void msg_push_msg_locator (const struct msg_locator *);
void msg_pop_msg_locator (const struct msg_locator *);
-void msg_location (struct msg_locator *);
+
/* Used in panic situations only. */
void request_bug_report_and_abort (const char *msg);
## Process this file with automake to produce Makefile.in -*- makefile -*-
+include $(top_srcdir)/src/math/ts/automake.mk
include $(top_srcdir)/src/math/linreg/automake.mk
noinst_LIBRARIES += src/math/libpspp_math.a
-static void enqueue_msg(const struct msg *m);
+static void enqueue_msg (const struct msg *m);
static GQueue *message_queue;
+
+static void
+msg_location (struct msg_locator *loc)
+{
+ loc->file_name = NULL;
+ loc->line_number = -1;
+}
+
+
void
message_dialog_init (void)
{
message_queue = g_queue_new();
- msg_init(enqueue_msg);
+ msg_init (enqueue_msg, msg_location);
}
gtk_widget_destroy (dialog);
}
-/* FIXME: This is a stub .
- * A temporary workaround until getl.c is rearranged
- */
-void
-msg_location (struct msg_locator *loc)
-{
- loc->file_name = 0;
- loc->line_number = -1;
-}
-
void
msg_ui_init (void)
{
- msg_init (handle_msg);
+ msg_init (handle_msg, get_msg_location);
}
void
msg_done ();
}
+
/* Checks whether we've had so many errors that it's time to quit
processing this syntax file. */
void