chiark / gitweb /
Add documentation for `msg'.
[mgLib] / msg.c
diff --git a/msg.c b/msg.c
index 2ff054855aa8ad1528a8b99d487ecc89551a3833..08a02851248054ef99c8b412fd5074ab2492048b 100644 (file)
--- a/msg.c
+++ b/msg.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: msg.c,v 1.2 1998/12/15 23:48:06 mdw Exp $
+ * $Id: msg.c,v 1.4 1999/04/29 20:48:13 mdw Exp $
  *
  * Display a message and get an answer
  *
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: msg.c,v $
+ * Revision 1.4  1999/04/29 20:48:13  mdw
+ * Add documentation for `msg'.
+ *
+ * Revision 1.3  1999/03/25 23:36:10  mdw
+ * Compile to nothing in absence of GTK, for the benefit of parent packages
+ * which contain non-GTK-dependent parts.
+ *
  * Revision 1.2  1998/12/15 23:48:06  mdw
  * Use `dstr_putf' for formatting, rather than `sprintf'.
  *
@@ -37,6 +44,8 @@
  *
  */
 
+#ifdef HAVE_GTK
+
 /*----- Header files ------------------------------------------------------*/
 
 #include <stdarg.h>
@@ -69,6 +78,14 @@ static int creply;
  *
  * Use:                Displays a message to the user in a nice dialogue box and
  *             returns the index of the button selected.
+ *
+ *             The @msg@ argument is a @printf@-style format string, which
+ *             contains the message to actually be shown.  The @buttons@
+ *             argument is a comma-separated list of buttons to be drawn,
+ *             from right to left.  A button name can be preceded with `:'
+ *             to indicate that it's the default, or `~' if it's the
+ *             `cancel' button.  The return value is the zero-based index
+ *             of the button selected.
  */
 
 static int close(GtkWidget *w, gpointer p)
@@ -176,3 +193,7 @@ int msg(const char *buttons, const char *msg, ...)
 }
 
 /*----- That's all, folks -------------------------------------------------*/
+
+#else
+  int mgLib_msg = 0;
+#endif