[gnumeric] Namespace



commit 07c591e1168ac6a4fca76460790f04bd226cd22a
Author: Morten Welinder <terra gnome org>
Date:   Mon Mar 2 12:59:22 2015 -0500

    Namespace

 src/auto-format.c                    |    2 +-
 src/auto-format.h                    |    2 +-
 src/command-context-stderr.c         |   29 ++---
 src/command-context-stderr.h         |   16 +-
 src/commands.c                       |   14 +-
 src/commands.h                       |    2 +-
 src/complete-sheet.c                 |   14 +-
 src/complete-sheet.h                 |   16 +--
 src/complete.c                       |   10 +-
 src/complete.h                       |   12 +-
 src/consolidate.c                    |   18 ++--
 src/consolidate.h                    |   14 +-
 src/dialogs/dialog-autoformat.c      |   32 +++---
 src/dialogs/dialog-consolidate.c     |   18 ++--
 src/dialogs/dialog-function-select.c |    2 +-
 src/expr.c                           |    4 +-
 src/expr.h                           |    4 +-
 src/file-autoft.c                    |   89 +++++++------
 src/file-autoft.h                    |    8 +-
 src/format-template.c                |  238 +++++++++++++++++-----------------
 src/format-template.h                |   46 ++++----
 src/gnumeric-fwd.h                   |    2 +-
 src/graph.c                          |    4 +-
 src/gui-clipboard.c                  |    2 +-
 src/libgnumeric.c                    |    8 +-
 src/main-application.c               |    4 +-
 src/ssconvert.c                      |    2 +-
 src/ssdiff.c                         |    2 +-
 src/ssgrep.c                         |    2 +-
 src/ssindex.c                        |    2 +-
 src/sstest.c                         |    2 +-
 src/test-pango.c                     |    2 +-
 src/wbc-gtk-edit.c                   |    4 +-
 src/workbook-view.c                  |    2 +-
 34 files changed, 312 insertions(+), 316 deletions(-)
---
diff --git a/src/auto-format.c b/src/auto-format.c
index 04f5a40..87d5087 100644
--- a/src/auto-format.c
+++ b/src/auto-format.c
@@ -242,7 +242,7 @@ do_af_suggest_list (int argc, GnmExprConstPtr const *argv,
 GNM_BEGIN_KILL_SWITCH_WARNING
 
 GOFormat const *
-auto_style_format_suggest (GnmExprTop const *texpr, GnmEvalPos const *epos)
+gnm_auto_style_format_suggest (GnmExprTop const *texpr, GnmEvalPos const *epos)
 {
        GOFormat const *explicit = NULL;
 
diff --git a/src/auto-format.h b/src/auto-format.h
index 139b6fc..ca51d15 100644
--- a/src/auto-format.h
+++ b/src/auto-format.h
@@ -6,7 +6,7 @@
 
 G_BEGIN_DECLS
 
-GOFormat const *auto_style_format_suggest (GnmExprTop const *texpr,
+GOFormat const *gnm_auto_style_format_suggest (GnmExprTop const *texpr,
                                           GnmEvalPos const *epos);
 
 G_END_DECLS
diff --git a/src/command-context-stderr.c b/src/command-context-stderr.c
index d9dcc54..0d4af65 100644
--- a/src/command-context-stderr.c
+++ b/src/command-context-stderr.c
@@ -15,40 +15,37 @@
 #include <goffice/goffice.h>
 #include "ranges.h"
 
-struct _CmdContextStderr {
+struct GnmCmdContextStderr_ {
        GObject  base;
        int      status;
 };
-typedef GObjectClass CmdContextStderrClass;
-
-#define COMMAND_CONTEXT_STDERR_CLASS(k) \
-       (G_TYPE_CHECK_CLASS_CAST ((k), CMD_CONTEXT_STDERR_TYPE, CmdContextStderrClass))
+typedef GObjectClass GnmCmdContextStderrClass;
 
 /**
- * cmd_context_stderr_new:
+ * gnm_cmd_context_stderr_new:
  *
  * Returns: (transfer full): the newly allocated #GOCmdContext.
  **/
 GOCmdContext *
-cmd_context_stderr_new (void)
+gnm_cmd_context_stderr_new (void)
 {
-       return g_object_new (CMD_CONTEXT_STDERR_TYPE, NULL);
+       return g_object_new (GNM_CMD_CONTEXT_STDERR_TYPE, NULL);
 }
 
 void
-cmd_context_stderr_set_status (CmdContextStderr *ccs, int status)
+gnm_cmd_context_stderr_set_status (GnmCmdContextStderr *ccs, int status)
 {
        g_return_if_fail (ccs != NULL);
-       g_return_if_fail (GNM_IS_COMMAND_CONTEXT_STDERR (ccs));
+       g_return_if_fail (GNM_IS_CMD_CONTEXT_STDERR (ccs));
 
        ccs->status = status;
 }
 
 int
-cmd_context_stderr_get_status (CmdContextStderr *ccs)
+gnm_cmd_context_stderr_get_status (GnmCmdContextStderr *ccs)
 {
        g_return_val_if_fail (ccs != NULL, -1);
-       g_return_val_if_fail (GNM_IS_COMMAND_CONTEXT_STDERR (ccs), -1);
+       g_return_val_if_fail (GNM_IS_CMD_CONTEXT_STDERR (ccs), -1);
 
        return ccs->status;
 }
@@ -56,7 +53,7 @@ cmd_context_stderr_get_status (CmdContextStderr *ccs)
 static void
 ccs_error_error (GOCmdContext *cc, GError *error)
 {
-       CmdContextStderr *ccs = COMMAND_CONTEXT_STDERR (cc);
+       GnmCmdContextStderr *ccs = GNM_CMD_CONTEXT_STDERR (cc);
 
        g_printerr ("Error: %s\n", error->message);
        ccs->status = -1;
@@ -64,7 +61,7 @@ ccs_error_error (GOCmdContext *cc, GError *error)
 static void
 ccs_error_info (GOCmdContext *cc, GOErrorInfo *error)
 {
-       CmdContextStderr *ccs = COMMAND_CONTEXT_STDERR (cc);
+       GnmCmdContextStderr *ccs = GNM_CMD_CONTEXT_STDERR (cc);
 
        go_error_info_print (error);
        ccs->status = -1;
@@ -93,7 +90,7 @@ ccs_progress_message_set (GOCmdContext *cc, gchar const *msg)
 }
 
 static void
-ccs_init (CmdContextStderr *ccs)
+ccs_init (GnmCmdContextStderr *ccs)
 {
        ccs->status = 0;
 }
@@ -109,7 +106,7 @@ ccs_gnm_cmd_context_init (GOCmdContextClass *cc_class)
        cc_class->error.error_info      = ccs_error_info;
 }
 
-GSF_CLASS_FULL (CmdContextStderr, cmd_context_stderr,
+GSF_CLASS_FULL (GnmCmdContextStderr, gnm_cmd_context_stderr,
                NULL, NULL, NULL, NULL,
                ccs_init, G_TYPE_OBJECT, 0,
                GSF_INTERFACE (ccs_gnm_cmd_context_init, GO_TYPE_CMD_CONTEXT))
diff --git a/src/command-context-stderr.h b/src/command-context-stderr.h
index 5b48e6e..5486cf6 100644
--- a/src/command-context-stderr.h
+++ b/src/command-context-stderr.h
@@ -7,16 +7,16 @@
 
 G_BEGIN_DECLS
 
-#define CMD_CONTEXT_STDERR_TYPE                (cmd_context_stderr_get_type ())
-#define COMMAND_CONTEXT_STDERR(o)      (G_TYPE_CHECK_INSTANCE_CAST ((o), CMD_CONTEXT_STDERR_TYPE, 
CmdContextStderr))
-#define GNM_IS_COMMAND_CONTEXT_STDERR(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), CMD_CONTEXT_STDERR_TYPE))
+#define GNM_CMD_CONTEXT_STDERR_TYPE            (gnm_cmd_context_stderr_get_type ())
+#define GNM_CMD_CONTEXT_STDERR(o)      (G_TYPE_CHECK_INSTANCE_CAST ((o), GNM_CMD_CONTEXT_STDERR_TYPE, 
GnmCmdContextStderr))
+#define GNM_IS_CMD_CONTEXT_STDERR(o)   (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNM_CMD_CONTEXT_STDERR_TYPE))
 
-typedef struct _CmdContextStderr CmdContextStderr;
+typedef struct GnmCmdContextStderr_ GnmCmdContextStderr;
 
-GType          cmd_context_stderr_get_type   (void);
-GOCmdContext  *cmd_context_stderr_new        (void);
-void           cmd_context_stderr_set_status (CmdContextStderr *ccs, int status);
-int            cmd_context_stderr_get_status (CmdContextStderr *ccs);
+GType          gnm_cmd_context_stderr_get_type   (void);
+GOCmdContext  *gnm_cmd_context_stderr_new            (void);
+void           gnm_cmd_context_stderr_set_status (GnmCmdContextStderr *ccs, int status);
+int            gnm_cmd_context_stderr_get_status (GnmCmdContextStderr *ccs);
 
 G_END_DECLS
 
diff --git a/src/commands.c b/src/commands.c
index be1e9b2..d0d756f 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -884,7 +884,7 @@ cmd_set_text_full (WorkbookControl *wbc, GSList *selection, GnmEvalPos *ep,
                text = g_strdup_printf (_("Inserting expression in %s"), name);
 
                if (go_format_is_general (format)) {
-                       sf = auto_style_format_suggest (texpr, ep);
+                       sf = gnm_auto_style_format_suggest (texpr, ep);
                        if (sf != NULL) {
                                new_style = gnm_style_new ();
                                gnm_style_set_format (new_style, sf);
@@ -3619,14 +3619,14 @@ typedef struct {
        GSList         *selection;   /* Selections on the sheet */
        GSList         *old_styles;  /* Older styles, one style_list per selection range*/
 
-       GnmFormatTemplate *ft;    /* Template that has been applied */
+       GnmFT *ft;    /* Template that has been applied */
 } CmdAutoFormat;
 
 static void
 cmd_autoformat_repeat (GnmCommand const *cmd, WorkbookControl *wbc)
 {
        CmdAutoFormat const *orig = (CmdAutoFormat const *) cmd;
-       cmd_selection_autoformat (wbc, format_template_clone (orig->ft));
+       cmd_selection_autoformat (wbc, gnm_ft_clone (orig->ft));
 }
 MAKE_GNM_COMMAND (CmdAutoFormat, cmd_autoformat, cmd_autoformat_repeat)
 
@@ -3668,7 +3668,7 @@ cmd_autoformat_redo (GnmCommand *cmd,
 
        g_return_val_if_fail (me != NULL, TRUE);
 
-       format_template_apply_to_sheet_regions (me->ft,
+       gnm_ft_apply_to_sheet_regions (me->ft,
                me->cmd.sheet, me->selection);
 
        return FALSE;
@@ -3697,7 +3697,7 @@ cmd_autoformat_finalize (GObject *cmd)
        range_fragment_free (me->selection);
        me->selection = NULL;
 
-       format_template_free (me->ft);
+       gnm_ft_free (me->ft);
 
        gnm_command_finalize (cmd);
 }
@@ -3710,7 +3710,7 @@ cmd_autoformat_finalize (GObject *cmd)
  * Return value: TRUE if there was a problem
  **/
 gboolean
-cmd_selection_autoformat (WorkbookControl *wbc, GnmFormatTemplate *ft)
+cmd_selection_autoformat (WorkbookControl *wbc, GnmFT *ft)
 {
        CmdAutoFormat *me;
        char      *names;
@@ -3724,7 +3724,7 @@ cmd_selection_autoformat (WorkbookControl *wbc, GnmFormatTemplate *ft)
        me->cmd.sheet = sv_sheet (sv);
        me->cmd.size = 1;  /* FIXME?  */
 
-       if (!format_template_check_valid (ft, me->selection, GO_CMD_CONTEXT (wbc))) {
+       if (!gnm_ft_check_valid (ft, me->selection, GO_CMD_CONTEXT (wbc))) {
                g_object_unref (me);
                return TRUE;
        }
diff --git a/src/commands.h b/src/commands.h
index 85ae076..d5c3569 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -95,7 +95,7 @@ gboolean cmd_selection_outline_change (WorkbookControl *wbc,
                                         gboolean is_cols, int index, int depth);
 gboolean cmd_selection_group           (WorkbookControl *wbc,
                                         gboolean is_cols, gboolean group);
-gboolean cmd_selection_autoformat      (WorkbookControl *wbc, GnmFormatTemplate *ft);
+gboolean cmd_selection_autoformat      (WorkbookControl *wbc, GnmFT *ft);
 gboolean cmd_selection_hyperlink       (WorkbookControl *wbc,
                                         GnmStyle *style,
                                         char const *opt_translated_name,
diff --git a/src/complete-sheet.c b/src/complete-sheet.c
index 935010a..9ac19e7 100644
--- a/src/complete-sheet.c
+++ b/src/complete-sheet.c
@@ -56,7 +56,7 @@ search_strategy_next (GnmCompleteSheet *cs)
 static void
 complete_sheet_finalize (GObject *object)
 {
-       GnmCompleteSheet *cs = COMPLETE_SHEET (object);
+       GnmCompleteSheet *cs = GNM_COMPLETE_SHEET (object);
        g_free (cs->current_text);
        parent_class->finalize (object);
 }
@@ -83,7 +83,7 @@ text_matches (GnmCompleteSheet const *cs)
 static gboolean
 complete_sheet_search_iteration (GnmComplete *complete)
 {
-       GnmCompleteSheet *cs = COMPLETE_SHEET (complete);
+       GnmCompleteSheet *cs = GNM_COMPLETE_SHEET (complete);
        int i;
 
        if ((int)strlen (complete->text) <
@@ -115,7 +115,7 @@ complete_sheet_class_init (GObjectClass *object_class)
 }
 
 /**
- * complete_sheet_new:
+ * gnm_complete_sheet_new:
  * @sheet: #Sheet
  * @col: column
  * @row: row
@@ -125,15 +125,15 @@ complete_sheet_class_init (GObjectClass *object_class)
  * Returns: (transfer full): the new #GnmComplete.
  **/
 GnmComplete *
-complete_sheet_new (Sheet *sheet, int col, int row, GnmCompleteMatchNotifyFn notify, void *notify_closure)
+gnm_complete_sheet_new (Sheet *sheet, int col, int row, GnmCompleteMatchNotifyFn notify, void 
*notify_closure)
 {
        /*
         * Somehow every time I pronounce this, I feel like something is not quite right.
         */
        GnmCompleteSheet *cs;
 
-       cs = g_object_new (COMPLETE_SHEET_TYPE, NULL);
-       complete_construct (GNM_COMPLETE (cs), notify, notify_closure);
+       cs = g_object_new (GNM_COMPLETE_SHEET_TYPE, NULL);
+       gnm_complete_construct (GNM_COMPLETE (cs), notify, notify_closure);
 
        cs->sheet = sheet;
        cs->entry.col = col;
@@ -144,5 +144,5 @@ complete_sheet_new (Sheet *sheet, int col, int row, GnmCompleteMatchNotifyFn not
        return GNM_COMPLETE (cs);
 }
 
-GSF_CLASS (GnmCompleteSheet, complete_sheet,
+GSF_CLASS (GnmCompleteSheet, gnm_complete_sheet,
           complete_sheet_class_init, NULL, PARENT_TYPE)
diff --git a/src/complete-sheet.h b/src/complete-sheet.h
index 0229ba1..f017271 100644
--- a/src/complete-sheet.h
+++ b/src/complete-sheet.h
@@ -7,11 +7,9 @@
 
 G_BEGIN_DECLS
 
-#define COMPLETE_SHEET_TYPE        (complete_sheet_get_type ())
-#define COMPLETE_SHEET(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), COMPLETE_SHEET_TYPE, GnmCompleteSheet))
-#define COMPLETE_SHEET_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST((k), COMPLETE_SHEET_TYPE, GnmCompleteSheetClass))
-#define GNM_IS_COMPLETE_SHEET(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), COMPLETE_SHEET_TYPE))
-#define IS_COMPLETE_SHEET_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), COMPLETE_SHEET_TYPE))
+#define GNM_COMPLETE_SHEET_TYPE        (gnm_complete_sheet_get_type ())
+#define GNM_COMPLETE_SHEET(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), GNM_COMPLETE_SHEET_TYPE, 
GnmCompleteSheet))
+#define GNM_IS_COMPLETE_SHEET(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNM_COMPLETE_SHEET_TYPE))
 
 typedef struct {
        GnmComplete parent;
@@ -31,10 +29,10 @@ typedef struct {
        GnmCompleteClass parent_class;
 } GnmCompleteSheetClass;
 
-GType     complete_sheet_get_type (void);
-GnmComplete *complete_sheet_new   (Sheet *sheet, int col, int row,
-                                  GnmCompleteMatchNotifyFn notify,
-                                  void *notify_closure);
+GType     gnm_complete_sheet_get_type (void);
+GnmComplete *gnm_complete_sheet_new   (Sheet *sheet, int col, int row,
+                                      GnmCompleteMatchNotifyFn notify,
+                                      void *notify_closure);
 
 G_END_DECLS
 
diff --git a/src/complete.c b/src/complete.c
index cb3301b..6e840f9 100644
--- a/src/complete.c
+++ b/src/complete.c
@@ -31,13 +31,13 @@
 #define ACC(o) (GNM_COMPLETE_CLASS (G_OBJECT_GET_CLASS (o)))
 
 /**
- * complete_construct:
+ * gnm_complete_construct:
  * @complete: #GnmComplete
  * @notify: (scope async): #GnmCompleteMatchNotifyFn
  * @notify_closure: user data
  **/
 void
-complete_construct (GnmComplete *complete,
+gnm_complete_construct (GnmComplete *complete,
                    GnmCompleteMatchNotifyFn notify,
                    void *notify_closure)
 {
@@ -79,7 +79,7 @@ complete_idle (gpointer data)
 }
 
 void
-complete_start (GnmComplete *complete, char const *text)
+gnm_complete_start (GnmComplete *complete, char const *text)
 {
        g_return_if_fail (complete != NULL);
        g_return_if_fail (GNM_IS_COMPLETE (complete));
@@ -112,5 +112,5 @@ complete_class_init (GObjectClass *object_class)
        complete_class->search_iteration = default_search_iteration;
 }
 
-GSF_CLASS (GnmComplete, complete,
-          &complete_class_init, NULL, PARENT_TYPE)
+GSF_CLASS (GnmComplete, gnm_complete,
+          complete_class_init, NULL, PARENT_TYPE)
diff --git a/src/complete.h b/src/complete.h
index b6d1a72..0196d2e 100644
--- a/src/complete.h
+++ b/src/complete.h
@@ -7,7 +7,7 @@
 
 G_BEGIN_DECLS
 
-#define GNM_COMPLETE_TYPE        (complete_get_type ())
+#define GNM_COMPLETE_TYPE        (gnm_complete_get_type ())
 #define GNM_COMPLETE(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), GNM_COMPLETE_TYPE, GnmComplete))
 #define GNM_COMPLETE_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST ((k), GNM_COMPLETE_TYPE, GnmCompleteClass))
 #define GNM_IS_COMPLETE(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNM_COMPLETE_TYPE))
@@ -32,11 +32,11 @@ typedef struct {
        gboolean (*search_iteration) (GnmComplete *complete);
 } GnmCompleteClass;
 
-void  complete_construct (GnmComplete *complete,
-                         GnmCompleteMatchNotifyFn notify,
-                         void *notify_closure);
-void  complete_start     (GnmComplete *complete, char const *text);
-GType complete_get_type  (void);
+void  gnm_complete_construct (GnmComplete *complete,
+                             GnmCompleteMatchNotifyFn notify,
+                             void *notify_closure);
+void  gnm_complete_start     (GnmComplete *complete, char const *text);
+GType gnm_complete_get_type  (void);
 
 G_END_DECLS
 
diff --git a/src/consolidate.c b/src/consolidate.c
index c95849b..9566cee 100644
--- a/src/consolidate.c
+++ b/src/consolidate.c
@@ -101,7 +101,7 @@ cb_value_compare (GnmValue const *a, GnmValue const *b)
 /**********************************************************************************/
 
 GnmConsolidate *
-consolidate_new (void)
+gnm_consolidate_new (void)
 {
        GnmConsolidate *cs;
 
@@ -115,7 +115,7 @@ consolidate_new (void)
 }
 
 void
-consolidate_free (GnmConsolidate *cs, gboolean content_only)
+gnm_consolidate_free (GnmConsolidate *cs, gboolean content_only)
 {
        GSList *l;
 
@@ -149,7 +149,7 @@ gnm_consolidate_unref (GnmConsolidate *cs)
 {
        cs->ref_count--;
        if (cs->ref_count == 0)
-               consolidate_free (cs, TRUE);
+               gnm_consolidate_free (cs, TRUE);
 }
 
 GType
@@ -166,7 +166,7 @@ gnm_consolidate_get_type (void)
 }
 
 void
-consolidate_set_function (GnmConsolidate *cs, GnmFunc *fd)
+gnm_consolidate_set_function (GnmConsolidate *cs, GnmFunc *fd)
 {
        g_return_if_fail (cs != NULL);
        g_return_if_fail (fd != NULL);
@@ -179,7 +179,7 @@ consolidate_set_function (GnmConsolidate *cs, GnmFunc *fd)
 }
 
 void
-consolidate_set_mode (GnmConsolidate *cs, GnmConsolidateMode mode)
+gnm_consolidate_set_mode (GnmConsolidate *cs, GnmConsolidateMode mode)
 {
        g_return_if_fail (cs != NULL);
 
@@ -187,7 +187,7 @@ consolidate_set_mode (GnmConsolidate *cs, GnmConsolidateMode mode)
 }
 
 gboolean
-consolidate_check_destination (GnmConsolidate *cs, data_analysis_output_t *dao)
+gnm_consolidate_check_destination (GnmConsolidate *cs, data_analysis_output_t *dao)
 {
        GnmSheetRange *new;
        GnmRange r;
@@ -218,7 +218,7 @@ consolidate_check_destination (GnmConsolidate *cs, data_analysis_output_t *dao)
 }
 
 gboolean
-consolidate_add_source (GnmConsolidate *cs, GnmValue *range)
+gnm_consolidate_add_source (GnmConsolidate *cs, GnmValue *range)
 {
        GnmSheetRange *new;
 
@@ -776,7 +776,7 @@ consolidate_apply (GnmConsolidate *cs,
 
 
 gboolean
-tool_consolidate_engine (G_GNUC_UNUSED GOCmdContext *gcc, data_analysis_output_t *dao, gpointer specs,
+gnm_tool_consolidate_engine (G_GNUC_UNUSED GOCmdContext *gcc, data_analysis_output_t *dao, gpointer specs,
                         analysis_tool_engine_t selector, gpointer result)
 {
        GnmConsolidate *cs = specs;
@@ -817,7 +817,7 @@ tool_consolidate_engine (G_GNUC_UNUSED GOCmdContext *gcc, data_analysis_output_t
                return FALSE;
        }
        case TOOL_ENGINE_CLEAN_UP:
-               consolidate_free (cs, TRUE);
+               gnm_consolidate_free (cs, TRUE);
                return FALSE;
        case TOOL_ENGINE_LAST_VALIDITY_CHECK:
                return FALSE;
diff --git a/src/consolidate.h b/src/consolidate.h
index 0e35b5e..b8469dd 100644
--- a/src/consolidate.h
+++ b/src/consolidate.h
@@ -43,18 +43,18 @@ struct _GnmConsolidate {
 };
 
 GType        gnm_consolidate_get_type (void);
-GnmConsolidate *consolidate_new  (void);
-void         consolidate_free (GnmConsolidate *cs, gboolean content_only);
+GnmConsolidate *gnm_consolidate_new  (void);
+void         gnm_consolidate_free (GnmConsolidate *cs, gboolean content_only);
 
-void         consolidate_set_function    (GnmConsolidate *cs, GnmFunc *fd);
-void         consolidate_set_mode        (GnmConsolidate *cs,
+void         gnm_consolidate_set_function    (GnmConsolidate *cs, GnmFunc *fd);
+void         gnm_consolidate_set_mode        (GnmConsolidate *cs,
                                          GnmConsolidateMode mode);
 
-gboolean     consolidate_add_source      (GnmConsolidate *cs, GnmValue *range);
-gboolean     consolidate_check_destination (GnmConsolidate *cs,
+gboolean     gnm_consolidate_add_source      (GnmConsolidate *cs, GnmValue *range);
+gboolean     gnm_consolidate_check_destination (GnmConsolidate *cs,
                                            data_analysis_output_t *dao);
 
-gboolean tool_consolidate_engine (GOCmdContext *gcc, data_analysis_output_t *dao, gpointer specs,
+gboolean gnm_tool_consolidate_engine (GOCmdContext *gcc, data_analysis_output_t *dao, gpointer specs,
                             analysis_tool_engine_t selector, gpointer result);
 
 G_END_DECLS
diff --git a/src/dialogs/dialog-autoformat.c b/src/dialogs/dialog-autoformat.c
index 70fd1d3..106b0b8 100644
--- a/src/dialogs/dialog-autoformat.c
+++ b/src/dialogs/dialog-autoformat.c
@@ -80,11 +80,11 @@ typedef struct {
        WBCGtk *wbcg;
        GocItem            *grid[NUM_PREVIEWS];              /* Previewgrid's */
        GocItem            *selrect;                         /* Selection rectangle */
-       GSList             *templates;                       /* List of GnmFormatTemplate's */
-       GnmFormatTemplate  *selected_template;               /* The currently selected template */
+       GSList             *templates;                       /* List of GnmFT's */
+       GnmFT  *selected_template;               /* The currently selected template */
        GList              *category_groups;                 /* List of groups of categories */
 
-       FormatTemplateCategoryGroup *current_category_group; /* Currently selected category group */
+       GnmFTCategoryGroup *current_category_group; /* Currently selected category group */
 
        int               preview_top;       /* Top index of the previewlist */
        int               preview_index;     /* Selected canvas in previewlist */
@@ -122,7 +122,7 @@ typedef struct {
 
 typedef struct {
        GnmPreviewGrid base;
-       GnmFormatTemplate *ft;
+       GnmFT *ft;
 } AutoFormatGrid;
 typedef GnmPreviewGridClass AutoFormatGridClass;
 
@@ -132,7 +132,7 @@ afg_get_cell_style (GnmPreviewGrid *pg, int col, int row)
        /* If this happens to be NULL the default style
         * will automatically be used. */
        AutoFormatGrid *ag = (AutoFormatGrid *) pg;
-       return format_template_get_style (ag->ft, row, col);
+       return gnm_ft_get_style (ag->ft, row, col);
 }
 
 static GnmValue *
@@ -165,7 +165,7 @@ static GSF_CLASS (AutoFormatGrid, auto_format_grid,
                  gnm_preview_grid_get_type())
 
 static GocItem *
-auto_format_grid_new (AutoFormatState *state, int i, GnmFormatTemplate *ft)
+auto_format_grid_new (AutoFormatState *state, int i, GnmFT *ft)
 {
        GocItem *item = goc_item_new (
                goc_canvas_get_root (state->canvas[i]),
@@ -191,7 +191,7 @@ templates_free (AutoFormatState *state)
        g_return_if_fail (state != NULL);
 
        for (ptr = state->templates; ptr != NULL ; ptr = ptr->next)
-               format_template_free (ptr->data);
+               gnm_ft_free (ptr->data);
        g_slist_free (state->templates);
        state->templates = NULL;
 }
@@ -216,10 +216,10 @@ templates_load (AutoFormatState *state)
        if (state->category_groups == NULL)
                return FALSE;
 
-       state->templates = category_group_get_templates_list (
+       state->templates = gnm_ft_category_group_get_templates_list (
                state->current_category_group, GO_CMD_CONTEXT (state->wbcg));
        for (l = state->templates; l != NULL; l = l->next) {
-               GnmFormatTemplate *ft = l->data;
+               GnmFT *ft = l->data;
                range_init (&ft->dimension,
                        0, 0, PREVIEW_COLS - 1, PREVIEW_ROWS - 1);
                ft->invalidate_hash = TRUE;
@@ -312,7 +312,7 @@ previews_load (AutoFormatState *state, int topindex)
                        gtk_widget_hide (GTK_WIDGET (state->canvas[i]));
                        gtk_frame_set_shadow_type (state->frame[i], GTK_SHADOW_NONE);
                } else {
-                       GnmFormatTemplate *ft = start->data;
+                       GnmFT *ft = start->data;
 
                        state->grid[i] = auto_format_grid_new (state, i, ft);
 
@@ -362,7 +362,7 @@ cb_ok_clicked (G_GNUC_UNUSED GtkButton *button,
 {
        if (state->selected_template)
                cmd_selection_autoformat (GNM_WBC (state->wbcg),
-                       format_template_clone (state->selected_template));
+                       gnm_ft_clone (state->selected_template));
 
        gtk_widget_destroy (GTK_WIDGET (state->dialog));
 }
@@ -371,7 +371,7 @@ static void
 cb_autoformat_destroy (AutoFormatState *state)
 {
        templates_free (state);
-       category_group_list_free (state->category_groups);
+       gnm_ft_category_group_list_free (state->category_groups);
        g_free (state);
 }
 
@@ -387,7 +387,7 @@ cb_canvas_button_press (GocCanvas *canvas,
                        G_GNUC_UNUSED GdkEventButton *event,
                        AutoFormatState *state)
 {
-       GnmFormatTemplate *ft;
+       GnmFT *ft;
        GSList *ptr;
        int index = 0;
 
@@ -427,7 +427,7 @@ cb_check_item_toggled (G_GNUC_UNUSED GtkCheckMenuItem *item,
        int i;
 
        for (ptr = state->templates; ptr != NULL ; ptr = ptr->next) {
-               GnmFormatTemplate *ft = ptr->data;
+               GnmFT *ft = ptr->data;
 
                ft->number    = gtk_check_menu_item_get_active (state->number);
                ft->border    = gtk_check_menu_item_get_active (state->border);
@@ -601,7 +601,7 @@ dialog_autoformat (WBCGtk *wbcg)
 
        /* Fill category list */
        state->category_groups =
-               g_list_sort (category_group_list_get (),  category_group_cmp);
+               g_list_sort (gnm_ft_category_group_list_get (),  gnm_ft_category_group_cmp);
 
        if (state->category_groups == NULL) {
                GtkWidget *dialog;
@@ -626,7 +626,7 @@ dialog_autoformat (WBCGtk *wbcg)
                                                NULL);
 
                for (i = 0 ; ptr != NULL ; ptr = ptr->next, i++) {
-                       FormatTemplateCategoryGroup *group = ptr->data;
+                       GnmFTCategoryGroup *group = ptr->data;
                        if (!strcmp (group->name,   "General" ))
                                select = i;
                        gtk_list_store_append (store, &iter);
diff --git a/src/dialogs/dialog-consolidate.c b/src/dialogs/dialog-consolidate.c
index 0445da2..b013be7 100644
--- a/src/dialogs/dialog-consolidate.c
+++ b/src/dialogs/dialog-consolidate.c
@@ -132,7 +132,7 @@ adjust_source_areas (ConsolidateState *state)
 static GnmConsolidate *
 construct_consolidate (ConsolidateState *state, data_analysis_output_t  *dao)
 {
-       GnmConsolidate      *cs   = consolidate_new ();
+       GnmConsolidate      *cs   = gnm_consolidate_new ();
        GnmConsolidateMode  mode = 0;
        char       const *func;
        GnmValue         *range_value;
@@ -155,7 +155,7 @@ construct_consolidate (ConsolidateState *state, data_analysis_output_t  *dao)
                g_warning ("Unknown function index!");
        }
 
-       consolidate_set_function (cs, gnm_func_lookup (func, NULL));
+       gnm_consolidate_set_function (cs, gnm_func_lookup (func, NULL));
 
        if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->labels_row)))
                mode |= CONSOLIDATE_COL_LABELS;
@@ -167,7 +167,7 @@ construct_consolidate (ConsolidateState *state, data_analysis_output_t  *dao)
        if (!dao_put_formulas (dao))
                mode |= CONSOLIDATE_PUT_VALUES;
 
-       consolidate_set_mode (cs, mode);
+       gnm_consolidate_set_mode (cs, mode);
 
        g_return_val_if_fail (gtk_tree_model_iter_n_children
                              (state->source_areas,
@@ -192,16 +192,16 @@ construct_consolidate (ConsolidateState *state, data_analysis_output_t  *dao)
                                          "does not define a region"),
                                        source);
                                g_free (source);
-                               consolidate_free (cs, FALSE);
+                               gnm_consolidate_free (cs, FALSE);
                                return NULL;
                        }
-                       if (!consolidate_add_source (cs, range_value)) {
+                       if (!gnm_consolidate_add_source (cs, range_value)) {
                                state->construct_error = g_strdup_printf (
                                        _("Source region %s overlaps "
                                          "with the destination region"),
                                        source);
                                g_free (source);
-                               consolidate_free (cs, FALSE);
+                               gnm_consolidate_free (cs, FALSE);
                                return NULL;
                        }
                }
@@ -311,10 +311,10 @@ cb_consolidate_ok_clicked (GtkWidget *button, ConsolidateState *state)
                return;
        }
 
-       if (consolidate_check_destination (cs, dao)) {
+       if (gnm_consolidate_check_destination (cs, dao)) {
                if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg),
                                        state->base.sheet,
-                                       dao, cs, tool_consolidate_engine,
+                                       dao, cs, gnm_tool_consolidate_engine,
                                        FALSE) &&
                    (button == state->base.ok_button))
                        gtk_widget_destroy (state->base.dialog);
@@ -325,7 +325,7 @@ cb_consolidate_ok_clicked (GtkWidget *button, ConsolidateState *state)
                                          _("The output range overlaps "
                                            "with the input ranges."));
                g_free (dao);
-               consolidate_free (cs, FALSE);
+               gnm_consolidate_free (cs, FALSE);
        }
 }
 
diff --git a/src/dialogs/dialog-function-select.c b/src/dialogs/dialog-function-select.c
index cc206ab..95a71aa 100644
--- a/src/dialogs/dialog-function-select.c
+++ b/src/dialogs/dialog-function-select.c
@@ -662,7 +662,7 @@ make_expr_example (Sheet *sheet, const char *text, gboolean localized)
                char *etxt = gnm_expr_top_as_string (texpr, &pp, convs);
                GnmValue *val = gnm_expr_top_eval
                        (texpr, &ep, GNM_EXPR_EVAL_PERMIT_NON_SCALAR);
-               GOFormat const *format = auto_style_format_suggest (texpr, &ep);
+               GOFormat const *format = gnm_auto_style_format_suggest (texpr, &ep);
                char *vtxt = format_value (format, val, -1,
                                           workbook_date_conv
                                           (sheet->workbook));
diff --git a/src/expr.c b/src/expr.c
index 86a5d6e..a470818 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -3382,7 +3382,7 @@ typedef union {
 #endif
 
 void
-expr_init (void)
+_gnm_expr_init (void)
 {
 #if 0
        GnmExpr e;
@@ -3432,7 +3432,7 @@ cb_expression_pool_leak (gpointer data, G_GNUC_UNUSED gpointer user)
 #endif
 
 void
-expr_shutdown (void)
+_gnm_expr_shutdown (void)
 {
 #if USE_EXPR_POOLS
        go_mem_chunk_foreach_leak (expression_pool_small, cb_expression_pool_leak, NULL);
diff --git a/src/expr.h b/src/expr.h
index 57370ba..8a9c217 100644
--- a/src/expr.h
+++ b/src/expr.h
@@ -220,8 +220,8 @@ void              gnm_expr_sharer_report (GnmExprSharer *es);
 
 /*****************************************************************************/
 
-void expr_init (void);
-void expr_shutdown (void);
+void _gnm_expr_init (void);
+void _gnm_expr_shutdown (void);
 
 G_END_DECLS
 
diff --git a/src/file-autoft.c b/src/file-autoft.c
index 44d2a26..7d90254 100644
--- a/src/file-autoft.c
+++ b/src/file-autoft.c
@@ -40,9 +40,9 @@
 #define CXML2C(s) ((char const *)(s))
 
 static gint
-category_compare_name_and_dir (gconstpointer a, gconstpointer b)
+gnm_ft_category_compare_name_and_dir (gconstpointer a, gconstpointer b)
 {
-       FormatTemplateCategory const *cat_a = a, *cat_b = b;
+       GnmFTCategory const *cat_a = a, *cat_b = b;
        int res;
 
        res = strcmp (cat_a->name, cat_b->name);
@@ -50,7 +50,7 @@ category_compare_name_and_dir (gconstpointer a, gconstpointer b)
 }
 
 static void
-category_free (FormatTemplateCategory *category)
+gnm_ft_category_free (GnmFTCategory *category)
 {
        g_free (category->directory);
        g_free (category->name);
@@ -59,8 +59,8 @@ category_free (FormatTemplateCategory *category)
 }
 
 static GSList *
-category_get_templates_list (FormatTemplateCategory *category,
-                            GOCmdContext *cc)
+gnm_ft_category_get_templates_list (GnmFTCategory *category,
+                                   GOCmdContext *cc)
 {
        GSList *templates = NULL;
        GDir *dir;
@@ -79,10 +79,10 @@ category_get_templates_list (FormatTemplateCategory *category,
                name_len = strlen (d_name);
                if (name_len > 4 && strcmp (d_name + name_len - 4, ".xml") == 0) {
                        gchar *full_entry_name;
-                       GnmFormatTemplate *ft;
+                       GnmFT *ft;
 
                        full_entry_name = g_build_filename (category->directory, d_name, NULL);
-                       ft = format_template_new_from_file (full_entry_name, cc);
+                       ft = gnm_ft_new_from_file (full_entry_name, cc);
                        if (ft == NULL) {
                                g_warning (_("Invalid template file: %s"), full_entry_name);
                        } else {
@@ -95,20 +95,20 @@ category_get_templates_list (FormatTemplateCategory *category,
 
        g_dir_close (dir);
 
-       return g_slist_sort (templates, format_template_compare_name);
+       return g_slist_sort (templates, gnm_ft_compare_name);
 }
 
 /**
- * gnumeric_xml_read_format_template_category :
- * Open an XML file and read a FormatTemplateCategory
+ * gnm_ft_xml_read_category :
+ * Open an XML file and read a GnmFTCategory
  */
-static FormatTemplateCategory *
-gnumeric_xml_read_format_template_category (char const *dir_name)
+static GnmFTCategory *
+gnm_ft_xml_read_category (char const *dir_name)
 {
        gchar *file_name;
        xmlDocPtr doc;
        xmlNodePtr node;
-       FormatTemplateCategory *category = NULL;
+       GnmFTCategory *category = NULL;
 
        g_return_val_if_fail (dir_name != NULL, NULL);
 
@@ -121,7 +121,7 @@ gnumeric_xml_read_format_template_category (char const *dir_name)
                xmlChar *name = xmlGetProp (node, (xmlChar *)"name");
                if (name != NULL) {
                        xmlChar *description = xmlGetProp (node, (xmlChar *)"description");
-                       category = g_new (FormatTemplateCategory, 1);
+                       category = g_new (GnmFTCategory, 1);
                        category->directory = g_strdup (dir_name);
                        category->name = g_strdup ((gchar *)name);
                        category->description = g_strdup ((gchar *)description);
@@ -136,8 +136,9 @@ gnumeric_xml_read_format_template_category (char const *dir_name)
 
        return category;
 }
+
 static GList *
-category_list_get_from_dir_list (GSList *dir_list)
+gnm_ft_category_list_get_from_dir_list (GSList *dir_list)
 {
        GList *categories = NULL;
        GSList *dir_iterator;
@@ -158,9 +159,9 @@ category_list_get_from_dir_list (GSList *dir_list)
 
                        full_entry_name = g_build_filename (dir_name, d_name, NULL);
                        if (d_name[0] != '.' && g_file_test (full_entry_name, G_FILE_TEST_IS_DIR)) {
-                               FormatTemplateCategory *category;
+                               GnmFTCategory *category;
 
-                               category = gnumeric_xml_read_format_template_category (full_entry_name);
+                               category = gnm_ft_xml_read_category (full_entry_name);
                                if (category != NULL) {
                                        categories = g_list_prepend (categories, category);
                                }
@@ -175,14 +176,14 @@ category_list_get_from_dir_list (GSList *dir_list)
 }
 
 static void
-category_list_free (GList *categories)
+gnm_ft_category_list_free (GList *categories)
 {
        GList *l;
 
        g_return_if_fail (categories);
 
        for (l = categories; l != NULL; l = l->next) {
-               category_free ((FormatTemplateCategory *) l->data);
+               gnm_ft_category_free ((GnmFTCategory *) l->data);
        }
        g_list_free (categories);
 }
@@ -199,19 +200,19 @@ add_dir (GSList **pl, const char *dir, const char *base_dir)
 }
 
 /**
- * category_group_list_get:
+ * gnm_ft_category_group_list_get:
  *
- * Returns: (element-type FormatTemplateCategoryGroup) (transfer full):
- * the list of #FormatTemplateCategoryGroup which should be freed using
- * category_group_list_free().
+ * Returns: (element-type GnmFTCategoryGroup) (transfer full):
+ * the list of #GnmFTCategoryGroup which should be freed using
+ * gnm_ft_category_group_list_free().
  **/
 GList *
-category_group_list_get (void)
+gnm_ft_category_group_list_get (void)
 {
        GList *category_groups = NULL;
        GSList *dir_list = NULL, *sl;
        GList *categories, *l;
-       FormatTemplateCategoryGroup *current_group;
+       GnmFTCategoryGroup *current_group;
 
        add_dir (&dir_list,
                 gnm_conf_get_autoformat_sys_dir (),
@@ -228,19 +229,19 @@ category_group_list_get (void)
                add_dir (&dir_list, dir, g_get_home_dir ());
        }
        dir_list = g_slist_reverse (dir_list);
-       categories = category_list_get_from_dir_list (dir_list);
+       categories = gnm_ft_category_list_get_from_dir_list (dir_list);
        g_slist_free_full (dir_list, g_free);
 
-       categories = g_list_sort (categories, category_compare_name_and_dir);
+       categories = g_list_sort (categories, gnm_ft_category_compare_name_and_dir);
 
        current_group = NULL;
        for (l = categories; l != NULL; l = l->next) {
-               FormatTemplateCategory *category = l->data;
+               GnmFTCategory *category = l->data;
                if (current_group == NULL || strcmp (current_group->name, category->name) != 0) {
                        if (current_group != NULL) {
                                category_groups = g_list_prepend (category_groups, current_group);
                        }
-                       current_group = g_new (FormatTemplateCategoryGroup, 1);
+                       current_group = g_new (GnmFTCategoryGroup, 1);
                        current_group->categories = g_list_append (NULL, category);
                        current_group->name = g_strdup (category->name);
                        current_group->description = g_strdup (category->description);
@@ -258,50 +259,50 @@ category_group_list_get (void)
 
 
 /**
- * category_group_list_free:
- * @category_groups: (element-type FormatTemplateCategoryGroup): the list to free.
+ * gnm_ft_category_group_list_free:
+ * @category_groups: (element-type GnmFTCategoryGroup): the list to free.
  *
  **/
 void
-category_group_list_free (GList *groups)
+gnm_ft_category_group_list_free (GList *groups)
 {
        GList *ptr;
 
        for (ptr = groups; ptr != NULL; ptr = ptr->next) {
-               FormatTemplateCategoryGroup *group = ptr->data;
+               GnmFTCategoryGroup *group = ptr->data;
                g_free (group->name);
                g_free (group->description);
-               category_list_free (group->categories);
+               gnm_ft_category_list_free (group->categories);
                g_free (group);
        }
        g_list_free (groups);
 }
 
 /**
- * category_group_get_templates_list:
- * @category_group: #FormatTemplateCategoryGroup
+ * gnm_ft_category_group_get_templates_list:
+ * @category_group: #GnmFTCategoryGroup
  * @context: #GOCmdContext
  *
- * Returns: (element-type FormatTemplate) (transfer container):
+ * Returns: (element-type GnmFT) (transfer container):
  **/
 GSList *
-category_group_get_templates_list (FormatTemplateCategoryGroup *category_group,
-                                  GOCmdContext *cc)
+gnm_ft_category_group_get_templates_list (GnmFTCategoryGroup *category_group,
+                                         GOCmdContext *cc)
 {
        GSList *templates = NULL;
        GList *l;
 
        for (l = category_group->categories; l != NULL; l = l->next)
                templates = g_slist_concat (templates,
-                       category_get_templates_list (l->data, cc));
+                       gnm_ft_category_get_templates_list (l->data, cc));
 
-       return g_slist_sort (templates, format_template_compare_name);
+       return g_slist_sort (templates, gnm_ft_compare_name);
 }
 
 int
-category_group_cmp (gconstpointer a, gconstpointer b)
+gnm_ft_category_group_cmp (gconstpointer a, gconstpointer b)
 {
-       FormatTemplateCategoryGroup const *group_a = a;
-       FormatTemplateCategoryGroup const *group_b = b;
+       GnmFTCategoryGroup const *group_a = a;
+       GnmFTCategoryGroup const *group_b = b;
        return g_utf8_collate (_(group_a->name), _(group_b->name));
 }
diff --git a/src/file-autoft.h b/src/file-autoft.h
index 5e20f77..f3f757f 100644
--- a/src/file-autoft.h
+++ b/src/file-autoft.h
@@ -7,13 +7,13 @@
 
 G_BEGIN_DECLS
 
-GSList  *category_group_get_templates_list (FormatTemplateCategoryGroup *category_group,
+GSList  *gnm_ft_category_group_get_templates_list (GnmFTCategoryGroup *category_group,
                                            GOCmdContext *context);
 
-GList   *category_group_list_get (void);
-void     category_group_list_free (GList *category_groups);
+GList   *gnm_ft_category_group_list_get (void);
+void     gnm_ft_category_group_list_free (GList *category_groups);
 
-int category_group_cmp (gconstpointer a, gconstpointer b);
+int gnm_ft_category_group_cmp (gconstpointer a, gconstpointer b);
 
 G_END_DECLS
 
diff --git a/src/format-template.c b/src/format-template.c
index 5eee565..46e0448 100644
--- a/src/format-template.c
+++ b/src/format-template.c
@@ -48,18 +48,18 @@ attr_eq (const xmlChar *a, const char *s)
  ******************************************************************************/
 
 /**
- * format_template_member_new:
+ * gnm_ft_member_new:
  *
- * Create a new TemplateMember
+ * Create a new GnmFTMember
  *
- * Return value: the new TemplateMember
+ * Return value: the new GnmFTMember
  **/
-static TemplateMember *
-format_template_member_new (void)
+static GnmFTMember *
+gnm_ft_member_new (void)
 {
-       TemplateMember *member;
+       GnmFTMember *member;
 
-       member = g_new (TemplateMember, 1);
+       member = g_new (GnmFTMember, 1);
 
        member->col.offset         = member->row.offset = 0;
        member->col.offset_gravity = member->row.offset_gravity = 1;
@@ -74,16 +74,16 @@ format_template_member_new (void)
 }
 
 /**
- * format_template_member_clone:
+ * gnm_ft_member_clone:
  *
  * Clone a template member
  *
  * Return value: a copy of @member
  **/
-static TemplateMember *
-format_template_member_clone (TemplateMember *member)
+static GnmFTMember *
+gnm_ft_member_clone (GnmFTMember *member)
 {
-       TemplateMember *clone = format_template_member_new ();
+       GnmFTMember *clone = gnm_ft_member_new ();
 
        clone->row = member->row;
        clone->col = member->col;
@@ -98,13 +98,13 @@ format_template_member_clone (TemplateMember *member)
 }
 
 /**
- * format_template_member_free:
- * @member: TemplateMember
+ * gnm_ft_member_free:
+ * @member: GnmFTMember
  *
  * Frees an existing template member
  **/
 static void
-format_template_member_free (TemplateMember *member)
+gnm_ft_member_free (GnmFTMember *member)
 {
        g_return_if_fail (member != NULL);
 
@@ -118,11 +118,11 @@ format_template_member_free (TemplateMember *member)
 
 
 /**
- * format_template_member_get_rect:
+ * gnm_ft_member_get_rect:
  * @member:
  * @r:
  *
- * Get the rectangular area covered by the TemplateMember @member in the parent
+ * Get the rectangular area covered by the GnmFTMember @member in the parent
  * rectangle @r.
  * NOTE : This simply calculates the rectangle, it does not calculate repetitions
  *        or anything. That you'll have to do yourself :-)
@@ -130,7 +130,7 @@ format_template_member_free (TemplateMember *member)
  * Return value: a GnmRange containing the effective rectangle of @member
  **/
 static GnmRange
-format_template_member_get_rect (TemplateMember const *member, GnmRange const *r)
+gnm_ft_member_get_rect (GnmFTMember const *member, GnmRange const *r)
 {
        GnmRange res;
 
@@ -184,7 +184,7 @@ format_template_member_get_rect (TemplateMember const *member, GnmRange const *r
 /****************************************************************************/
 
 static gboolean
-format_template_member_valid (TemplateMember const *member)
+gnm_ft_member_valid (GnmFTMember const *member)
 {
        return (member &&
                member->mstyle &&
@@ -196,22 +196,22 @@ format_template_member_valid (TemplateMember const *member)
 }
 
 /******************************************************************************
- * GnmFormatTemplate - Creation/Destruction
+ * GnmFT - Creation/Destruction
  ******************************************************************************/
 
 /**
- * format_template_new:
+ * gnm_ft_new:
  *
- * Create a new 'empty' GnmFormatTemplate
+ * Create a new 'empty' GnmFT
  *
- * Return value: the new GnmFormatTemplate
+ * Return value: the new GnmFT
  **/
-static GnmFormatTemplate *
-format_template_new (void)
+static GnmFT *
+gnm_ft_new (void)
 {
-       GnmFormatTemplate *ft;
+       GnmFT *ft;
 
-       ft = g_new0 (GnmFormatTemplate, 1);
+       ft = g_new0 (GnmFT, 1);
 
        ft->filename    = NULL;
        ft->author      = g_strdup (go_get_real_name ());
@@ -244,10 +244,10 @@ format_template_new (void)
 }
 
 /**
- * format_template_free:
+ * gnm_ft_free:
  **/
 void
-format_template_free (GnmFormatTemplate *ft)
+gnm_ft_free (GnmFT *ft)
 {
        g_return_if_fail (ft != NULL);
 
@@ -255,7 +255,7 @@ format_template_free (GnmFormatTemplate *ft)
        g_free (ft->author);
        g_free (ft->name);
        g_free (ft->description);
-       g_slist_free_full (ft->members, (GDestroyNotify)format_template_member_free);
+       g_slist_free_full (ft->members, (GDestroyNotify)gnm_ft_member_free);
        g_hash_table_destroy (ft->table);
 
        g_free (ft);
@@ -263,7 +263,7 @@ format_template_free (GnmFormatTemplate *ft)
 
 
 static void
-format_template_set_name (GnmFormatTemplate *ft, char const *name)
+gnm_ft_set_name (GnmFT *ft, char const *name)
 {
        g_return_if_fail (ft != NULL);
        g_return_if_fail (name != NULL);
@@ -273,7 +273,7 @@ format_template_set_name (GnmFormatTemplate *ft, char const *name)
 }
 
 static void
-format_template_set_author (GnmFormatTemplate *ft, char const *author)
+gnm_ft_set_author (GnmFT *ft, char const *author)
 {
        g_return_if_fail (ft != NULL);
        g_return_if_fail (author != NULL);
@@ -283,7 +283,7 @@ format_template_set_author (GnmFormatTemplate *ft, char const *author)
 }
 
 static void
-format_template_set_description (GnmFormatTemplate *ft, char const *description)
+gnm_ft_set_description (GnmFT *ft, char const *description)
 {
        g_return_if_fail (ft != NULL);
        g_return_if_fail (description != NULL);
@@ -293,30 +293,30 @@ format_template_set_description (GnmFormatTemplate *ft, char const *description)
 }
 
 /**
- * format_template_clone:
- * @ft: GnmFormatTemplate
+ * gnm_ft_clone:
+ * @ft: GnmFT
  *
  * Make a copy of @ft.
  *
  * Returns: transfer full): a copy of @ft
  **/
-GnmFormatTemplate *
-format_template_clone (GnmFormatTemplate const *ft)
+GnmFT *
+gnm_ft_clone (GnmFT const *ft)
 {
-       GnmFormatTemplate *clone;
+       GnmFT *clone;
 
        g_return_val_if_fail (ft != NULL, NULL);
 
-       clone = format_template_new ();
-       format_template_set_author (clone, ft->author);
-       format_template_set_name (clone, ft->name);
-       format_template_set_description (clone, ft->description);
+       clone = gnm_ft_new ();
+       gnm_ft_set_author (clone, ft->author);
+       gnm_ft_set_name (clone, ft->name);
+       gnm_ft_set_description (clone, ft->description);
        g_free (clone->filename); clone->filename = g_strdup (ft->filename);
 
        clone->category    = ft->category;
 
        clone->members = go_slist_map (ft->members,
-                                      (GOMapFunc)format_template_member_clone);
+                                      (GOMapFunc)gnm_ft_member_clone);
 
        clone->number    = ft->number;
        clone->border    = ft->border;
@@ -332,14 +332,14 @@ format_template_clone (GnmFormatTemplate const *ft)
 }
 
 GType
-gnm_format_template_get_type (void)
+gnm_ft_get_type (void)
 {
        static GType t = 0;
 
        if (t == 0) {
-               t = g_boxed_type_register_static ("GnmFormatTemplate",
-                        (GBoxedCopyFunc)format_template_clone,
-                        (GBoxedFreeFunc)format_template_free);
+               t = g_boxed_type_register_static ("GnmFT",
+                        (GBoxedCopyFunc)gnm_ft_clone,
+                        (GBoxedFreeFunc)gnm_ft_free);
        }
        return t;
 }
@@ -356,30 +356,30 @@ static GsfXMLInNS const template_ns[] = {
 static void
 sax_information (GsfXMLIn *xin, xmlChar const **attrs)
 {
-       GnmFormatTemplate *ft = (GnmFormatTemplate *)xin->user_state;
+       GnmFT *ft = (GnmFT *)xin->user_state;
 
        for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2) {
                if (attr_eq (attrs[0], "author"))
-                       format_template_set_author (ft, CXML2C (attrs[1]));
+                       gnm_ft_set_author (ft, CXML2C (attrs[1]));
                else if (attr_eq (attrs[0], "name"))
-                       format_template_set_name (ft, CXML2C (attrs[1]));
+                       gnm_ft_set_name (ft, CXML2C (attrs[1]));
                else if (attr_eq (attrs[0], "description"))
-                       format_template_set_description (ft, CXML2C (attrs[1]));
+                       gnm_ft_set_description (ft, CXML2C (attrs[1]));
        }
 }
 
 static void
 sax_members_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
 {
-       GnmFormatTemplate *ft = (GnmFormatTemplate *)xin->user_state;
+       GnmFT *ft = (GnmFT *)xin->user_state;
        ft->members = g_slist_reverse (ft->members);
 }
 
 static void
 sax_member (GsfXMLIn *xin, xmlChar const **attrs)
 {
-       GnmFormatTemplate *ft = (GnmFormatTemplate *)xin->user_state;
-       TemplateMember *member = format_template_member_new ();
+       GnmFT *ft = (GnmFT *)xin->user_state;
+       GnmFTMember *member = gnm_ft_member_new ();
 
        /* Order reversed in sax_members_end.  */
        ft->members = g_slist_prepend (ft->members, member);
@@ -388,18 +388,18 @@ sax_member (GsfXMLIn *xin, xmlChar const **attrs)
 static void
 sax_member_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
 {
-       GnmFormatTemplate *ft = (GnmFormatTemplate *)xin->user_state;
-       TemplateMember *member = ft->members->data;
+       GnmFT *ft = (GnmFT *)xin->user_state;
+       GnmFTMember *member = ft->members->data;
 
-       if (!format_template_member_valid (member)) {
+       if (!gnm_ft_member_valid (member)) {
                g_warning ("Invalid template member in %s\n", ft->filename);
                ft->members = g_slist_remove (ft->members, member);
-               format_template_member_free (member);
+               gnm_ft_member_free (member);
        }
 }
 
 static void
-sax_placement (FormatColRowInfo *info, xmlChar const **attrs)
+sax_placement (GnmFTColRowInfo *info, xmlChar const **attrs)
 {
        for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2) {
                if (gnm_xml_attr_int (attrs, "offset", &info->offset) ||
@@ -411,21 +411,21 @@ sax_placement (FormatColRowInfo *info, xmlChar const **attrs)
 static void
 sax_row_placement (GsfXMLIn *xin, xmlChar const **attrs)
 {
-       GnmFormatTemplate *ft = (GnmFormatTemplate *)xin->user_state;
-       TemplateMember *member = ft->members->data;
+       GnmFT *ft = (GnmFT *)xin->user_state;
+       GnmFTMember *member = ft->members->data;
        sax_placement (&member->row, attrs);
 }
 
 static void
 sax_col_placement (GsfXMLIn *xin, xmlChar const **attrs)
 {
-       GnmFormatTemplate *ft = (GnmFormatTemplate *)xin->user_state;
-       TemplateMember *member = ft->members->data;
+       GnmFT *ft = (GnmFT *)xin->user_state;
+       GnmFTMember *member = ft->members->data;
        sax_placement (&member->col, attrs);
 }
 
 static void
-sax_dimensions (FormatColRowInfo *info, xmlChar const **attrs)
+sax_dimensions (GnmFTColRowInfo *info, xmlChar const **attrs)
 {
        for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2) {
                if (gnm_xml_attr_int (attrs, "size", &info->size))
@@ -436,24 +436,24 @@ sax_dimensions (FormatColRowInfo *info, xmlChar const **attrs)
 static void
 sax_row_dimensions (GsfXMLIn *xin, xmlChar const **attrs)
 {
-       GnmFormatTemplate *ft = (GnmFormatTemplate *)xin->user_state;
-       TemplateMember *member = ft->members->data;
+       GnmFT *ft = (GnmFT *)xin->user_state;
+       GnmFTMember *member = ft->members->data;
        sax_dimensions (&member->row, attrs);
 }
 
 static void
 sax_col_dimensions (GsfXMLIn *xin, xmlChar const **attrs)
 {
-       GnmFormatTemplate *ft = (GnmFormatTemplate *)xin->user_state;
-       TemplateMember *member = ft->members->data;
+       GnmFT *ft = (GnmFT *)xin->user_state;
+       GnmFTMember *member = ft->members->data;
        sax_dimensions (&member->col, attrs);
 }
 
 static void
 sax_frequency (GsfXMLIn *xin, xmlChar const **attrs)
 {
-       GnmFormatTemplate *ft = (GnmFormatTemplate *)xin->user_state;
-       TemplateMember *member = ft->members->data;
+       GnmFT *ft = (GnmFT *)xin->user_state;
+       GnmFTMember *member = ft->members->data;
 
        for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2) {
                int i;
@@ -470,8 +470,8 @@ sax_frequency (GsfXMLIn *xin, xmlChar const **attrs)
 static void
 sax_style_handler (GsfXMLIn *xin, GnmStyle *style, gpointer user)
 {
-       GnmFormatTemplate *ft = (GnmFormatTemplate *)xin->user_state;
-       TemplateMember *member = ft->members->data;
+       GnmFT *ft = (GnmFT *)xin->user_state;
+       GnmFTMember *member = ft->members->data;
        gnm_style_ref (style);
        member->mstyle = style;
 }
@@ -513,19 +513,19 @@ GSF_XML_IN_NODE (START, TEMPLATE, GMR, "FormatTemplate", GSF_XML_NO_CONTENT, NUL
 };
 
 /**
- * format_template_new_from_file:
+ * gnm_ft_new_from_file:
  * @context:
  * @filename: The filename to load from
  *
- * Create a new GnmFormatTemplate and load a template file
+ * Create a new GnmFT and load a template file
  * into it.
  *
- * Return value: (transfer full): a new GnmFormatTemplate (or NULL on error)
+ * Return value: (transfer full): a new GnmFT (or NULL on error)
  **/
-GnmFormatTemplate *
-format_template_new_from_file (char const *filename, GOCmdContext *cc)
+GnmFT *
+gnm_ft_new_from_file (char const *filename, GOCmdContext *cc)
 {
-       GnmFormatTemplate *ft = NULL;
+       GnmFT *ft = NULL;
        GsfXMLInDoc *doc = NULL;
        GnmLocale *locale;
        gboolean ok = FALSE;
@@ -546,7 +546,7 @@ format_template_new_from_file (char const *filename, GOCmdContext *cc)
                goto done;
        gsf_xml_in_doc_set_unknown_handler (doc, &template_sax_unknown);
 
-       ft = format_template_new ();
+       ft = gnm_ft_new ();
        ft->filename = g_strdup (filename);
 
        locale = gnm_push_C_locale ();
@@ -558,7 +558,7 @@ format_template_new_from_file (char const *filename, GOCmdContext *cc)
        if (doc) gsf_xml_in_doc_free (doc);
 
        if (ft && !ok) {
-               format_template_free (ft);
+               gnm_ft_free (ft);
                ft = NULL;
        }
 
@@ -567,22 +567,22 @@ format_template_new_from_file (char const *filename, GOCmdContext *cc)
 
 
 /**
- * format_template_compare_name:
- * @a: First GnmFormatTemplate
- * @b: Second GnmFormatTemplate
+ * gnm_ft_compare_name:
+ * @a: First GnmFT
+ * @b: Second GnmFT
  *
  **/
 gint
-format_template_compare_name (gconstpointer a, gconstpointer b)
+gnm_ft_compare_name (gconstpointer a, gconstpointer b)
 {
-       GnmFormatTemplate const *ft_a = (GnmFormatTemplate const *) a;
-       GnmFormatTemplate const *ft_b = (GnmFormatTemplate const *) b;
+       GnmFT const *ft_a = (GnmFT const *) a;
+       GnmFT const *ft_b = (GnmFT const *) b;
 
        return g_utf8_collate (_(ft_a->name), _(ft_b->name));
 }
 
 /******************************************************************************
- * GnmFormatTemplate - Actual implementation (Filtering and calculating)
+ * GnmFT - Actual implementation (Filtering and calculating)
  ******************************************************************************/
 
 /**
@@ -600,7 +600,7 @@ format_template_compare_name (gconstpointer a, gconstpointer b)
  * Return value: The same mstyle as @mstyle with most likely some modifications
  **/
 static GnmStyle *
-format_template_filter_style (GnmFormatTemplate *ft, GnmStyle *mstyle, gboolean fill_defaults)
+format_template_filter_style (GnmFT *ft, GnmStyle *mstyle, gboolean fill_defaults)
 {
        g_return_val_if_fail (ft != NULL, NULL);
        g_return_val_if_fail (mstyle != NULL, NULL);
@@ -688,7 +688,7 @@ format_template_filter_style (GnmFormatTemplate *ft, GnmStyle *mstyle, gboolean
 /*
  * Callback used for calculating the styles
  */
-typedef void (* PCalcCallback) (GnmFormatTemplate *ft, GnmRange *r, GnmStyle *mstyle, gpointer data);
+typedef void (* PCalcCallback) (GnmFT *ft, GnmRange *r, GnmStyle *mstyle, gpointer data);
 
 /**
  * format_template_range_check:
@@ -702,7 +702,7 @@ typedef void (* PCalcCallback) (GnmFormatTemplate *ft, GnmRange *r, GnmStyle *ms
  * Return value: TRUE if @s is big enough, FALSE if not.
  **/
 static gboolean
-format_template_range_check (GnmFormatTemplate *ft, GnmRange const *r,
+format_template_range_check (GnmFT *ft, GnmRange const *r,
                             GOCmdContext *optional_cc)
 {
        GSList *ptr;
@@ -713,8 +713,8 @@ format_template_range_check (GnmFormatTemplate *ft, GnmRange const *r,
        g_return_val_if_fail (ft != NULL, FALSE);
 
        for (ptr = ft->members; NULL != ptr ; ptr = ptr->next) {
-               TemplateMember *member = ptr->data;
-               GnmRange range = format_template_member_get_rect (member, r);
+               GnmFTMember *member = ptr->data;
+               GnmRange range = gnm_ft_member_get_rect (member, r);
 
                if (!range_valid (&range)) {
                        int diff_col = (range.start.col - range.end.col);
@@ -771,12 +771,12 @@ format_template_range_check (GnmFormatTemplate *ft, GnmRange const *r,
 
 /* Remove edge styles from a template and shift items that anchor on a filtered
  * edge.  Returns a filtered copy of @origft. */
-static GnmFormatTemplate *
-gnm_auto_fmt_filter_edges (GnmFormatTemplate const *origft)
+static GnmFT *
+gnm_auto_fmt_filter_edges (GnmFT const *origft)
 {
        GSList *ptr;
-       GnmFormatTemplate *ft = format_template_clone (origft);
-       TemplateMember *member;
+       GnmFT *ft = gnm_ft_clone (origft);
+       GnmFTMember *member;
        gboolean is_edge, l = FALSE, r = FALSE, t = FALSE, b = FALSE;
 
        for (ptr = ft->members; ptr != NULL ; ) {
@@ -799,7 +799,7 @@ gnm_auto_fmt_filter_edges (GnmFormatTemplate const *origft)
                                b |= (is_edge = TRUE);
                }
                if (is_edge) {
-                       format_template_member_free (member);
+                       gnm_ft_member_free (member);
                        ft->members = g_slist_remove (ft->members, member);
                }
        }
@@ -807,7 +807,7 @@ gnm_auto_fmt_filter_edges (GnmFormatTemplate const *origft)
        if (!l && !r && !t && !b)
                return ft;
        for (ptr = ft->members; ptr != NULL ; ptr = ptr->next) {
-               TemplateMember *submember = ptr->data;
+               GnmFTMember *submember = ptr->data;
 
                if (l && submember->col.offset_gravity > 0) {
                        if (submember->col.offset >= 1)
@@ -837,8 +837,8 @@ gnm_auto_fmt_filter_edges (GnmFormatTemplate const *origft)
 }
 
 /**
- * format_template_calculate:
- * @origft: GnmFormatTemplate
+ * gnm_ft_calculate:
+ * @origft: GnmFT
  * @s: Target range
  * @pc: Callback function
  * @cb_data: Data to pass to the callback function
@@ -849,10 +849,10 @@ gnm_auto_fmt_filter_edges (GnmFormatTemplate const *origft)
  *
  **/
 static void
-format_template_calculate (GnmFormatTemplate *origft, GnmRange const *r,
+gnm_ft_calculate (GnmFT *origft, GnmRange const *r,
                           PCalcCallback pc, gpointer cb_data)
 {
-       GnmFormatTemplate *ft = origft;
+       GnmFT *ft = origft;
        GSList *ptr;
 
        g_return_if_fail (origft != NULL);
@@ -861,9 +861,9 @@ format_template_calculate (GnmFormatTemplate *origft, GnmRange const *r,
                ft = gnm_auto_fmt_filter_edges (origft);
 
        for (ptr = ft->members; NULL != ptr ; ptr = ptr->next) {
-               TemplateMember const *member = ptr->data;
+               GnmFTMember const *member = ptr->data;
                GnmStyle const *mstyle = member->mstyle;
-               GnmRange range = format_template_member_get_rect (member, r);
+               GnmRange range = gnm_ft_member_get_rect (member, r);
 
                g_return_if_fail (range_valid (&range));
 
@@ -914,15 +914,15 @@ format_template_calculate (GnmFormatTemplate *origft, GnmRange const *r,
        }
 
        if (ft != origft)
-               format_template_free (ft);
+               gnm_ft_free (ft);
 }
 
 /******************************************************************************
- * GnmFormatTemplate - Application for the hashtable (previews)
+ * GnmFT - Application for the hashtable (previews)
  ******************************************************************************/
 
 static void
-cb_format_hash_style (GnmFormatTemplate *ft, GnmRange *r, GnmStyle *mstyle, gpointer user)
+cb_format_hash_style (GnmFT *ft, GnmRange *r, GnmStyle *mstyle, gpointer user)
 {
        GHashTable *table = user;
        int row, col;
@@ -951,12 +951,12 @@ cb_format_hash_style (GnmFormatTemplate *ft, GnmRange *r, GnmStyle *mstyle, gpoi
 
 /**
  * format_template_recalc_hash:
- * @ft: GnmFormatTemplate
+ * @ft: GnmFT
  *
  * Refills the hashtable based on new dimensions
  **/
 static void
-format_template_recalc_hash (GnmFormatTemplate *ft)
+format_template_recalc_hash (GnmFT *ft)
 {
        GnmRange r;
 
@@ -974,11 +974,11 @@ format_template_recalc_hash (GnmFormatTemplate *ft)
                return;
        }
 
-       format_template_calculate (ft, &r, cb_format_hash_style, ft->table);
+       gnm_ft_calculate (ft, &r, cb_format_hash_style, ft->table);
 }
 
 /**
- * format_template_get_style:
+ * gnm_ft_get_style:
  * @ft:
  * @row:
  * @col:
@@ -992,7 +992,7 @@ format_template_recalc_hash (GnmFormatTemplate *ft)
  * Return value: an GnmStyle
  **/
 GnmStyle *
-format_template_get_style (GnmFormatTemplate *ft, int row, int col)
+gnm_ft_get_style (GnmFT *ft, int row, int col)
 {
        GnmCellPos key;
 
@@ -1016,11 +1016,11 @@ format_template_get_style (GnmFormatTemplate *ft, int row, int col)
 
 
 /******************************************************************************
- * GnmFormatTemplate - Application to Sheet
+ * GnmFT - Application to Sheet
  ******************************************************************************/
 
 static void
-cb_format_sheet_style (GnmFormatTemplate *ft, GnmRange *r, GnmStyle *mstyle, gpointer user)
+cb_format_sheet_style (GnmFT *ft, GnmRange *r, GnmStyle *mstyle, gpointer user)
 {
        Sheet *sheet = user;
 
@@ -1038,7 +1038,7 @@ cb_format_sheet_style (GnmFormatTemplate *ft, GnmRange *r, GnmStyle *mstyle, gpo
 }
 
 /**
- * format_template_check_valid:
+ * gnm_ft_check_valid:
  * @ft:
  * @regions: (element-type GnmRange):
  * @cc: where to report errors
@@ -1048,7 +1048,7 @@ cb_format_sheet_style (GnmFormatTemplate *ft, GnmRange *r, GnmStyle *mstyle, gpo
  * supplied.
  */
 gboolean
-format_template_check_valid (GnmFormatTemplate *ft, GSList *regions, GOCmdContext *cc)
+gnm_ft_check_valid (GnmFT *ft, GSList *regions, GOCmdContext *cc)
 {
        g_return_val_if_fail (cc != NULL, FALSE);
 
@@ -1060,17 +1060,17 @@ format_template_check_valid (GnmFormatTemplate *ft, GSList *regions, GOCmdContex
 }
 
 /**
- * format_template_apply_to_sheet_regions:
- * @ft: GnmFormatTemplate
+ * gnm_ft_apply_to_sheet_regions:
+ * @ft: GnmFT
  * @sheet: the Target sheet
  * @regions: (element-type GnmRange): Region list
  *
  * Apply the template to all selected regions in @sheet.
  **/
 void
-format_template_apply_to_sheet_regions (GnmFormatTemplate *ft, Sheet *sheet, GSList *regions)
+gnm_ft_apply_to_sheet_regions (GnmFT *ft, Sheet *sheet, GSList *regions)
 {
        for (; regions != NULL ; regions = regions->next)
-               format_template_calculate (ft, regions->data,
+               gnm_ft_calculate (ft, regions->data,
                                           cb_format_sheet_style, sheet);
 }
diff --git a/src/format-template.h b/src/format-template.h
index 335fe3f..18c2fa8 100644
--- a/src/format-template.h
+++ b/src/format-template.h
@@ -47,14 +47,14 @@ typedef struct {
        int offset;             /* Offset (top/left) */
        int offset_gravity;     /* Gravity +1 means relative to top/left, -1 relative to bottom/right */
        int size;               /* Dimensions (These form the bottom right coordinates) */
-} FormatColRowInfo;
+} GnmFTColRowInfo;
 
 /* WARNING : do not change these or persistence will break */
 typedef enum {
        FREQ_DIRECTION_NONE,
        FREQ_DIRECTION_HORIZONTAL,
        FREQ_DIRECTION_VERTICAL
-} FreqDirection;
+} GnmFTFreqDirection;
 
 /* A collection of categories of the same name from different paths */
 typedef struct {
@@ -63,7 +63,7 @@ typedef struct {
        /* translatable via gettext in the std message domain */
        char *name;
        char *description;
-} FormatTemplateCategoryGroup;
+} GnmFTCategoryGroup;
 
 typedef struct {
        char *directory;
@@ -72,10 +72,10 @@ typedef struct {
        /* translatable via gettext in the std message domain */
        char *name;
        char *description;
-} FormatTemplateCategory;
+} GnmFTCategory;
 
-struct _GnmFormatTemplate {
-       FormatTemplateCategory *category;
+struct GnmFT_ {
+       GnmFTCategory *category;
        GSList *members;        /* the actual TemplateMembers */
        char *filename;
        char *author;
@@ -106,35 +106,35 @@ struct _GnmFormatTemplate {
 };
 
 typedef struct {
-       FormatColRowInfo row; /* Row info */
-       FormatColRowInfo col; /* Col info */
+       GnmFTColRowInfo row; /* Row info */
+       GnmFTColRowInfo col; /* Col info */
 
        /* Frequency (How many times to repeat) and in which
         * direction and when to stop.
         */
-       FreqDirection direction;
+       GnmFTFreqDirection direction;
        int repeat;
        int skip;
        int edge;
 
        GnmStyle *mstyle;       /* Style to apply */
-} TemplateMember;
+} GnmFTMember;
 
 /*
- * Functions for GnmFormatTemplate
+ * Functions for GnmFT
  */
-GType              gnm_format_template_get_type   (void);
-void               format_template_free           (GnmFormatTemplate *ft);
-GnmFormatTemplate *format_template_clone          (GnmFormatTemplate const *ft);
-GnmFormatTemplate *format_template_new_from_file  (char const *filename,
-                                                  GOCmdContext *context);
-
-gint                  format_template_compare_name             (gconstpointer a, gconstpointer b);
-
-GnmStyle               *format_template_get_style                (GnmFormatTemplate *ft, int row, int col);
-void                  format_template_apply_to_sheet_regions   (GnmFormatTemplate *ft, Sheet *sheet, GSList 
*regions);
-gboolean             format_template_check_valid              (GnmFormatTemplate *ft, GSList *regions,
-                                                               GOCmdContext *cc);
+GType            gnm_ft_get_type       (void);
+void             gnm_ft_free           (GnmFT *ft);
+GnmFT          *gnm_ft_clone          (GnmFT const *ft);
+GnmFT          *gnm_ft_new_from_file  (char const *filename,
+                                       GOCmdContext *context);
+
+gint            gnm_ft_compare_name   (gconstpointer a, gconstpointer b);
+
+GnmStyle       *gnm_ft_get_style      (GnmFT *ft, int row, int col);
+void            gnm_ft_apply_to_sheet_regions   (GnmFT *ft, Sheet *sheet, GSList *regions);
+gboolean        gnm_ft_check_valid   (GnmFT *ft, GSList *regions,
+                                      GOCmdContext *cc);
 
 G_END_DECLS
 
diff --git a/src/gnumeric-fwd.h b/src/gnumeric-fwd.h
index 0edc8ba..03144cf 100644
--- a/src/gnumeric-fwd.h
+++ b/src/gnumeric-fwd.h
@@ -44,7 +44,7 @@ typedef struct _GnmFilter             GnmFilter;
 typedef struct _GnmFilterCondition     GnmFilterCondition;
 typedef struct _GnmFont                        GnmFont;
 typedef struct _GnmFontMetrics         GnmFontMetrics;
-typedef struct _GnmFormatTemplate       GnmFormatTemplate; /* does not really belong here */
+typedef struct GnmFT_       GnmFT; /* does not really belong here */
 typedef struct _GnmFunc                        GnmFunc;
 typedef struct _GnmFuncDescriptor      GnmFuncDescriptor;
 typedef struct _GnmFuncEvalInfo         GnmFuncEvalInfo;
diff --git a/src/graph.c b/src/graph.c
index a9bf992..1eaf171 100644
--- a/src/graph.c
+++ b/src/graph.c
@@ -168,7 +168,7 @@ gnm_go_data_preferred_fmt (GOData const *dat)
 
        eval_pos_init_dep (&ep, dep);
        return dep->texpr
-               ? (GOFormat *)auto_style_format_suggest (dep->texpr, &ep)
+               ? (GOFormat *)gnm_auto_style_format_suggest (dep->texpr, &ep)
                : NULL;
 }
 
@@ -399,7 +399,7 @@ gnm_go_data_scalar_get_str (GODataScalar *dat)
 
                eval_pos_init_dep (&ep, &scalar->dep);
                if (scalar->dep.texpr)
-                       fmt = auto_style_format_suggest (scalar->dep.texpr, &ep);
+                       fmt = gnm_auto_style_format_suggest (scalar->dep.texpr, &ep);
                scalar->val_str =
                        render_val (scalar_get_val (scalar), 0, 0, fmt, &ep);
        }
diff --git a/src/gui-clipboard.c b/src/gui-clipboard.c
index 458ad0c..1b204a7 100644
--- a/src/gui-clipboard.c
+++ b/src/gui-clipboard.c
@@ -850,7 +850,7 @@ x_clipboard_get_cb (GtkClipboard *gclipboard, GtkSelectionData *selection_data,
        GnmCellRegion *clipboard = gnm_app_clipboard_contents_get ();
        Sheet *sheet = gnm_app_clipboard_sheet_get ();
        GnmRange const *a = gnm_app_clipboard_area_get ();
-       GOCmdContext *ctx = cmd_context_stderr_new ();
+       GOCmdContext *ctx = gnm_cmd_context_stderr_new ();
        GdkAtom target = gtk_selection_data_get_target (selection_data);
        gchar *target_name = gdk_atom_name (target);
 
diff --git a/src/libgnumeric.c b/src/libgnumeric.c
index 6d8bf55..4d14cb2 100644
--- a/src/libgnumeric.c
+++ b/src/libgnumeric.c
@@ -321,7 +321,7 @@ gnm_init (void)
 
        value_init ();
        parse_util_init ();
-       expr_init ();
+       _gnm_expr_init ();
        gnm_sheet_cell_init ();
        clipboard_init ();
        dependent_types_init ();
@@ -351,10 +351,10 @@ int
 gnm_dump_func_defs (char const* filename, int dump_type)
 {
        int retval;
-       GOCmdContext *cc = cmd_context_stderr_new ();
+       GOCmdContext *cc = gnm_cmd_context_stderr_new ();
 
        gnm_plugins_init (cc);
-       if ((retval = cmd_context_stderr_get_status (COMMAND_CONTEXT_STDERR (cc))) == 0)
+       if ((retval = gnm_cmd_context_stderr_get_status (GNM_CMD_CONTEXT_STDERR (cc))) == 0)
                function_dump_defs (filename, dump_type);
 
        return retval;
@@ -385,7 +385,7 @@ gnm_shutdown (void)
        dependent_types_shutdown ();
        clipboard_shutdown ();
        gnm_sheet_cell_shutdown ();
-       expr_shutdown ();
+       _gnm_expr_shutdown ();
        parse_util_shutdown ();
        value_shutdown ();
 
diff --git a/src/main-application.c b/src/main-application.c
index e19da10..561561c 100644
--- a/src/main-application.c
+++ b/src/main-application.c
@@ -289,7 +289,7 @@ main (int argc, char const **argv)
                return gnm_dump_func_defs (ext_refs_file, 4);
 
        if (with_gui) {
-               go_component_set_default_command_context (cc = cmd_context_stderr_new ());
+               go_component_set_default_command_context (cc = gnm_cmd_context_stderr_new ());
                g_object_unref (cc);
                cc = g_object_new (GNM_TYPE_IO_CONTEXT_GTK,
                                   "show-splash", !gnumeric_no_splash,
@@ -300,7 +300,7 @@ main (int argc, char const **argv)
                pathetic_qt_workaround ();
        } else {
                /* TODO: Make this inconsistency go away */
-               cc = cmd_context_stderr_new ();
+               cc = gnm_cmd_context_stderr_new ();
                ioc = go_io_context_new (cc);
                go_component_set_default_command_context (cc);
        }
diff --git a/src/ssconvert.c b/src/ssconvert.c
index 5f8c138..f08bc6d 100644
--- a/src/ssconvert.c
+++ b/src/ssconvert.c
@@ -879,7 +879,7 @@ main (int argc, char const **argv)
 
        gnm_init ();
 
-       cc = cmd_context_stderr_new ();
+       cc = gnm_cmd_context_stderr_new ();
        gnm_plugins_init (GO_CMD_CONTEXT (cc));
        go_plugin_db_activate_plugin_list (
                go_plugins_get_available_plugins (), &plugin_errs);
diff --git a/src/ssdiff.c b/src/ssdiff.c
index e194de7..05bd6bf 100644
--- a/src/ssdiff.c
+++ b/src/ssdiff.c
@@ -1071,7 +1071,7 @@ main (int argc, char const **argv)
 
        gnm_init ();
 
-       cc = cmd_context_stderr_new ();
+       cc = gnm_cmd_context_stderr_new ();
        gnm_plugins_init (GO_CMD_CONTEXT (cc));
        go_plugin_db_activate_plugin_list (
                go_plugins_get_available_plugins (), &plugin_errs);
diff --git a/src/ssgrep.c b/src/ssgrep.c
index baca256..0ac34a4 100644
--- a/src/ssgrep.c
+++ b/src/ssgrep.c
@@ -510,7 +510,7 @@ main (int argc, char const **argv)
                N = 1;
        }
 
-       cc = cmd_context_stderr_new ();
+       cc = gnm_cmd_context_stderr_new ();
        gnm_plugins_init (GO_CMD_CONTEXT (cc));
        go_plugin_db_activate_plugin_list (
                go_plugins_get_available_plugins (), &plugin_errs);
diff --git a/src/ssindex.c b/src/ssindex.c
index ab5b383..e5f168c 100644
--- a/src/ssindex.c
+++ b/src/ssindex.c
@@ -273,7 +273,7 @@ main (int argc, char const **argv)
 
        gnm_init ();
 
-       cc = cmd_context_stderr_new ();
+       cc = gnm_cmd_context_stderr_new ();
        gnm_plugins_init (GO_CMD_CONTEXT (cc));
        go_plugin_db_activate_plugin_list (
                go_plugins_get_available_plugins (), &plugin_errs);
diff --git a/src/sstest.c b/src/sstest.c
index 3b46eca..1a9d9f4 100644
--- a/src/sstest.c
+++ b/src/sstest.c
@@ -931,7 +931,7 @@ main (int argc, char const **argv)
 
        gnm_init ();
 
-       cc = cmd_context_stderr_new ();
+       cc = gnm_cmd_context_stderr_new ();
        gnm_plugins_init (GO_CMD_CONTEXT (cc));
        go_plugin_db_activate_plugin_list (
                go_plugins_get_available_plugins (), &plugin_errs);
diff --git a/src/test-pango.c b/src/test-pango.c
index 61eafcc..f383d78 100644
--- a/src/test-pango.c
+++ b/src/test-pango.c
@@ -73,7 +73,7 @@ main (int argc, char const **argv)
        gtk_init (&argc, (char ***)&argv);
        gnm_init ();
 
-       cc  = cmd_context_stderr_new ();
+       cc  = gnm_cmd_context_stderr_new ();
        ioc = go_io_context_new (cc);
        g_object_unref (cc);
 
diff --git a/src/wbc-gtk-edit.c b/src/wbc-gtk-edit.c
index c722efc..640fd7b 100644
--- a/src/wbc-gtk-edit.c
+++ b/src/wbc-gtk-edit.c
@@ -542,7 +542,7 @@ cb_entry_changed (G_GNUC_UNUSED GtkEntry *entry, WBCGtk *wbcg)
                wbcg->auto_max_size = text_len;
 
        if (wbv->do_auto_completion && wbcg->auto_completing)
-               complete_start (GNM_COMPLETE (wbcg->auto_complete), text);
+               gnm_complete_start (GNM_COMPLETE (wbcg->auto_complete), text);
 }
 
 static gboolean
@@ -965,7 +965,7 @@ wbcg_edit_start (WBCGtk *wbcg,
        if (cursorp && /* autocompletion code will not work in the edit line */
            wbv->do_auto_completion &&
            (text == NULL || g_unichar_isalpha (g_utf8_get_char (text)))) {
-               wbcg->auto_complete = (GObject *)complete_sheet_new (
+               wbcg->auto_complete = (GObject *)gnm_complete_sheet_new (
                        sv->sheet, col, row,
                        workbook_edit_complete_notify, wbcg);
                wbcg->auto_completing = TRUE;
diff --git a/src/workbook-view.c b/src/workbook-view.c
index 196c732..d439b9d 100644
--- a/src/workbook-view.c
+++ b/src/workbook-view.c
@@ -547,7 +547,7 @@ wb_view_auto_expr_recalc (WorkbookView *wbv)
                if (wbv->auto_expr.use_max_precision)
                        value_set_fmt (v, NULL);
                else if (!VALUE_FMT (v)) {
-                       GOFormat const *fmt = auto_style_format_suggest (texpr, &ep);
+                       GOFormat const *fmt = gnm_auto_style_format_suggest (texpr, &ep);
                        value_set_fmt (v, fmt);
                        go_format_unref (fmt);
                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]