Exemplo n.º 1
0
/*! \brief Load gschem configuration files and display error dialogs.
 * \par Function Description
 * Loads configuration files in a similar manner to g_rc_parse().
 * Instead of exiting on error, display error dialogs with explanatory
 * messages.
 *
 * \param w_current  The current #GSCHEM_TOPLEVEL structure.
 * \param rcfile     Specific config file path, or NULL.
 */
void
x_rc_parse_gschem (GSCHEM_TOPLEVEL *w_current, const gchar *rcfile) {
  TOPLEVEL *toplevel = w_current->toplevel;
  g_rc_parse_handler (toplevel, "gschemrc", rcfile,
                      (ConfigParseErrorFunc) x_rc_parse_gschem_error,
                      (void *) w_current);
}
Exemplo n.º 2
0
/*! \brief General RC file parsing function.
 * \par Function Description
 * Calls g_rc_parse_handler() with the default error handler. If any
 * error other than ENOENT occurs while parsing a configuration file,
 * prints an informative message and calls exit(1).
 *
 * \bug libgeda shouldn't call exit() - this function calls
 *      g_rc_parse__process_error(), which does.
 *
 * \warning Since this function may not return, it should only be used
 * on application startup or when there is no chance of data loss from
 * an unexpected exit().
 *
 * \param [in] toplevel  The current #TOPLEVEL structure.
 * \param [in] pname     The name of the application (usually argv[0]).
 * \param [in] rcname    Config file basename, or NULL.
 * \param [in] rcfile    Specific config file path, or NULL.
 */
void
g_rc_parse (TOPLEVEL *toplevel, const gchar *pname,
            const gchar *rcname, const gchar *rcfile)
{
  g_rc_parse_handler (toplevel, rcname, rcfile,
                      (ConfigParseErrorFunc) g_rc_parse__process_error,
                      (void *) pname);
}
Exemplo n.º 3
0
/*! \brief Load gschem configuration files and display error dialogs.
 * \par Function Description
 * Loads configuration files in a similar manner to g_rc_parse().
 * Instead of exiting on error, display error dialogs with explanatory
 * messages.
 *
 * \param w_current  The current #GschemToplevel structure.
 * \param rcfile     Specific config file path, or NULL.
 */
void
x_rc_parse_gschem (TOPLEVEL *toplevel, const gchar *rcfile) {
  return g_rc_parse_handler (toplevel, "gschemrc", rcfile,
                      (ConfigParseErrorFunc) x_rc_parse_gschem_error,
                      (void *) toplevel);
}