prefix common internal operator function names so its possible to assign them breakpo...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 28 Oct 2011 03:02:09 +0000 (03:02 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 28 Oct 2011 03:02:09 +0000 (03:02 +0000)
source/blender/editors/curve/editfont.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/object/object_lattice.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_text/text_header.c
source/blender/editors/space_text/text_ops.c

index 1ac920b..b1c2664 100644 (file)
@@ -1654,14 +1654,14 @@ static void font_ui_template_init(bContext *C, wmOperator *op)
        uiIDContextProperty(C, &pprop->ptr, &pprop->prop);
 }
 
-static int open_cancel(bContext *UNUSED(C), wmOperator *op)
+static int font_open_cancel(bContext *UNUSED(C), wmOperator *op)
 {
        MEM_freeN(op->customdata);
        op->customdata= NULL;
        return OPERATOR_CANCELLED;
 }
 
-static int open_exec(bContext *C, wmOperator *op)
+static int font_open_exec(bContext *C, wmOperator *op)
 {
        struct Main *bmain= CTX_data_main(C);
        VFont *font;
@@ -1719,7 +1719,7 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
        path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0)? font->name: U.fontdir;
 
        if(RNA_property_is_set(op->ptr, "filepath"))
-               return open_exec(C, op);
+               return font_open_exec(C, op);
 
        RNA_string_set(op->ptr, "filepath", path);
        WM_event_add_fileselect(C, op); 
@@ -1734,9 +1734,9 @@ void FONT_OT_open(wmOperatorType *ot)
        ot->idname= "FONT_OT_open";
        
        /* api callbacks */
-       ot->exec= open_exec;
+       ot->exec= font_open_exec;
        ot->invoke= open_invoke;
-       ot->cancel= open_cancel;
+       ot->cancel= font_open_cancel;
        
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
index 004b98e..b4bee60 100644 (file)
@@ -3435,7 +3435,7 @@ void EM_deselect_all(EditMesh *em)
        EM_clear_flag_all(em, SELECT);
 }
 
-static int select_all_exec(bContext *C, wmOperator *op)
+static int editmesh_select_all_exec(bContext *C, wmOperator *op)
 {
        Object *obedit= CTX_data_edit_object(C);
        EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
@@ -3470,7 +3470,7 @@ void MESH_OT_select_all(wmOperatorType *ot)
        ot->idname= "MESH_OT_select_all";
        
        /* api callbacks */
-       ot->exec= select_all_exec;
+       ot->exec= editmesh_select_all_exec;
        ot->poll= ED_operator_editmesh;
        
        /* flags */
index f69f91c..a77a34e 100644 (file)
@@ -121,7 +121,7 @@ MetaElem *add_metaball_primitive(bContext *C, float mat[4][4], int type, int UNU
 /***************************** Select/Deselect operator *****************************/
 
 /* Select or deselect all MetaElements */
-static int select_all_exec(bContext *C, wmOperator *op)
+static int mball_select_all_exec(bContext *C, wmOperator *op)
 {
        //Scene *scene= CTX_data_scene(C);
        Object *obedit= CTX_data_edit_object(C);
@@ -171,7 +171,7 @@ void MBALL_OT_select_all(wmOperatorType *ot)
        ot->idname= "MBALL_OT_select_all";
 
        /* callback functions */
-       ot->exec= select_all_exec;
+       ot->exec= mball_select_all_exec;
        ot->poll= ED_operator_editmball;
 
        /* flags */
index 7585018..25c1e32 100644 (file)
@@ -186,7 +186,7 @@ void ED_setflagsLatt(Object *obedit, int flag)
        }
 }
 
-static int select_all_exec(bContext *C, wmOperator *op)
+static int lattice_select_all_exec(bContext *C, wmOperator *op)
 {
        Object *obedit= CTX_data_edit_object(C);
        Lattice *lt= obedit->data;
@@ -244,7 +244,7 @@ void LATTICE_OT_select_all(wmOperatorType *ot)
        ot->idname= "LATTICE_OT_select_all";
        
        /* api callbacks */
-       ot->exec= select_all_exec;
+       ot->exec= lattice_select_all_exec;
        ot->poll= ED_operator_editlattice;
        
        /* flags */
index 0803fa2..3694102 100644 (file)
@@ -1296,7 +1296,7 @@ static void toggle_key_select(PEData *data, int point_index, int key_index)
 
 /************************ de select all operator ************************/
 
-static int select_all_exec(bContext *C, wmOperator *op)
+static int pe_select_all_exec(bContext *C, wmOperator *op)
 {
        Scene *scene= CTX_data_scene(C);
        Object *ob= CTX_data_active_object(C);
@@ -1358,7 +1358,7 @@ void PARTICLE_OT_select_all(wmOperatorType *ot)
        ot->idname= "PARTICLE_OT_select_all";
        
        /* api callbacks */
-       ot->exec= select_all_exec;
+       ot->exec= pe_select_all_exec;
        ot->poll= PE_poll;
 
        /* flags */
index d49ce0c..e08f6fc 100644 (file)
@@ -5583,7 +5583,7 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op)
        if(h > maxsize) h= maxsize;
 
        ibuf= ED_view3d_draw_offscreen_imbuf(CTX_data_scene(C), CTX_wm_view3d(C), CTX_wm_region(C), w, h, IB_rect, err_out);
-       if(!ibuf) {
+       if(!ibuf || 1) {
                /* Mostly happens when OpenGL offscreen buffer was failed to create, */
                /* but could be other reasons. Should be handled in the future. nazgul */
                BKE_reportf(op->reports, RPT_ERROR, "Failed to create OpenGL offscreen buffer: %s", err_out);
index d815774..623cfc4 100644 (file)
 
 /******************** open sound operator ********************/
 
-static int open_cancel(bContext *UNUSED(C), wmOperator *op)
+static int sound_open_cancel(bContext *UNUSED(C), wmOperator *op)
 {
        MEM_freeN(op->customdata);
        op->customdata= NULL;
        return OPERATOR_CANCELLED;
 }
 
-static void open_init(bContext *C, wmOperator *op)
+static void sound_open_init(bContext *C, wmOperator *op)
 {
        PropertyPointerRNA *pprop;
 
@@ -93,7 +93,7 @@ static void open_init(bContext *C, wmOperator *op)
 }
 
 #ifdef WITH_AUDASPACE
-static int open_exec(bContext *C, wmOperator *op)
+static int sound_open_exec(bContext *C, wmOperator *op)
 {
        char path[FILE_MAX];
        bSound *sound;
@@ -106,7 +106,7 @@ static int open_exec(bContext *C, wmOperator *op)
        sound = sound_new_file(bmain, path);
 
        if(!op->customdata)
-               open_init(C, op);
+               sound_open_init(C, op);
 
        if (sound==NULL || sound->playback_handle == NULL) {
                if(op->customdata) MEM_freeN(op->customdata);
@@ -151,7 +151,7 @@ static int open_exec(bContext *C, wmOperator *op)
 
 #else //WITH_AUDASPACE
 
-static int open_exec(bContext *UNUSED(C), wmOperator *op)
+static int sound_open_exec(bContext *UNUSED(C), wmOperator *op)
 {
        BKE_report(op->reports, RPT_ERROR, "Compiled without sound support");
 
@@ -160,12 +160,12 @@ static int open_exec(bContext *UNUSED(C), wmOperator *op)
 
 #endif
 
-static int open_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int sound_open_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        if(RNA_property_is_set(op->ptr, "filepath"))
-               return open_exec(C, op);
+               return sound_open_exec(C, op);
 
-       open_init(C, op);
+       sound_open_init(C, op);
 
        return WM_operator_filesel(C, op, event);
 }
@@ -178,9 +178,9 @@ static void SOUND_OT_open(wmOperatorType *ot)
        ot->idname= "SOUND_OT_open";
 
        /* api callbacks */
-       ot->exec= open_exec;
-       ot->invoke= open_invoke;
-       ot->cancel= open_cancel;
+       ot->exec= sound_open_exec;
+       ot->invoke= sound_open_invoke;
+       ot->cancel= sound_open_cancel;
 
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -199,9 +199,9 @@ static void SOUND_OT_open_mono(wmOperatorType *ot)
        ot->idname= "SOUND_OT_open_mono";
 
        /* api callbacks */
-       ot->exec= open_exec;
-       ot->invoke= open_invoke;
-       ot->cancel= open_cancel;
+       ot->exec= sound_open_exec;
+       ot->invoke= sound_open_invoke;
+       ot->cancel= sound_open_cancel;
 
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -214,7 +214,7 @@ static void SOUND_OT_open_mono(wmOperatorType *ot)
 
 /******************** mixdown operator ********************/
 
-static int mixdown_exec(bContext *C, wmOperator *op)
+static int sound_mixdown_exec(bContext *C, wmOperator *op)
 {
 #ifdef WITH_AUDASPACE
        char path[FILE_MAX];
@@ -257,15 +257,15 @@ static int mixdown_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-static int mixdown_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int sound_mixdown_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        if(RNA_property_is_set(op->ptr, "filepath"))
-               return mixdown_exec(C, op);
+               return sound_mixdown_exec(C, op);
 
        return WM_operator_filesel(C, op, event);
 }
 
-static int mixdown_draw_check_prop(PropertyRNA *prop)
+static int sound_mixdown_draw_check_prop(PropertyRNA *prop)
 {
        const char *prop_id= RNA_property_identifier(prop);
        return !(       strcmp(prop_id, "filepath") == 0 ||
@@ -275,7 +275,7 @@ static int mixdown_draw_check_prop(PropertyRNA *prop)
 }
 
 #ifdef WITH_AUDASPACE
-static void mixdown_draw(bContext *C, wmOperator *op)
+static void sound_mixdown_draw(bContext *C, wmOperator *op)
 {
        static EnumPropertyItem pcm_format_items[] = {
                {AUD_FORMAT_U8, "U8", 0, "U8", "8 bit unsigned"},
@@ -424,7 +424,7 @@ static void mixdown_draw(bContext *C, wmOperator *op)
        RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
 
        /* main draw call */
-       uiDefAutoButsRNA(layout, &ptr, mixdown_draw_check_prop, '\0');
+       uiDefAutoButsRNA(layout, &ptr, sound_mixdown_draw_check_prop, '\0');
 }
 #endif // WITH_AUDASPACE
 
@@ -476,11 +476,11 @@ static void SOUND_OT_mixdown(wmOperatorType *ot)
        ot->idname= "SOUND_OT_mixdown";
 
        /* api callbacks */
-       ot->exec= mixdown_exec;
-       ot->invoke= mixdown_invoke;
+       ot->exec= sound_mixdown_exec;
+       ot->invoke= sound_mixdown_invoke;
 
 #ifdef WITH_AUDASPACE
-       ot->ui= mixdown_draw;
+       ot->ui= sound_mixdown_draw;
 #endif
        /* flags */
        ot->flag= OPTYPE_REGISTER;
@@ -509,7 +509,7 @@ static int sound_poll(bContext *C)
 }
 /********************* pack operator *********************/
 
-static int pack_exec(bContext *C, wmOperator *op)
+static int sound_pack_exec(bContext *C, wmOperator *op)
 {
        Main *bmain= CTX_data_main(C);
        Editing* ed = CTX_data_scene(C)->ed;
@@ -537,7 +537,7 @@ static void SOUND_OT_pack(wmOperatorType *ot)
        ot->idname= "SOUND_OT_pack";
 
        /* api callbacks */
-       ot->exec= pack_exec;
+       ot->exec= sound_pack_exec;
        ot->poll= sound_poll;
 
        /* flags */
@@ -615,7 +615,7 @@ static void SOUND_OT_unpack(wmOperatorType *ot)
 
 /* ******************************************************* */
 
-static int update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op))
+static int sound_update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Sequence* seq;
        Scene* scene = CTX_data_scene(C);
@@ -667,7 +667,7 @@ static void SOUND_OT_update_animation_flags(wmOperatorType *ot)
        ot->idname= "SOUND_OT_update_animation_flags";
 
        /* api callbacks */
-       ot->exec= update_animation_flags_exec;
+       ot->exec= sound_update_animation_flags_exec;
 
        /* flags */
        ot->flag= OPTYPE_REGISTER;
@@ -675,14 +675,14 @@ static void SOUND_OT_update_animation_flags(wmOperatorType *ot)
 
 /* ******************************************************* */
 
-static int bake_animation_exec(bContext *C, wmOperator *UNUSED(op))
+static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Main* bmain = CTX_data_main(C);
        Scene* scene = CTX_data_scene(C);
        int oldfra = scene->r.cfra;
        int cfra;
 
-       update_animation_flags_exec(C, NULL);
+       sound_update_animation_flags_exec(C, NULL);
 
        for(cfra = scene->r.sfra > 0 ? scene->r.sfra - 1 : 0; cfra <= scene->r.efra + 1; cfra++)
        {
@@ -704,7 +704,7 @@ static void SOUND_OT_bake_animation(wmOperatorType *ot)
        ot->idname= "SOUND_OT_bake_animation";
 
        /* api callbacks */
-       ot->exec= bake_animation_exec;
+       ot->exec= sound_bake_animation_exec;
 
        /* flags */
        ot->flag= OPTYPE_REGISTER;
index 9ac9f73..2331661 100644 (file)
@@ -282,7 +282,7 @@ static int console_line_insert(ConsoleLine *ci, char *str)
 /* static funcs for text editing */
 
 /* similar to the text editor, with some not used. keep compatible */
-static EnumPropertyItem move_type_items[]= {
+static EnumPropertyItem console_move_type_items[]= {
        {LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""},
        {LINE_END, "LINE_END", 0, "Line End", ""},
        {PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
@@ -291,7 +291,7 @@ static EnumPropertyItem move_type_items[]= {
        {NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
        {0, NULL, 0, NULL, NULL}};
 
-static int move_exec(bContext *C, wmOperator *op)
+static int console_move_exec(bContext *C, wmOperator *op)
 {
        ConsoleLine *ci= console_history_verify(C);
        
@@ -364,15 +364,15 @@ void CONSOLE_OT_move(wmOperatorType *ot)
        ot->idname= "CONSOLE_OT_move";
        
        /* api callbacks */
-       ot->exec= move_exec;
+       ot->exec= console_move_exec;
        ot->poll= ED_operator_console_active;
 
        /* properties */
-       RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to");
+       RNA_def_enum(ot->srna, "type", console_move_type_items, LINE_BEGIN, "Type", "Where to move cursor to");
 }
 
 #define TAB_LENGTH 4
-static int insert_exec(bContext *C, wmOperator *op)
+static int console_insert_exec(bContext *C, wmOperator *op)
 {
        SpaceConsole *sc= CTX_wm_space_console(C);
        ARegion *ar= CTX_wm_region(C);
@@ -408,7 +408,7 @@ static int insert_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int console_insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        // if(!RNA_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */
        if(!RNA_string_length(op->ptr, "text")) {
@@ -424,7 +424,7 @@ static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
                        RNA_string_set(op->ptr, "text", str);
                }
        }
-       return insert_exec(C, op);
+       return console_insert_exec(C, op);
 }
 
 void CONSOLE_OT_insert(wmOperatorType *ot)
@@ -435,8 +435,8 @@ void CONSOLE_OT_insert(wmOperatorType *ot)
        ot->idname= "CONSOLE_OT_insert";
        
        /* api callbacks */
-       ot->exec= insert_exec;
-       ot->invoke= insert_invoke;
+       ot->exec= console_insert_exec;
+       ot->invoke= console_insert_invoke;
        ot->poll= ED_operator_console_active;
 
        /* properties */
@@ -444,14 +444,14 @@ void CONSOLE_OT_insert(wmOperatorType *ot)
 }
 
 
-static EnumPropertyItem delete_type_items[]= {
+static EnumPropertyItem console_delete_type_items[]= {
        {DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
        {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
 //     {DEL_NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
 //     {DEL_PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""},
        {0, NULL, 0, NULL, NULL}};
 
-static int delete_exec(bContext *C, wmOperator *op)
+static int console_delete_exec(bContext *C, wmOperator *op)
 {
        SpaceConsole *sc= CTX_wm_space_console(C);
        ARegion *ar= CTX_wm_region(C);
@@ -506,16 +506,16 @@ void CONSOLE_OT_delete(wmOperatorType *ot)
        ot->idname= "CONSOLE_OT_delete";
        
        /* api callbacks */
-       ot->exec= delete_exec;
+       ot->exec= console_delete_exec;
        ot->poll= ED_operator_console_active;
 
        /* properties */
-       RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete");
+       RNA_def_enum(ot->srna, "type", console_delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete");
 }
 
 
 /* the python exec operator uses this */
-static int clear_exec(bContext *C, wmOperator *op)
+static int console_clear_exec(bContext *C, wmOperator *op)
 {
        SpaceConsole *sc= CTX_wm_space_console(C);
        ARegion *ar= CTX_wm_region(C);
@@ -549,7 +549,7 @@ void CONSOLE_OT_clear(wmOperatorType *ot)
        ot->idname= "CONSOLE_OT_clear";
        
        /* api callbacks */
-       ot->exec= clear_exec;
+       ot->exec= console_clear_exec;
        ot->poll= ED_operator_console_active;
        
        /* properties */
@@ -560,7 +560,7 @@ void CONSOLE_OT_clear(wmOperatorType *ot)
 
 
 /* the python exec operator uses this */
-static int history_cycle_exec(bContext *C, wmOperator *op)
+static int console_history_cycle_exec(bContext *C, wmOperator *op)
 {
        SpaceConsole *sc= CTX_wm_space_console(C);
        ARegion *ar= CTX_wm_region(C);
@@ -617,7 +617,7 @@ void CONSOLE_OT_history_cycle(wmOperatorType *ot)
        ot->idname= "CONSOLE_OT_history_cycle";
        
        /* api callbacks */
-       ot->exec= history_cycle_exec;
+       ot->exec= console_history_cycle_exec;
        ot->poll= ED_operator_console_active;
        
        /* properties */
@@ -626,7 +626,7 @@ void CONSOLE_OT_history_cycle(wmOperatorType *ot)
 
 
 /* the python exec operator uses this */
-static int history_append_exec(bContext *C, wmOperator *op)
+static int console_history_append_exec(bContext *C, wmOperator *op)
 {
        SpaceConsole *sc= CTX_wm_space_console(C);
        ARegion *ar= CTX_wm_region(C);
@@ -668,7 +668,7 @@ void CONSOLE_OT_history_append(wmOperatorType *ot)
        ot->idname= "CONSOLE_OT_history_append";
        
        /* api callbacks */
-       ot->exec= history_append_exec;
+       ot->exec= console_history_append_exec;
        ot->poll= ED_operator_console_active;
        
        /* properties */
@@ -679,7 +679,7 @@ void CONSOLE_OT_history_append(wmOperatorType *ot)
 
 
 /* the python exec operator uses this */
-static int scrollback_append_exec(bContext *C, wmOperator *op)
+static int console_scrollback_append_exec(bContext *C, wmOperator *op)
 {
        SpaceConsole *sc= CTX_wm_space_console(C);
        ARegion *ar= CTX_wm_region(C);
@@ -722,7 +722,7 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot)
        ot->idname= "CONSOLE_OT_scrollback_append";
        
        /* api callbacks */
-       ot->exec= scrollback_append_exec;
+       ot->exec= console_scrollback_append_exec;
        ot->poll= ED_operator_console_active;
        
        /* properties */
@@ -731,7 +731,7 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot)
 }
 
 
-static int copy_exec(bContext *C, wmOperator *UNUSED(op))
+static int console_copy_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceConsole *sc= CTX_wm_space_console(C);
 
@@ -806,12 +806,12 @@ void CONSOLE_OT_copy(wmOperatorType *ot)
 
        /* api callbacks */
        ot->poll= ED_operator_console_active;
-       ot->exec= copy_exec;
+       ot->exec= console_copy_exec;
 
        /* properties */
 }
 
-static int paste_exec(bContext *C, wmOperator *UNUSED(op))
+static int console_paste_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceConsole *sc= CTX_wm_space_console(C);
        ARegion *ar= CTX_wm_region(C);
@@ -859,7 +859,7 @@ void CONSOLE_OT_paste(wmOperatorType *ot)
 
        /* api callbacks */
        ot->poll= ED_operator_console_active;
-       ot->exec= paste_exec;
+       ot->exec= console_paste_exec;
 
        /* properties */
 }
@@ -870,7 +870,7 @@ typedef struct SetConsoleCursor {
 } SetConsoleCursor;
 
 // TODO, cursor placement without selection
-static void set_cursor_to_pos(SpaceConsole *sc, ARegion *ar, SetConsoleCursor *scu, int mval[2], int UNUSED(sel))
+static void console_cursor_set_to_pos(SpaceConsole *sc, ARegion *ar, SetConsoleCursor *scu, int mval[2], int UNUSED(sel))
 {
        int pos;
        pos= console_char_pick(sc, ar, mval);
@@ -908,7 +908,7 @@ static void console_modal_select_apply(bContext *C, wmOperator *op, wmEvent *eve
        sel_prev[0]= sc->sel_start;
        sel_prev[1]= sc->sel_end;
        
-       set_cursor_to_pos(sc, ar, scu, mval, TRUE);
+       console_cursor_set_to_pos(sc, ar, scu, mval, TRUE);
 
        /* only redraw if the selection changed */
        if(sel_prev[0] != sc->sel_start || sel_prev[1] != sc->sel_end) {
@@ -916,7 +916,7 @@ static void console_modal_select_apply(bContext *C, wmOperator *op, wmEvent *eve
        }
 }
 
-static void set_cursor_exit(bContext *UNUSED(C), wmOperator *op)
+static void console_cursor_set_exit(bContext *UNUSED(C), wmOperator *op)
 {
 //     SpaceConsole *sc= CTX_wm_space_console(C);
        SetConsoleCursor *scu= op->customdata;
@@ -958,7 +958,7 @@ static int console_modal_select(bContext *C, wmOperator *op, wmEvent *event)
                case LEFTMOUSE:
                case MIDDLEMOUSE:
                case RIGHTMOUSE:
-                       set_cursor_exit(C, op);
+                       console_cursor_set_exit(C, op);
                        return OPERATOR_FINISHED;
                case MOUSEMOVE:
                        console_modal_select_apply(C, op, event);
@@ -970,7 +970,7 @@ static int console_modal_select(bContext *C, wmOperator *op, wmEvent *event)
 
 static int console_modal_select_cancel(bContext *C, wmOperator *op)
 {
-       set_cursor_exit(C, op);
+       console_cursor_set_exit(C, op);
        return OPERATOR_FINISHED;
 }
 
index f5164dc..194a8bd 100644 (file)
@@ -177,7 +177,7 @@ typedef struct ViewPanData {
        int event_type;
 } ViewPanData;
 
-static void view_pan_init(bContext *C, wmOperator *op, wmEvent *event)
+static void image_view_pan_init(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        ViewPanData *vpd;
@@ -194,7 +194,7 @@ static void view_pan_init(bContext *C, wmOperator *op, wmEvent *event)
        WM_event_add_modal_handler(C, op);
 }
 
-static void view_pan_exit(bContext *C, wmOperator *op, int cancel)
+static void image_view_pan_exit(bContext *C, wmOperator *op, int cancel)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        ViewPanData *vpd= op->customdata;
@@ -209,7 +209,7 @@ static void view_pan_exit(bContext *C, wmOperator *op, int cancel)
        MEM_freeN(op->customdata);
 }
 
-static int view_pan_exec(bContext *C, wmOperator *op)
+static int image_view_pan_exec(bContext *C, wmOperator *op)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        float offset[2];
@@ -232,7 +232,7 @@ static int view_pan_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-static int view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int image_view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        if (event->type == MOUSEPAN) {
                SpaceImage *sima= CTX_wm_space_image(C);
@@ -242,16 +242,16 @@ static int view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event)
                offset[1]= (event->y - event->prevy)/sima->zoom;
                RNA_float_set_array(op->ptr, "offset", offset);
 
-               view_pan_exec(C, op);
+               image_view_pan_exec(C, op);
                return OPERATOR_FINISHED;
        }
        else {
-               view_pan_init(C, op, event);
+               image_view_pan_init(C, op, event);
                return OPERATOR_RUNNING_MODAL;
        }
 }
 
-static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
+static int image_view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        ViewPanData *vpd= op->customdata;
@@ -264,11 +264,11 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
                        offset[0]= (vpd->x - event->x)/sima->zoom;
                        offset[1]= (vpd->y - event->y)/sima->zoom;
                        RNA_float_set_array(op->ptr, "offset", offset);
-                       view_pan_exec(C, op);
+                       image_view_pan_exec(C, op);
                        break;
                default:
                        if(event->type==vpd->event_type &&  event->val==KM_RELEASE) {
-                               view_pan_exit(C, op, 0);
+                               image_view_pan_exit(C, op, 0);
                                return OPERATOR_FINISHED;
                        }
                        break;
@@ -277,9 +277,9 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
        return OPERATOR_RUNNING_MODAL;
 }
 
-static int view_pan_cancel(bContext *C, wmOperator *op)
+static int image_view_pan_cancel(bContext *C, wmOperator *op)
 {
-       view_pan_exit(C, op, 1);
+       image_view_pan_exit(C, op, 1);
        return OPERATOR_CANCELLED;
 }
 
@@ -290,10 +290,10 @@ void IMAGE_OT_view_pan(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_view_pan";
        
        /* api callbacks */
-       ot->exec= view_pan_exec;
-       ot->invoke= view_pan_invoke;
-       ot->modal= view_pan_modal;
-       ot->cancel= view_pan_cancel;
+       ot->exec= image_view_pan_exec;
+       ot->invoke= image_view_pan_invoke;
+       ot->modal= image_view_pan_modal;
+       ot->cancel= image_view_pan_cancel;
        ot->poll= space_image_main_area_poll;
 
        /* flags */
@@ -312,7 +312,7 @@ typedef struct ViewZoomData {
        int event_type;
 } ViewZoomData;
 
-static void view_zoom_init(bContext *C, wmOperator *op, wmEvent *event)
+static void image_view_zoom_init(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        ViewZoomData *vpd;
@@ -328,7 +328,7 @@ static void view_zoom_init(bContext *C, wmOperator *op, wmEvent *event)
        WM_event_add_modal_handler(C, op);
 }
 
-static void view_zoom_exit(bContext *C, wmOperator *op, int cancel)
+static void image_view_zoom_exit(bContext *C, wmOperator *op, int cancel)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        ViewZoomData *vpd= op->customdata;
@@ -342,7 +342,7 @@ static void view_zoom_exit(bContext *C, wmOperator *op, int cancel)
        MEM_freeN(op->customdata);
 }
 
-static int view_zoom_exec(bContext *C, wmOperator *op)
+static int image_view_zoom_exec(bContext *C, wmOperator *op)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        ARegion *ar= CTX_wm_region(C);
@@ -363,7 +363,7 @@ static int view_zoom_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-static int view_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int image_view_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        if (event->type == MOUSEZOOM) {
                SpaceImage *sima= CTX_wm_space_image(C);
@@ -378,12 +378,12 @@ static int view_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event)
                return OPERATOR_FINISHED;
        }
        else {
-               view_zoom_init(C, op, event);
+               image_view_zoom_init(C, op, event);
                return OPERATOR_RUNNING_MODAL;
        }
 }
 
-static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
+static int image_view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        ARegion *ar= CTX_wm_region(C);
@@ -399,7 +399,7 @@ static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
                        break;
                default:
                        if(event->type==vpd->event_type && event->val==KM_RELEASE) {
-                               view_zoom_exit(C, op, 0);
+                               image_view_zoom_exit(C, op, 0);
                                return OPERATOR_FINISHED;
                        }
                        break;
@@ -408,9 +408,9 @@ static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
        return OPERATOR_RUNNING_MODAL;
 }
 
-static int view_zoom_cancel(bContext *C, wmOperator *op)
+static int image_view_zoom_cancel(bContext *C, wmOperator *op)
 {
-       view_zoom_exit(C, op, 1);
+       image_view_zoom_exit(C, op, 1);
        return OPERATOR_CANCELLED;
 }
 
@@ -421,10 +421,10 @@ void IMAGE_OT_view_zoom(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_view_zoom";
        
        /* api callbacks */
-       ot->exec= view_zoom_exec;
-       ot->invoke= view_zoom_invoke;
-       ot->modal= view_zoom_modal;
-       ot->cancel= view_zoom_cancel;
+       ot->exec= image_view_zoom_exec;
+       ot->invoke= image_view_zoom_invoke;
+       ot->modal= image_view_zoom_modal;
+       ot->cancel= image_view_zoom_cancel;
        ot->poll= space_image_main_area_poll;
 
        /* flags */
@@ -443,7 +443,7 @@ void IMAGE_OT_view_zoom(wmOperatorType *ot)
  * that explains the negative signs in the code below
  */
 
-static int view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
+static int image_view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
 {
        if (event->type != NDOF_MOTION)
                return OPERATOR_CANCELLED;
@@ -489,7 +489,7 @@ void IMAGE_OT_view_ndof(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_view_ndof";
        
        /* api callbacks */
-       ot->invoke= view_ndof_invoke;
+       ot->invoke= image_view_ndof_invoke;
 }
 
 /********************** view all operator *********************/
@@ -498,7 +498,7 @@ void IMAGE_OT_view_ndof(wmOperatorType *ot)
  * Default behavior is to reset the position of the image and set the zoom to 1
  * If the image will not fit within the window rectangle, the zoom is adjusted */
 
-static int view_all_exec(bContext *C, wmOperator *UNUSED(op))
+static int image_view_all_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceImage *sima;
        ARegion *ar;
@@ -542,13 +542,13 @@ void IMAGE_OT_view_all(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_view_all";
        
        /* api callbacks */
-       ot->exec= view_all_exec;
+       ot->exec= image_view_all_exec;
        ot->poll= space_image_main_area_poll;
 }
 
 /********************** view selected operator *********************/
 
-static int view_selected_exec(bContext *C, wmOperator *UNUSED(op))
+static int image_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceImage *sima;
        ARegion *ar;
@@ -591,7 +591,7 @@ static int view_selected_exec(bContext *C, wmOperator *UNUSED(op))
        return OPERATOR_FINISHED;
 }
 
-static int view_selected_poll(bContext *C)
+static int image_view_selected_poll(bContext *C)
 {
        return (space_image_main_area_poll(C) && ED_operator_uvedit(C));
 }
@@ -603,13 +603,13 @@ void IMAGE_OT_view_selected(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_view_selected";
        
        /* api callbacks */
-       ot->exec= view_selected_exec;
-       ot->poll= view_selected_poll;
+       ot->exec= image_view_selected_exec;
+       ot->poll= image_view_selected_poll;
 }
 
 /********************** view zoom in/out operator *********************/
 
-static int view_zoom_in_exec(bContext *C, wmOperator *UNUSED(op))
+static int image_view_zoom_in_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        ARegion *ar= CTX_wm_region(C);
@@ -628,11 +628,11 @@ void IMAGE_OT_view_zoom_in(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_view_zoom_in";
        
        /* api callbacks */
-       ot->exec= view_zoom_in_exec;
+       ot->exec= image_view_zoom_in_exec;
        ot->poll= space_image_main_area_poll;
 }
 
-static int view_zoom_out_exec(bContext *C, wmOperator *UNUSED(op))
+static int image_view_zoom_out_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        ARegion *ar= CTX_wm_region(C);
@@ -651,13 +651,13 @@ void IMAGE_OT_view_zoom_out(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_view_zoom_out";
        
        /* api callbacks */
-       ot->exec= view_zoom_out_exec;
+       ot->exec= image_view_zoom_out_exec;
        ot->poll= space_image_main_area_poll;
 }
 
 /********************** view zoom ratio operator *********************/
 
-static int view_zoom_ratio_exec(bContext *C, wmOperator *op)
+static int image_view_zoom_ratio_exec(bContext *C, wmOperator *op)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        ARegion *ar= CTX_wm_region(C);
@@ -689,7 +689,7 @@ void IMAGE_OT_view_zoom_ratio(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_view_zoom_ratio";
        
        /* api callbacks */
-       ot->exec= view_zoom_ratio_exec;
+       ot->exec= image_view_zoom_ratio_exec;
        ot->poll= space_image_main_area_poll;
        
        /* properties */
@@ -740,7 +740,7 @@ static void image_filesel(bContext *C, wmOperator *op, const char *path)
 
 /******************** open image operator ********************/
 
-static void open_init(bContext *C, wmOperator *op)
+static void image_open_init(bContext *C, wmOperator *op)
 {
        PropertyPointerRNA *pprop;
 
@@ -748,14 +748,14 @@ static void open_init(bContext *C, wmOperator *op)
        uiIDContextProperty(C, &pprop->ptr, &pprop->prop);
 }
 
-static int open_cancel(bContext *UNUSED(C), wmOperator *op)
+static int image_open_cancel(bContext *UNUSED(C), wmOperator *op)
 {
        MEM_freeN(op->customdata);
        op->customdata= NULL;
        return OPERATOR_CANCELLED;
 }
 
-static int open_exec(bContext *C, wmOperator *op)
+static int image_open_exec(bContext *C, wmOperator *op)
 {
        SpaceImage *sima= CTX_wm_space_image(C); /* XXX other space types can call */
        Scene *scene= CTX_data_scene(C);
@@ -780,7 +780,7 @@ static int open_exec(bContext *C, wmOperator *op)
        }
        
        if(!op->customdata)
-               open_init(C, op);
+               image_open_init(C, op);
 
        /* hook into UI */
        pprop= op->customdata;
@@ -823,7 +823,7 @@ static int open_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int image_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
 {
        SpaceImage *sima= CTX_wm_space_image(C); /* XXX other space types can call */
        char *path=U.textudir;
@@ -843,9 +843,9 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
                path= ima->name;
 
        if(RNA_property_is_set(op->ptr, "filepath"))
-               return open_exec(C, op);
+               return image_open_exec(C, op);
        
-       open_init(C, op);
+       image_open_init(C, op);
 
        image_filesel(C, op, path);
 
@@ -861,9 +861,9 @@ void IMAGE_OT_open(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_open";
        
        /* api callbacks */
-       ot->exec= open_exec;
-       ot->invoke= open_invoke;
-       ot->cancel= open_cancel;
+       ot->exec= image_open_exec;
+       ot->invoke= image_open_invoke;
+       ot->cancel= image_open_cancel;
 
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -874,7 +874,7 @@ void IMAGE_OT_open(wmOperatorType *ot)
 
 /******************** replace image operator ********************/
 
-static int replace_exec(bContext *C, wmOperator *op)
+static int image_replace_exec(bContext *C, wmOperator *op)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        char str[FILE_MAX];
@@ -894,7 +894,7 @@ static int replace_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-static int replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int image_replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
 {
        SpaceImage *sima= CTX_wm_space_image(C);
 
@@ -902,7 +902,7 @@ static int replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
                return OPERATOR_CANCELLED;
 
        if(RNA_property_is_set(op->ptr, "filepath"))
-               return replace_exec(C, op);
+               return image_replace_exec(C, op);
 
        if(!RNA_property_is_set(op->ptr, "relative_path"))
                RNA_boolean_set(op->ptr, "relative_path", (strncmp(sima->image->name, "//", 2))==0);
@@ -919,8 +919,8 @@ void IMAGE_OT_replace(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_replace";
        
        /* api callbacks */
-       ot->exec= replace_exec;
-       ot->invoke= replace_invoke;
+       ot->exec= image_replace_exec;
+       ot->invoke= image_replace_invoke;
        ot->poll= space_image_poll;
 
        /* flags */
@@ -1127,7 +1127,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
        ED_space_image_release_buffer(sima, lock);
 }
 
-static int save_as_exec(bContext *C, wmOperator *op)
+static int image_save_as_exec(bContext *C, wmOperator *op)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        SaveImageOptions simopts;
@@ -1143,7 +1143,7 @@ static int save_as_exec(bContext *C, wmOperator *op)
 }
 
 
-static int save_as_check(bContext *UNUSED(C), wmOperator *op)
+static int image_save_as_check(bContext *UNUSED(C), wmOperator *op)
 {
        char filepath[FILE_MAX];
        RNA_string_get(op->ptr, "filepath", filepath);
@@ -1154,7 +1154,7 @@ static int save_as_check(bContext *UNUSED(C), wmOperator *op)
        return FALSE;
 }
 
-static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int image_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        Image *ima = ED_space_image(sima);
@@ -1162,7 +1162,7 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
        SaveImageOptions simopts;
 
        if(RNA_property_is_set(op->ptr, "filepath"))
-               return save_as_exec(C, op);
+               return image_save_as_exec(C, op);
 
        if (save_image_options_init(&simopts, sima, scene, TRUE) == 0)
                return OPERATOR_CANCELLED;
@@ -1188,9 +1188,9 @@ void IMAGE_OT_save_as(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_save_as";
        
        /* api callbacks */
-       ot->exec= save_as_exec;
-       ot->check= save_as_check;
-       ot->invoke= save_as_invoke;
+       ot->exec= image_save_as_exec;
+       ot->check= image_save_as_check;
+       ot->invoke= image_save_as_invoke;
        ot->poll= space_image_buffer_exists_poll;
 
        /* flags */
@@ -1211,7 +1211,7 @@ void IMAGE_OT_save_as(wmOperatorType *ot)
 
 /******************** save image operator ********************/
 
-static int save_exec(bContext *C, wmOperator *op)
+static int image_save_exec(bContext *C, wmOperator *op)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        Scene *scene= CTX_data_scene(C);
@@ -1239,7 +1239,7 @@ void IMAGE_OT_save(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_save";
        
        /* api callbacks */
-       ot->exec= save_exec;
+       ot->exec= image_save_exec;
        ot->poll= space_image_file_exists_poll;
 
        /* flags */
@@ -1248,7 +1248,7 @@ void IMAGE_OT_save(wmOperatorType *ot)
 
 /******************* save sequence operator ********************/
 
-static int save_sequence_exec(bContext *C, wmOperator *op)
+static int image_save_sequence_exec(bContext *C, wmOperator *op)
 {
        Main *bmain= CTX_data_main(C);
        SpaceImage *sima= CTX_wm_space_image(C);
@@ -1316,7 +1316,7 @@ void IMAGE_OT_save_sequence(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_save_sequence";
        
        /* api callbacks */
-       ot->exec= save_sequence_exec;
+       ot->exec= image_save_sequence_exec;
        ot->poll= space_image_buffer_exists_poll;
 
        /* flags */
@@ -1325,7 +1325,7 @@ void IMAGE_OT_save_sequence(wmOperatorType *ot)
 
 /******************** reload image operator ********************/
 
-static int reload_exec(bContext *C, wmOperator *UNUSED(op))
+static int image_reload_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Image *ima= CTX_data_edit_image(C);
        SpaceImage *sima= CTX_wm_space_image(C);
@@ -1351,7 +1351,7 @@ void IMAGE_OT_reload(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_reload";
        
        /* api callbacks */
-       ot->exec= reload_exec;
+       ot->exec= image_reload_exec;
 
        /* flags */
        ot->flag= OPTYPE_REGISTER; /* no undo, image buffer is not handled by undo */
@@ -1538,7 +1538,7 @@ void IMAGE_OT_invert(wmOperatorType *ot)
 
 /********************* pack operator *********************/
 
-static int pack_test(bContext *C, wmOperator *op)
+static int image_pack_test(bContext *C, wmOperator *op)
 {
        Image *ima= CTX_data_edit_image(C);
        int as_png= RNA_boolean_get(op->ptr, "as_png");
@@ -1556,14 +1556,14 @@ static int pack_test(bContext *C, wmOperator *op)
        return 1;
 }
 
-static int pack_exec(bContext *C, wmOperator *op)
+static int image_pack_exec(bContext *C, wmOperator *op)
 {
        struct Main *bmain= CTX_data_main(C);
        Image *ima= CTX_data_edit_image(C);
        ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
        int as_png= RNA_boolean_get(op->ptr, "as_png");
 
-       if(!pack_test(C, op))
+       if(!image_pack_test(C, op))
                return OPERATOR_CANCELLED;
        
        if(!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) {
@@ -1581,7 +1581,7 @@ static int pack_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-static int pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int image_pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
 {
        Image *ima= CTX_data_edit_image(C);
        ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
@@ -1589,7 +1589,7 @@ static int pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
        uiLayout *layout;
        int as_png= RNA_boolean_get(op->ptr, "as_png");
 
-       if(!pack_test(C, op))
+       if(!image_pack_test(C, op))
                return OPERATOR_CANCELLED;
        
        if(!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) {
@@ -1601,7 +1601,7 @@ static int pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
                return OPERATOR_CANCELLED;
        }
 
-       return pack_exec(C, op);
+       return image_pack_exec(C, op);
 }
 
 void IMAGE_OT_pack(wmOperatorType *ot)
@@ -1612,8 +1612,8 @@ void IMAGE_OT_pack(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_pack";
        
        /* api callbacks */
-       ot->exec= pack_exec;
-       ot->invoke= pack_invoke;
+       ot->exec= image_pack_exec;
+       ot->invoke= image_pack_invoke;
 
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1721,7 +1721,7 @@ typedef struct ImageSampleInfo {
        int draw;
 } ImageSampleInfo;
 
-static void sample_draw(const bContext *UNUSED(C), ARegion *ar, void *arg_info)
+static void image_sample_draw(const bContext *UNUSED(C), ARegion *ar, void *arg_info)
 {
        ImageSampleInfo *info= arg_info;
        if(info->draw) {
@@ -1730,7 +1730,7 @@ static void sample_draw(const bContext *UNUSED(C), ARegion *ar, void *arg_info)
        }
 }
 
-static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
+static void image_sample_apply(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        ARegion *ar= CTX_wm_region(C);
@@ -1840,7 +1840,7 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
        ED_area_tag_redraw(CTX_wm_area(C));
 }
 
-static void sample_exit(bContext *C, wmOperator *op)
+static void image_sample_exit(bContext *C, wmOperator *op)
 {
        ImageSampleInfo *info= op->customdata;
 
@@ -1849,7 +1849,7 @@ static void sample_exit(bContext *C, wmOperator *op)
        MEM_freeN(info);
 }
 
-static int sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int image_sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        ARegion *ar= CTX_wm_region(C);
@@ -1860,34 +1860,34 @@ static int sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
        
        info= MEM_callocN(sizeof(ImageSampleInfo), "ImageSampleInfo");
        info->art= ar->type;
-       info->draw_handle = ED_region_draw_cb_activate(ar->type, sample_draw, info, REGION_DRAW_POST_PIXEL);
+       info->draw_handle = ED_region_draw_cb_activate(ar->type, image_sample_draw, info, REGION_DRAW_POST_PIXEL);
        op->customdata= info;
 
-       sample_apply(C, op, event);
+       image_sample_apply(C, op, event);
 
        WM_event_add_modal_handler(C, op);
 
        return OPERATOR_RUNNING_MODAL;
 }
 
-static int sample_modal(bContext *C, wmOperator *op, wmEvent *event)
+static int image_sample_modal(bContext *C, wmOperator *op, wmEvent *event)
 {
        switch(event->type) {
                case LEFTMOUSE:
                case RIGHTMOUSE: // XXX hardcoded
-                       sample_exit(C, op);
+                       image_sample_exit(C, op);
                        return OPERATOR_CANCELLED;
                case MOUSEMOVE:
-                       sample_apply(C, op, event);
+                       image_sample_apply(C, op, event);
                        break;
        }
 
        return OPERATOR_RUNNING_MODAL;
 }
 
-static int sample_cancel(bContext *C, wmOperator *op)
+static int image_sample_cancel(bContext *C, wmOperator *op)
 {
-       sample_exit(C, op);
+       image_sample_exit(C, op);
        return OPERATOR_CANCELLED;
 }
 
@@ -1898,9 +1898,9 @@ void IMAGE_OT_sample(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_sample";
        
        /* api callbacks */
-       ot->invoke= sample_invoke;
-       ot->modal= sample_modal;
-       ot->cancel= sample_cancel;
+       ot->invoke= image_sample_invoke;
+       ot->modal= image_sample_modal;
+       ot->cancel= image_sample_cancel;
        ot->poll= space_image_main_area_poll;
 
        /* flags */
@@ -1908,7 +1908,7 @@ void IMAGE_OT_sample(wmOperatorType *ot)
 }
 
 /******************** sample line operator ********************/
-static int sample_line_exec(bContext *C, wmOperator *op)
+static int image_sample_line_exec(bContext *C, wmOperator *op)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        ARegion *ar= CTX_wm_region(C);
@@ -1989,7 +1989,7 @@ static int sample_line_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-static int sample_line_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int image_sample_line_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        
@@ -2006,9 +2006,9 @@ void IMAGE_OT_sample_line(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_sample_line";
        
        /* api callbacks */
-       ot->invoke= sample_line_invoke;
+       ot->invoke= image_sample_line_invoke;
        ot->modal= WM_gesture_straightline_modal;
-       ot->exec= sample_line_exec;
+       ot->exec= image_sample_line_exec;
        ot->poll= space_image_main_area_poll;
        ot->cancel= WM_gesture_straightline_cancel;
        
@@ -2035,9 +2035,9 @@ void IMAGE_OT_curves_point_set(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* api callbacks */
-       ot->invoke= sample_invoke;
-       ot->modal= sample_modal;
-       ot->cancel= sample_cancel;
+       ot->invoke= image_sample_invoke;
+       ot->modal= image_sample_modal;
+       ot->cancel= image_sample_cancel;
        ot->poll= space_image_main_area_poll;
 
        /* properties */
@@ -2052,7 +2052,7 @@ typedef struct RecordCompositeData {
        int sfra, efra;
 } RecordCompositeData;
 
-static int record_composite_apply(bContext *C, wmOperator *op)
+static int image_record_composite_apply(bContext *C, wmOperator *op)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        RecordCompositeData *rcd= op->customdata;
@@ -2080,7 +2080,7 @@ static int record_composite_apply(bContext *C, wmOperator *op)
        return (scene->r.cfra <= rcd->efra);
 }
 
-static int record_composite_init(bContext *C, wmOperator *op)
+static int image_record_composite_init(bContext *C, wmOperator *op)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        Scene *scene= CTX_data_scene(C);
@@ -2101,7 +2101,7 @@ static int record_composite_init(bContext *C, wmOperator *op)
        return 1;
 }
 
-static void record_composite_exit(bContext *C, wmOperator *op)
+static void image_record_composite_exit(bContext *C, wmOperator *op)
 {
        Scene *scene= CTX_data_scene(C);
        SpaceImage *sima= CTX_wm_space_image(C);
@@ -2122,60 +2122,60 @@ static void record_composite_exit(bContext *C, wmOperator *op)
        MEM_freeN(rcd);
 }
 
-static int record_composite_exec(bContext *C, wmOperator *op)
+static int image_record_composite_exec(bContext *C, wmOperator *op)
 {
-       if(!record_composite_init(C, op))
+       if(!image_record_composite_init(C, op))
                return OPERATOR_CANCELLED;
        
-       while(record_composite_apply(C, op))
+       while(image_record_composite_apply(C, op))
                ;
        
-       record_composite_exit(C, op);
+       image_record_composite_exit(C, op);
        
        return OPERATOR_FINISHED;
 }
 
-static int record_composite_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int image_record_composite_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
 {
        RecordCompositeData *rcd;
        
-       if(!record_composite_init(C, op))
+       if(!image_record_composite_init(C, op))
                return OPERATOR_CANCELLED;
 
        rcd= op->customdata;
        rcd->timer= WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.0f);
        WM_event_add_modal_handler(C, op);
 
-       if(!record_composite_apply(C, op))
+       if(!image_record_composite_apply(C, op))
                return OPERATOR_FINISHED;
 
        return OPERATOR_RUNNING_MODAL;
 }
 
-static int record_composite_modal(bContext *C, wmOperator *op, wmEvent *event)
+static int image_record_composite_modal(bContext *C, wmOperator *op, wmEvent *event)
 {
        RecordCompositeData *rcd= op->customdata;
 
        switch(event->type) {
                case TIMER:
                        if(rcd->timer == event->customdata) {
-                               if(!record_composite_apply(C, op)) {
-                                       record_composite_exit(C, op);
+                               if(!image_record_composite_apply(C, op)) {
+                                       image_record_composite_exit(C, op);
                                        return OPERATOR_FINISHED;
                                }
                        }
                        break;
                case ESCKEY:
-                       record_composite_exit(C, op);
+                       image_record_composite_exit(C, op);
                        return OPERATOR_FINISHED;
        }
 
        return OPERATOR_RUNNING_MODAL;
 }
 
-static int record_composite_cancel(bContext *C, wmOperator *op)
+static int image_record_composite_cancel(bContext *C, wmOperator *op)
 {
-       record_composite_exit(C, op);
+       image_record_composite_exit(C, op);
        return OPERATOR_CANCELLED;
 }
 
@@ -2186,23 +2186,23 @@ void IMAGE_OT_record_composite(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_record_composite";
        
        /* api callbacks */
-       ot->exec= record_composite_exec;
-       ot->invoke= record_composite_invoke;
-       ot->modal= record_composite_modal;
-       ot->cancel= record_composite_cancel;
+       ot->exec= image_record_composite_exec;
+       ot->invoke= image_record_composite_invoke;
+       ot->modal= image_record_composite_modal;
+       ot->cancel= image_record_composite_cancel;
        ot->poll= space_image_buffer_exists_poll;
 }
 
 /********************* cycle render slot operator *********************/
 
-static int cycle_render_slot_poll(bContext *C)
+static int image_cycle_render_slot_poll(bContext *C)
 {
        Image *ima= CTX_data_edit_image(C);
 
        return (ima && ima->type == IMA_TYPE_R_RESULT);
 }
 
-static int cycle_render_slot_exec(bContext *C, wmOperator *op)
+static int image_cycle_render_slot_exec(bContext *C, wmOperator *op)
 {
        Image *ima= CTX_data_edit_image(C);
        int a, slot, cur= ima->render_slot;
@@ -2241,8 +2241,8 @@ void IMAGE_OT_cycle_render_slot(wmOperatorType *ot)
        ot->idname= "IMAGE_OT_cycle_render_slot";
        
        /* api callbacks */
-       ot->exec= cycle_render_slot_exec;
-       ot->poll= cycle_render_slot_poll;
+       ot->exec= image_cycle_render_slot_exec;
+       ot->poll= image_cycle_render_slot_poll;
 
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
index 7fde426..b8e53f7 100644 (file)
@@ -98,12 +98,12 @@ static ARegion *text_has_properties_region(ScrArea *sa)
        return arnew;
 }
 
-static int properties_poll(bContext *C)
+static int text_properties_poll(bContext *C)
 {
        return (CTX_wm_space_text(C) != NULL);
 }
 
-static int properties_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_properties_exec(bContext *C, wmOperator *UNUSED(op))
 {
        ScrArea *sa= CTX_wm_area(C);
        ARegion *ar= text_has_properties_region(sa);
@@ -122,8 +122,8 @@ void TEXT_OT_properties(wmOperatorType *ot)
        ot->idname= "TEXT_OT_properties";
        
        /* api callbacks */
-       ot->exec= properties_exec;
-       ot->poll= properties_poll;
+       ot->exec= text_properties_exec;
+       ot->poll= text_properties_poll;
 }
 
 /******************** XXX popup menus *******************/
index ffcf260..e36cdd3 100644 (file)
@@ -153,7 +153,7 @@ void text_update_edited(Text *text)
 
 /******************* new operator *********************/
 
-static int new_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_new_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceText *st= CTX_wm_space_text(C);
        Text *text;
@@ -196,7 +196,7 @@ void TEXT_OT_new(wmOperatorType *ot)
        
        /* api callbacks */
        ot->invoke= WM_operator_confirm;
-       ot->exec= new_exec;
+       ot->exec= text_new_exec;
        ot->poll= text_new_poll;
        
        /* flags */
@@ -205,7 +205,7 @@ void TEXT_OT_new(wmOperatorType *ot)
 
 /******************* open operator *********************/
 
-static void open_init(bContext *C, wmOperator *op)
+static void text_open_init(bContext *C, wmOperator *op)
 {
        PropertyPointerRNA *pprop;
 
@@ -213,13 +213,13 @@ static void open_init(bContext *C, wmOperator *op)
        uiIDContextProperty(C, &pprop->ptr, &pprop->prop);
 }
 
-static int open_cancel(bContext *UNUSED(C), wmOperator *op)
+static int text_open_cancel(bContext *UNUSED(C), wmOperator *op)
 {
        MEM_freeN(op->customdata);
        return OPERATOR_CANCELLED;
 }
 
-static int open_exec(bContext *C, wmOperator *op)
+static int text_open_exec(bContext *C, wmOperator *op)
 {
        SpaceText *st= CTX_wm_space_text(C);
        Text *text;
@@ -238,7 +238,7 @@ static int open_exec(bContext *C, wmOperator *op)
        }
 
        if(!op->customdata)
-               open_init(C, op);
+               text_open_init(C, op);
 
        /* hook into UI */
        pprop= op->customdata;
@@ -272,15 +272,15 @@ static int open_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int text_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
 {
        Text *text= CTX_data_edit_text(C);
        char *path= (text && text->name)? text->name: G.main->name;
 
        if(RNA_property_is_set(op->ptr, "filepath"))
-               return open_exec(C, op);
+               return text_open_exec(C, op);
        
-       open_init(C, op);
+       text_open_init(C, op);
        RNA_string_set(op->ptr, "filepath", path);
        WM_event_add_fileselect(C, op); 
 
@@ -295,9 +295,9 @@ void TEXT_OT_open(wmOperatorType *ot)
        ot->description= "Open a new text data block";
 
        /* api callbacks */
-       ot->exec= open_exec;
-       ot->invoke= open_invoke;
-       ot->cancel= open_cancel;
+       ot->exec= text_open_exec;
+       ot->invoke= text_open_invoke;
+       ot->cancel= text_open_cancel;
        ot->poll= text_new_poll;
 
        /* flags */
@@ -310,7 +310,7 @@ void TEXT_OT_open(wmOperatorType *ot)
 
 /******************* reload operator *********************/
 
-static int reload_exec(bContext *C, wmOperator *op)
+static int text_reload_exec(bContext *C, wmOperator *op)
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -340,7 +340,7 @@ void TEXT_OT_reload(wmOperatorType *ot)
        ot->description= "Reload active text data block from its file";
        
        /* api callbacks */
-       ot->exec= reload_exec;
+       ot->exec= text_reload_exec;
        ot->invoke= WM_operator_confirm;
        ot->poll= text_edit_poll;
 }
@@ -353,7 +353,7 @@ static int text_unlink_poll(bContext *C)
        return CTX_data_edit_text(C) != NULL;
 }
 
-static int unlink_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_unlink_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Main *bmain= CTX_data_main(C);
        SpaceText *st= CTX_wm_space_text(C);
@@ -390,7 +390,7 @@ void TEXT_OT_unlink(wmOperatorType *ot)
        ot->description= "Unlink active text data block";
        
        /* api callbacks */
-       ot->exec= unlink_exec;
+       ot->exec= text_unlink_exec;
        ot->invoke= WM_operator_confirm;
        ot->poll= text_unlink_poll;
        
@@ -400,7 +400,7 @@ void TEXT_OT_unlink(wmOperatorType *ot)
 
 /******************* make internal operator *********************/
 
-static int make_internal_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_make_internal_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -425,7 +425,7 @@ void TEXT_OT_make_internal(wmOperatorType *ot)
        ot->description= "Make active text file internal";
 
        /* api callbacks */
-       ot->exec= make_internal_exec;
+       ot->exec= text_make_internal_exec;
        ot->poll= text_edit_poll;
        
        /* flags */
@@ -434,7 +434,7 @@ void TEXT_OT_make_internal(wmOperatorType *ot)
 
 /******************* save operator *********************/
 
-static int save_poll(bContext *C)
+static int text_save_poll(bContext *C)
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -482,7 +482,7 @@ static void txt_write_file(Text *text, ReportList *reports)
                text->flags ^= TXT_ISDIRTY;
 }
 
-static int save_exec(bContext *C, wmOperator *op)
+static int text_save_exec(bContext *C, wmOperator *op)
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -502,13 +502,13 @@ void TEXT_OT_save(wmOperatorType *ot)
        ot->description= "Save active text data block";
 
        /* api callbacks */
-       ot->exec= save_exec;
-       ot->poll= save_poll;
+       ot->exec= text_save_exec;
+       ot->poll= text_save_poll;
 }
 
 /******************* save as operator *********************/
 
-static int save_as_exec(bContext *C, wmOperator *op)
+static int text_save_as_exec(bContext *C, wmOperator *op)
 {
        Text *text= CTX_data_edit_text(C);
        char str[FILE_MAX];
@@ -530,13 +530,13 @@ static int save_as_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int text_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
 {
        Text *text= CTX_data_edit_text(C);
        char *str;
 
        if(RNA_property_is_set(op->ptr, "filepath"))
-               return save_as_exec(C, op);
+               return text_save_as_exec(C, op);
 
        if(text->name)
                str= text->name;
@@ -559,8 +559,8 @@ void TEXT_OT_save_as(wmOperatorType *ot)
        ot->description= "Save active text file with options";
        
        /* api callbacks */
-       ot->exec= save_as_exec;
-       ot->invoke= save_as_invoke;
+       ot->exec= text_save_as_exec;
+       ot->invoke= text_save_as_invoke;
        ot->poll= text_edit_poll;
 
        /* properties */
@@ -569,12 +569,12 @@ void TEXT_OT_save_as(wmOperatorType *ot)
 
 /******************* run script operator *********************/
 
-static int run_script_poll(bContext *C)
+static int text_run_script_poll(bContext *C)
 {
        return (CTX_data_edit_text(C) != NULL);
 }
 
-static int run_script(bContext *C, ReportList *reports)
+static int text_run_script(bContext *C, ReportList *reports)
 {
 #ifdef WITH_PYTHON
        Text *text= CTX_data_edit_text(C);
@@ -608,7 +608,7 @@ static int run_script(bContext *C, ReportList *reports)
        return OPERATOR_CANCELLED;
 }
 
-static int run_script_exec(bContext *C, wmOperator *op)
+static int text_run_script_exec(bContext *C, wmOperator *op)
 {
 #ifndef WITH_PYTHON
        (void)C; /* unused */
@@ -617,7 +617,7 @@ static int run_script_exec(bContext *C, wmOperator *op)
 
        return OPERATOR_CANCELLED;
 #else
-       return run_script(C, op->reports);
+       return text_run_script(C, op->reports);
 #endif
 }
 
@@ -629,8 +629,8 @@ void TEXT_OT_run_script(wmOperatorType *ot)
        ot->description= "Run active script";
        
        /* api callbacks */
-       ot->poll= run_script_poll;
-       ot->exec= run_script_exec;
+       ot->poll= text_run_script_poll;
+       ot->exec= text_run_script_exec;
 
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -638,7 +638,7 @@ void TEXT_OT_run_script(wmOperatorType *ot)
 
 /******************* refresh pyconstraints operator *********************/
 
-static int refresh_pyconstraints_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
+static int text_refresh_pyconstraints_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
 {
 #ifdef WITH_PYTHON
 #if 0
@@ -689,7 +689,7 @@ void TEXT_OT_refresh_pyconstraints(wmOperatorType *ot)
        ot->description= "Refresh all pyconstraints";
        
        /* api callbacks */
-       ot->exec= refresh_pyconstraints_exec;
+       ot->exec= text_refresh_pyconstraints_exec;
        ot->poll= text_edit_poll;
 }
 
@@ -777,7 +777,7 @@ static char *txt_copy_selected(Text *text)
        return buf;
 }
 
-static int paste_exec(bContext *C, wmOperator *op)
+static int text_paste_exec(bContext *C, wmOperator *op)
 {
        Text *text= CTX_data_edit_text(C);
        char *buf;
@@ -800,7 +800,7 @@ static int paste_exec(bContext *C, wmOperator *op)
 
        /* run the script while editing, evil but useful */
        if(CTX_wm_space_text(C)->live_edit)
-               run_script(C, NULL);
+               text_run_script(C, NULL);
 
        return OPERATOR_FINISHED;
 }
@@ -813,7 +813,7 @@ void TEXT_OT_paste(wmOperatorType *ot)
        ot->description= "Paste text from clipboard";
        
        /* api callbacks */
-       ot->exec= paste_exec;
+       ot->exec= text_paste_exec;
        ot->poll= text_edit_poll;
        
        /* properties */
@@ -834,7 +834,7 @@ static void txt_copy_clipboard(Text *text)
        }
 }
 
-static int copy_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_copy_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -851,13 +851,13 @@ void TEXT_OT_copy(wmOperatorType *ot)
        ot->description= "Copy selected text to clipboard";
 
        /* api callbacks */
-       ot->exec= copy_exec;
+       ot->exec= text_copy_exec;
        ot->poll= text_edit_poll;
 }
 
 /******************* cut operator *********************/
 
-static int cut_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_cut_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -871,7 +871,7 @@ static int cut_exec(bContext *C, wmOperator *UNUSED(op))
 
        /* run the script while editing, evil but useful */
        if(CTX_wm_space_text(C)->live_edit)
-               run_script(C, NULL);
+               text_run_script(C, NULL);
 
        return OPERATOR_FINISHED;
 }
@@ -884,13 +884,13 @@ void TEXT_OT_cut(wmOperatorType *ot)
        ot->description= "Cut selected text to clipboard";
        
        /* api callbacks */
-       ot->exec= cut_exec;
+       ot->exec= text_cut_exec;
        ot->poll= text_edit_poll;
 }
 
 /******************* indent operator *********************/
 
-static int indent_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_indent_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -919,13 +919,13 @@ void TEXT_OT_indent(wmOperatorType *ot)
        ot->description= "Indent selected text";
        
        /* api callbacks */
-       ot->exec= indent_exec;
+       ot->exec= text_indent_exec;
        ot->poll= text_edit_poll;
 }
 
 /******************* unindent operator *********************/
 
-static int unindent_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_unindent_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -954,13 +954,13 @@ void TEXT_OT_unindent(wmOperatorType *ot)
        ot->description= "Unindent selected text";
        
        /* api callbacks */
-       ot->exec= unindent_exec;
+       ot->exec= text_unindent_exec;
        ot->poll= text_edit_poll;
 }
 
 /******************* line break operator *********************/
 
-static int line_break_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_line_break_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceText *st= CTX_wm_space_text(C);
        Text *text= CTX_data_edit_text(C);
@@ -1001,13 +1001,13 @@ void TEXT_OT_line_break(wmOperatorType *ot)
        ot->description= "Insert line break at cursor position";
        
        /* api callbacks */
-       ot->exec= line_break_exec;
+       ot->exec= text_line_break_exec;
        ot->poll= text_edit_poll;
 }
 
 /******************* comment operator *********************/
 
-static int comment_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_comment_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -1034,13 +1034,13 @@ void TEXT_OT_comment(wmOperatorType *ot)
        ot->description= "Convert selected text to comment";
        
        /* api callbacks */
-       ot->exec= comment_exec;
+       ot->exec= text_comment_exec;
        ot->poll= text_edit_poll;
 }
 
 /******************* uncomment operator *********************/
 
-static int uncomment_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_uncomment_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -1068,7 +1068,7 @@ void TEXT_OT_uncomment(wmOperatorType *ot)
        ot->description= "Convert selected comment to text";
        
        /* api callbacks */
-       ot->exec= uncomment_exec;
+       ot->exec= text_uncomment_exec;
        ot->poll= text_edit_poll;
 }
 
@@ -1080,7 +1080,7 @@ static EnumPropertyItem whitespace_type_items[]= {
        {TO_TABS, "TABS", 0, "To Tabs", NULL},
        {0, NULL, 0, NULL, NULL}};
 
-static int convert_whitespace_exec(bContext *C, wmOperator *op)
+static int text_convert_whitespace_exec(bContext *C, wmOperator *op)
 {
        SpaceText *st= CTX_wm_space_text(C);
        Text *text= CTX_data_edit_text(C);
@@ -1208,7 +1208,7 @@ void TEXT_OT_convert_whitespace(wmOperatorType *ot)
        ot->description= "Convert whitespaces by type";
        
        /* api callbacks */
-       ot->exec= convert_whitespace_exec;
+       ot->exec= text_convert_whitespace_exec;
        ot->poll= text_edit_poll;
 
        /* properties */
@@ -1217,7 +1217,7 @@ void TEXT_OT_convert_whitespace(wmOperatorType *ot)
 
 /******************* select all operator *********************/
 
-static int select_all_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_select_all_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -1237,13 +1237,13 @@ void TEXT_OT_select_all(wmOperatorType *ot)
        ot->description= "Select all text";
        
        /* api callbacks */
-       ot->exec= select_all_exec;
+       ot->exec= text_select_all_exec;
        ot->poll= text_edit_poll;
 }
 
 /******************* select line operator *********************/
 
-static int select_line_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_select_line_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -1263,13 +1263,13 @@ void TEXT_OT_select_line(wmOperatorType *ot)
        ot->description= "Select text by line";
        
        /* api callbacks */
-       ot->exec= select_line_exec;
+       ot->exec= text_select_line_exec;
        ot->poll= text_edit_poll;
 }
 
 /******************* select word operator *********************/
 
-static int select_word_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_select_word_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -1290,13 +1290,13 @@ void TEXT_OT_select_word(wmOperatorType *ot)
        ot->description= "Select word under cursor";
 
        /* api callbacks */
-       ot->exec= select_word_exec;
+       ot->exec= text_select_word_exec;
        ot->poll= text_edit_poll;
 }
 
 /******************* previous marker operator *********************/
 
-static int previous_marker_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_previous_marker_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Text *text= CTX_data_edit_text(C);
        TextMarker *mrk;
@@ -1326,13 +1326,13 @@ void TEXT_OT_previous_marker(wmOperatorType *ot)
        ot->description= "Move to previous marker";
        
        /* api callbacks */
-       ot->exec= previous_marker_exec;
+       ot->exec= text_previous_marker_exec;
        ot->poll= text_edit_poll;
 }
 
 /******************* next marker operator *********************/
 
-static int next_marker_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_next_marker_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Text *text= CTX_data_edit_text(C);
        TextMarker *mrk;
@@ -1362,13 +1362,13 @@ void TEXT_OT_next_marker(wmOperatorType *ot)
        ot->description= "Move to next marker";
        
        /* api callbacks */
-       ot->exec= next_marker_exec;
+       ot->exec= text_next_marker_exec;
        ot->poll= text_edit_poll;
 }
 
 /******************* clear all markers operator *********************/
 
-static int clear_all_markers_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_clear_all_markers_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Text *text= CTX_data_edit_text(C);
 
@@ -1388,7 +1388,7 @@ void TEXT_OT_markers_clear(wmOperatorType *ot)
        ot->description= "Clear all markers";
        
        /* api callbacks */
-       ot->exec= clear_all_markers_exec;
+       ot->exec= text_clear_all_markers_exec;
        ot->poll= text_edit_poll;
 }
 
@@ -1573,7 +1573,7 @@ static int cursor_skip_find_line(SpaceText* st, ARegion *ar,
        return 1;
 }
 
-static void wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
 {
        Text *text= st->text;
        TextLine **linep;
@@ -1641,7 +1641,7 @@ static void wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
        txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, oldl, oldc, oldl, *charp);
 }
 
-static void wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
 {
        Text *text= st->text;
        TextLine **linep;
@@ -1705,7 +1705,7 @@ static void wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
        txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, oldl, oldc, oldl, *charp);
 }
 
-static void wrap_move_up(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_up(SpaceText *st, ARegion *ar, short sel)
 {
        Text *text= st->text;
        TextLine **linep;
@@ -1741,7 +1741,7 @@ static void wrap_move_up(SpaceText *st, ARegion *ar, short sel)
        txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, oldl, oldc, newl, *charp);
 }
 
-static void wrap_move_down(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_down(SpaceText *st, ARegion *ar, short sel)
 {
        Text *text= st->text;
        TextLine **linep;
@@ -1814,7 +1814,7 @@ static void cursor_skip(SpaceText* st, ARegion *ar, Text *text, int lines, int s
        txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, oldl, oldc, txt_get_span(text->lines.first, *linep), *charp);
 }
 
-static int move_cursor(bContext *C, int type, int select)
+static int text_move_cursor(bContext *C, int type, int select)
 {
        SpaceText *st= CTX_wm_space_text(C);
        Text *text= CTX_data_edit_text(C);
@@ -1826,12 +1826,12 @@ static int move_cursor(bContext *C, int type, int select)
 
        switch(type) {
                case LINE_BEGIN:
-                       if(st && st->wordwrap && ar) wrap_move_bol(st, ar, select);
+                       if(st && st->wordwrap && ar) txt_wrap_move_bol(st, ar, select);
                        else txt_move_bol(text, select);
                        break;
                        
                case LINE_END:
-                       if(st && st->wordwrap && ar) wrap_move_eol(st, ar, select);
+                       if(st && st->wordwrap && ar) txt_wrap_move_eol(st, ar, select);
                        else txt_move_eol(text, select);
                        break;
 
@@ -1860,12 +1860,12 @@ static int move_cursor(bContext *C, int type, int select)
                        break;
 
                case PREV_LINE:
-                       if(st && st->wordwrap && ar) wrap_move_up(st, ar, select);
+                       if(st && st->wordwrap && ar) txt_wrap_move_up(st, ar, select);
                        else txt_move_up(text, select);
                        break;
                        
                case NEXT_LINE:
-                       if(st && st->wordwrap && ar) wrap_move_down(st, ar, select);
+                       if(st && st->wordwrap && ar) txt_wrap_move_down(st, ar, select);
                        else txt_move_down(text, select);
                        break;
 
@@ -1886,11 +1886,11 @@ static int move_cursor(bContext *C, int type, int select)
        return OPERATOR_FINISHED;
 }
 
-static int move_exec(bContext *C, wmOperator *op)
+static int text_move_exec(bContext *C, wmOperator *op)
 {
        int type= RNA_enum_get(op->ptr, "type");
 
-       return move_cursor(C, type, 0);
+       return text_move_cursor(C, type, 0);
 }
 
 void TEXT_OT_move(wmOperatorType *ot)
@@ -1901,7 +1901,7 @@ void TEXT_OT_move(wmOperatorType *ot)
        ot->description= "Move cursor to position type";
        
        /* api callbacks */
-       ot->exec= move_exec;
+       ot->exec= text_move_exec;
        ot->poll= text_edit_poll;
 
        /* properties */
@@ -1910,11 +1910,11 @@ void TEXT_OT_move(wmOperatorType *ot)
 
 /******************* move select operator ********************/
 
-static int move_select_exec(bContext *C, wmOperator *op)
+static int text_move_select_exec(bContext *C, wmOperator *op)
 {
        int type= RNA_enum_get(op->ptr, "type");
 
-       return move_cursor(C, type, 1);
+       return text_move_cursor(C, type, 1);
 }
 
 void TEXT_OT_move_select(wmOperatorType *ot)
@@ -1925,7 +1925,7 @@ void TEXT_OT_move_select(wmOperatorType *ot)
        ot->description= "Make selection from current cursor position to new cursor position type";
        
        /* api callbacks */
-       ot->exec= move_select_exec;
+       ot->exec= text_move_select_exec;
        ot->poll= text_space_edit_poll;
 
        /* properties */
@@ -1934,7 +1934,7 @@ void TEXT_OT_move_select(wmOperatorType *ot)
 
 /******************* jump operator *********************/
 
-static int jump_exec(bContext *C, wmOperator *op)
+static int text_jump_exec(bContext *C, wmOperator *op)
 {
        Text *text= CTX_data_edit_text(C);
        int line= RNA_int_get(op->ptr, "line");
@@ -1953,7 +1953,7 @@ static int jump_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-static int jump_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int text_jump_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
 {
        return WM_operator_props_dialog_popup(C,op,200,100);
 
@@ -1967,8 +1967,8 @@ void TEXT_OT_jump(wmOperatorType *ot)
        ot->description= "Jump cursor to line";
        
        /* api callbacks */
-       ot->invoke= jump_invoke;
-       ot->exec= jump_exec;
+       ot->invoke= text_jump_invoke;
+       ot->exec= text_jump_exec;
        ot->poll= text_edit_poll;
 
        /* properties */
@@ -1984,7 +1984,7 @@ static EnumPropertyItem delete_type_items[]= {
        {DEL_PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""},
        {0, NULL, 0, NULL, NULL}};
 
-static int delete_exec(bContext *C, wmOperator *op)
+static int text_delete_exec(bContext *C, wmOperator *op)
 {
        Text *text= CTX_data_edit_text(C);
        int type= RNA_enum_get(op->ptr, "type");
@@ -2007,7 +2007,7 @@ static int delete_exec(bContext *C, wmOperator *op)
 
        /* run the script while editing, evil but useful */
        if(CTX_wm_space_text(C)->live_edit)
-               run_script(C, NULL);
+               text_run_script(C, NULL);
        
        return OPERATOR_FINISHED;
 }
@@ -2020,7 +2020,7 @@ void TEXT_OT_delete(wmOperatorType *ot)
        ot->description= "Delete text by cursor position";
        
        /* api callbacks */
-       ot->exec= delete_exec;
+       ot->exec= text_delete_exec;
        ot->poll= text_edit_poll;
 
        /* properties */
@@ -2029,7 +2029,7 @@ void TEXT_OT_delete(wmOperatorType *ot)
 
 /******************* toggle overwrite operator **********************/
 
-static int toggle_overwrite_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_toggle_overwrite_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceText *st= CTX_wm_space_text(C);
 
@@ -2048,14 +2048,14 @@ void TEXT_OT_overwrite_toggle(wmOperatorType *ot)
        ot->description= "Toggle overwrite while typing";
        
        /* api callbacks */
-       ot->exec= toggle_overwrite_exec;
+       ot->exec= text_toggle_overwrite_exec;
        ot->poll= text_space_edit_poll;
 }
 
 /******************* scroll operator **********************/
 
 /* Moves the view vertically by the specified number of lines */
-static void screen_skip(SpaceText *st, ARegion *ar, int lines)
+static void txt_screen_skip(SpaceText *st, ARegion *ar, int lines)
 {
        int last;
 
@@ -2091,7 +2091,7 @@ static int text_scroll_poll(bContext *C)
        return CTX_data_edit_text(C) != NULL;
 }
 
-static int scroll_exec(bContext *C, wmOperator *op)
+static int text_scroll_exec(bContext *C, wmOperator *op)
 {
        SpaceText *st= CTX_wm_space_text(C);
        ARegion *ar= CTX_wm_region(C);
@@ -2101,14 +2101,14 @@ static int scroll_exec(bContext *C, wmOperator *op)
        if(lines == 0)
                return OPERATOR_CANCELLED;
 
-       screen_skip(st, ar, lines*U.wheellinescroll);
+       txt_screen_skip(st, ar, lines*U.wheellinescroll);
 
        ED_area_tag_redraw(CTX_wm_area(C));
 
        return OPERATOR_FINISHED;
 }
 
-static void scroll_apply(bContext *C, wmOperator *op, wmEvent *event)
+static void text_scroll_apply(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceText *st= CTX_wm_space_text(C);
        ARegion *ar= CTX_wm_region(C);
@@ -2140,7 +2140,7 @@ static void scroll_apply(bContext *C, wmOperator *op, wmEvent *event)
        }
 
        if(txtdelta[0] || txtdelta[1]) {
-               screen_skip(st, ar, txtdelta[1]);
+               txt_screen_skip(st, ar, txtdelta[1]);
 
                if(st->wordwrap) {
                        st->left= 0;
@@ -2165,7 +2165,7 @@ static void scroll_exit(bContext *C, wmOperator *op)
        MEM_freeN(op->customdata);
 }
 
-static int scroll_modal(bContext *C, wmOperator *op, wmEvent *event)
+static int text_scroll_modal(bContext *C, wmOperator *op, wmEvent *event)
 {
        TextScroll *tsc= op->customdata;
        SpaceText *st= CTX_wm_space_text(C);
@@ -2174,7 +2174,7 @@ static int scroll_modal(bContext *C, wmOperator *op, wmEvent *event)
        switch(event->type) {
                case MOUSEMOVE:
                        if(tsc->zone == SCROLLHANDLE_BAR)
-                               scroll_apply(C, op, event);
+                               text_scroll_apply(C, op, event);
                        break;
                case LEFTMOUSE:
                case RIGHTMOUSE:
@@ -2198,20 +2198,20 @@ static int scroll_modal(bContext *C, wmOperator *op, wmEvent *event)
        return OPERATOR_RUNNING_MODAL;
 }
 
-static int scroll_cancel(bContext *C, wmOperator *op)
+static int text_scroll_cancel(bContext *C, wmOperator *op)
 {
        scroll_exit(C, op);
 
        return OPERATOR_CANCELLED;
 }
 
-static int scroll_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int text_scroll_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceText *st= CTX_wm_space_text(C);
        TextScroll *tsc;
        
        if(RNA_property_is_set(op->ptr, "lines"))
-               return scroll_exec(C, op);
+               return text_scroll_exec(C, op);
        
        tsc= MEM_callocN(sizeof(TextScroll), "TextScroll");
        tsc->first= 1;
@@ -2230,7 +2230,7 @@ static int scroll_invoke(bContext *C, wmOperator *op, wmEvent *event)
                tsc->delta[1] = (event->y - event->prevy)*st->lheight/4;
                tsc->first = 0;
                tsc->scrollbar = 0;
-               scroll_apply(C, op, event);
+               text_scroll_apply(C, op, event);
                scroll_exit(C, op);
                return OPERATOR_FINISHED;
        }       
@@ -2251,10 +2251,10 @@ void TEXT_OT_scroll(wmOperatorType *ot)
        ot->description= "Scroll text screen";
        
        /* api callbacks */
-       ot->exec= scroll_exec;
-       ot->invoke= scroll_invoke;
-       ot->modal= scroll_modal;
-       ot->cancel= scroll_cancel;
+       ot->exec= text_scroll_exec;
+       ot->invoke= text_scroll_invoke;
+       ot->modal= text_scroll_modal;
+       ot->cancel= text_scroll_cancel;
        ot->poll= text_scroll_poll;
 
        /* flags */
@@ -2282,7 +2282,7 @@ static int text_region_scroll_poll(bContext *C)
        return 1;
 }
 
-static int scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int text_scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceText *st= CTX_wm_space_text(C);
        ARegion *ar= CTX_wm_region(C);
@@ -2291,7 +2291,7 @@ static int scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event)
        int zone= -1;
 
        if(RNA_property_is_set(op->ptr, "lines"))
-               return scroll_exec(C, op);
+               return text_scroll_exec(C, op);
        
        /* verify we are in the right zone */
        if(mval[0]>st->txtbar.xmin && mval[0]<st->txtbar.xmax) {
@@ -2334,9 +2334,9 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot)
        ot->description= "Scroll text screen";
        
        /* api callbacks */
-       ot->invoke= scroll_bar_invoke;
-       ot->modal= scroll_modal;
-       ot->cancel= scroll_cancel;
+       ot->invoke= text_scroll_bar_invoke;
+       ot->modal= text_scroll_modal;
+       ot->cancel= text_scroll_cancel;
        ot->poll= text_region_scroll_poll;
 
        /* flags */
@@ -2354,7 +2354,7 @@ typedef struct SetSelection {
        short old[2];
 } SetSelection;
 
-static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel) 
+static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel)
 {
        FlattenString fs;
        Text *text= st->text;
@@ -2514,7 +2514,7 @@ static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel)
        if(!sel) txt_pop_sel(text);
 }
 
-static void set_cursor_apply(bContext *C, wmOperator *op, wmEvent *event)
+static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceText *st= CTX_wm_space_text(C);
        ARegion *ar= CTX_wm_region(C);
@@ -2522,9 +2522,9 @@ static void set_cursor_apply(bContext *C, wmOperator *op, wmEvent *event)
 
        if(event->mval[1]<0 || event->mval[1]>ar->winy) {
                int d= (ssel->old[1]-event->mval[1])*st->pix_per_line;
-               if(d) screen_skip(st, ar, d);
+               if(d) txt_screen_skip(st, ar, d);
 
-               set_cursor_to_pos(st, ar, event->mval[0], event->mval[1]<0?0:ar->winy, 1);
+               text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1]<0?0:ar->winy, 1);
 
                text_update_cursor_moved(C);
                WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text);
@@ -2533,14 +2533,14 @@ static void set_cursor_apply(bContext *C, wmOperator *op, wmEvent *event)
                if(event->mval[0]>ar->winx) st->left++;
                else if(event->mval[0]<0 && st->left>0) st->left--;
                
-               set_cursor_to_pos(st, ar, event->mval[0], event->mval[1], 1);
+               text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1], 1);
                
                text_update_cursor_moved(C);
                WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text);
                // XXX PIL_sleep_ms(10);
        } 
        else {
-               set_cursor_to_pos(st, ar, event->mval[0], event->mval[1], 1);
+               text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1], 1);
 
                text_update_cursor_moved(C);
                WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text);
@@ -2550,7 +2550,7 @@ static void set_cursor_apply(bContext *C, wmOperator *op, wmEvent *event)
        } 
 }
 
-static void set_cursor_exit(bContext *C, wmOperator *op)
+static void text_cursor_set_exit(bContext *C, wmOperator *op)
 {
        SpaceText *st= CTX_wm_space_text(C);
        Text *text= st->text;
@@ -2576,7 +2576,7 @@ static void set_cursor_exit(bContext *C, wmOperator *op)
        MEM_freeN(ssel);
 }
 
-static int set_selection_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int text_set_selection_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceText *st= CTX_wm_space_text(C);
        SetSelection *ssel;
@@ -2596,30 +2596,30 @@ static int set_selection_invoke(bContext *C, wmOperator *op, wmEvent *event)
 
        WM_event_add_modal_handler(C, op);
 
-       set_cursor_apply(C, op, event);
+       text_cursor_set_apply(C, op, event);
 
        return OPERATOR_RUNNING_MODAL;
 }
 
-static int set_selection_modal(bContext *C, wmOperator *op, wmEvent *event)
+static int text_set_selection_modal(bContext *C, wmOperator *op, wmEvent *event)
 {
        switch(event->type) {
                case LEFTMOUSE:
                case MIDDLEMOUSE:
                case RIGHTMOUSE:
-                       set_cursor_exit(C, op);
+                       text_cursor_set_exit(C, op);
                        return OPERATOR_FINISHED;
                case MOUSEMOVE:
-                       set_cursor_apply(C, op, event);
+                       text_cursor_set_apply(C, op, event);
                        break;
        }
 
        return OPERATOR_RUNNING_MODAL;
 }
 
-static int set_selection_cancel(bContext *C, wmOperator *op)
+static int text_set_selection_cancel(bContext *C, wmOperator *op)
 {
-       set_cursor_exit(C, op);
+       text_cursor_set_exit(C, op);
        return OPERATOR_FINISHED;
 }
 
@@ -2631,9 +2631,9 @@ void TEXT_OT_selection_set(wmOperatorType *ot)
        ot->description= "Set cursor selection";
 
        /* api callbacks */
-       ot->invoke= set_selection_invoke;
-       ot->modal= set_selection_modal;
-       ot->cancel= set_selection_cancel;
+       ot->invoke= text_set_selection_invoke;
+       ot->modal= text_set_selection_modal;
+       ot->cancel= text_set_selection_cancel;
        ot->poll= text_region_edit_poll;
 
        /* properties */
@@ -2642,7 +2642,7 @@ void TEXT_OT_selection_set(wmOperatorType *ot)
 
 /******************* set cursor operator **********************/
 
-static int set_cursor_exec(bContext *C, wmOperator *op)
+static int text_cursor_set_exec(bContext *C, wmOperator *op)
 {
        SpaceText *st= CTX_wm_space_text(C);
        Text *text= st->text;
@@ -2654,7 +2654,7 @@ static int set_cursor_exec(bContext *C, wmOperator *op)
        oldl= txt_get_span(text->lines.first, text->curl);
        oldc= text->curc;
 
-       set_cursor_to_pos(st, ar, x, y, 0);
+       text_cursor_set_to_pos(st, ar, x, y, 0);
 
        txt_undo_add_toop(text, UNDO_CTO, oldl, oldc, txt_get_span(text->lines.first, text->curl), text->curc);
 
@@ -2664,7 +2664,7 @@ static int set_cursor_exec(bContext *C, wmOperator *op)
        return OPERATOR_PASS_THROUGH;
 }
 
-static int set_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int text_cursor_set_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceText *st= CTX_wm_space_text(C);
 
@@ -2674,7 +2674,7 @@ static int set_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event)
        RNA_int_set(op->ptr, "x", event->mval[0]);
        RNA_int_set(op->ptr, "y", event->mval[1]);
 
-       return set_cursor_exec(C, op);
+       return text_cursor_set_exec(C, op);
 }
 
 void TEXT_OT_cursor_set(wmOperatorType *ot)
@@ -2685,8 +2685,8 @@ void TEXT_OT_cursor_set(wmOperatorType *ot)
        ot->description= "Set cursor position";
 
        /* api callbacks */
-       ot->invoke= set_cursor_invoke;
-       ot->exec= set_cursor_exec;
+       ot->invoke= text_cursor_set_invoke;
+       ot->exec= text_cursor_set_exec;
        ot->poll= text_region_edit_poll;
 
        /* properties */
@@ -2696,7 +2696,7 @@ void TEXT_OT_cursor_set(wmOperatorType *ot)
 
 /******************* line number operator **********************/
 
-static int line_number_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
+static int text_line_number_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
 {
        SpaceText *st= CTX_wm_space_text(C);
        Text *text= CTX_data_edit_text(C);
@@ -2741,13 +2741,13 @@ void TEXT_OT_line_number(wmOperatorType *ot)
        ot->description= "The current line number";
        
        /* api callbacks */
-       ot->invoke= line_number_invoke;
+       ot->invoke= text_line_number_invoke;
        ot->poll= text_region_edit_poll;
 }
 
 /******************* insert operator **********************/
 
-static int insert_exec(bContext *C, wmOperator *op)
+static int text_insert_exec(bContext *C, wmOperator *op)
 {
        SpaceText *st= CTX_wm_space_text(C);
        Text *text= CTX_data_edit_text(C);
@@ -2781,7 +2781,7 @@ static int insert_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int text_insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        int ret;
 
@@ -2799,11 +2799,11 @@ static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
                }
        }
 
-       ret = insert_exec(C, op);
+       ret = text_insert_exec(C, op);
        
        /* run the script while editing, evil but useful */
        if(ret==OPERATOR_FINISHED && CTX_wm_space_text(C)->live_edit)
-               run_script(C, NULL);
+               text_run_script(C, NULL);
 
        return ret;
 }
@@ -2816,8 +2816,8 @@ void TEXT_OT_insert(wmOperatorType *ot)
        ot->description= "Insert text at cursor position";
        
        /* api callbacks */
-       ot->exec= insert_exec;
-       ot->invoke= insert_invoke;
+       ot->exec= text_insert_exec;
+       ot->invoke= text_insert_invoke;
        ot->poll= text_edit_poll;
 
        /* properties */
@@ -2831,7 +2831,7 @@ void TEXT_OT_insert(wmOperatorType *ot)
 #define TEXT_REPLACE   1
 #define TEXT_MARK_ALL  2
 
-static int find_and_replace(bContext *C, wmOperator *op, short mode)
+static int text_find_and_replace(bContext *C, wmOperator *op, short mode)
 {
        Main *bmain= CTX_data_main(C);
        SpaceText *st= CTX_wm_space_text(C);
@@ -2922,9 +2922,9 @@ static int find_and_replace(bContext *C, wmOperator *op, short mode)
        return OPERATOR_FINISHED;
 }
 
-static int find_exec(bContext *C, wmOperator *op)
+static int text_find_exec(bContext *C, wmOperator *op)
 {
-       return find_and_replace(C, op, TEXT_FIND);
+       return text_find_and_replace(C, op, TEXT_FIND);
 }
 
 void TEXT_OT_find(wmOperatorType *ot)
@@ -2935,15 +2935,15 @@ void TEXT_OT_find(wmOperatorType *ot)
        ot->description= "Find specified text";
        
        /* api callbacks */
-       ot->exec= find_exec;
+       ot->exec= text_find_exec;
        ot->poll= text_space_edit_poll;
 }
 
 /******************* replace operator *********************/
 
-static int replace_exec(bContext *C, wmOperator *op)
+static int text_replace_exec(bContext *C, wmOperator *op)
 {
-       return find_and_replace(C, op, TEXT_REPLACE);
+       return text_find_and_replace(C, op, TEXT_REPLACE);
 }
 
 void TEXT_OT_replace(wmOperatorType *ot)
@@ -2954,15 +2954,15 @@ void TEXT_OT_replace(wmOperatorType *ot)
        ot->description= "Replace text with the specified text";
 
        /* api callbacks */
-       ot->exec= replace_exec;
+       ot->exec= text_replace_exec;
        ot->poll= text_space_edit_poll;
 }
 
 /******************* mark all operator *********************/
 
-static int mark_all_exec(bContext *C, wmOperator *op)
+static int text_mark_all_exec(bContext *C, wmOperator *op)
 {
-       return find_and_replace(C, op, TEXT_MARK_ALL);
+       return text_find_and_replace(C, op, TEXT_MARK_ALL);
 }
 
 void TEXT_OT_mark_all(wmOperatorType *ot)
@@ -2973,13 +2973,13 @@ void TEXT_OT_mark_all(wmOperatorType *ot)
        ot->description= "Mark all specified text";
        
        /* api callbacks */
-       ot->exec= mark_all_exec;
+       ot->exec= text_mark_all_exec;
        ot->poll= text_space_edit_poll;
 }
 
 /******************* find set selected *********************/
 
-static int find_set_selected_exec(bContext *C, wmOperator *op)
+static int text_find_set_selected_exec(bContext *C, wmOperator *op)
 {
        SpaceText *st= CTX_wm_space_text(C);
        Text *text= CTX_data_edit_text(C);
@@ -2992,7 +2992,7 @@ static int find_set_selected_exec(bContext *C, wmOperator *op)
        if(!st->findstr[0])
                return OPERATOR_FINISHED;
 
-       return find_and_replace(C, op, TEXT_FIND);
+       return text_find_and_replace(C, op, TEXT_FIND);
 }
 
 void TEXT_OT_find_set_selected(wmOperatorType *ot)
@@ -3003,13 +3003,13 @@ void TEXT_OT_find_set_selected(wmOperatorType *ot)
        ot->description= "Find specified text and set as selected";
        
        /* api callbacks */
-       ot->exec= find_set_selected_exec;
+       ot->exec= text_find_set_selected_exec;
        ot->poll= text_space_edit_poll;
 }
 
 /******************* replace set selected *********************/
 
-static int replace_set_selected_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_replace_set_selected_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceText *st= CTX_wm_space_text(C);
        Text *text= CTX_data_edit_text(C);
@@ -3030,7 +3030,7 @@ void TEXT_OT_replace_set_selected(wmOperatorType *ot)
        ot->description= "Replace text with specified text and set as selected";
        
        /* api callbacks */
-       ot->exec= replace_set_selected_exec;
+       ot->exec= text_replace_set_selected_exec;
        ot->poll= text_space_edit_poll;
 }
 
@@ -3099,18 +3099,18 @@ static void text_ignore_modified(Text *text)
        text->mtime= st.st_mtime;
 }
 
-static int resolve_conflict_exec(bContext *C, wmOperator *op)
+static int text_resolve_conflict_exec(bContext *C, wmOperator *op)
 {
        Text *text= CTX_data_edit_text(C);
        int resolution= RNA_enum_get(op->ptr, "resolution");
 
        switch(resolution) {
                case RESOLVE_RELOAD:
-                       return reload_exec(C, op);
+                       return text_reload_exec(C, op);
                case RESOLVE_SAVE:
-                       return save_exec(C, op);
+                       return text_save_exec(C, op);
                case RESOLVE_MAKE_INTERNAL:
-                       return make_internal_exec(C, op);
+                       return text_make_internal_exec(C, op);
                case RESOLVE_IGNORE:
                        text_ignore_modified(text);
                        return OPERATOR_FINISHED;
@@ -3119,7 +3119,7 @@ static int resolve_conflict_exec(bContext *C, wmOperator *op)
        return OPERATOR_CANCELLED;
 }
 
-static int resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
 {
        Text *text= CTX_data_edit_text(C);
        uiPopupMenu *pup;
@@ -3165,9 +3165,9 @@ void TEXT_OT_resolve_conflict(wmOperatorType *ot)
        ot->description= "When external text is out of sync, resolve the conflict";
 
        /* api callbacks */
-       ot->exec= resolve_conflict_exec;
-       ot->invoke= resolve_conflict_invoke;
-       ot->poll= save_poll;
+       ot->exec= text_resolve_conflict_exec;
+       ot->invoke= text_resolve_conflict_invoke;
+       ot->poll= text_save_poll;
 
        /* properties */
        RNA_def_enum(ot->srna, "resolution", resolution_items, RESOLVE_IGNORE, "Resolution", "How to solve conflict due to differences in internal and external text");
@@ -3175,7 +3175,7 @@ void TEXT_OT_resolve_conflict(wmOperatorType *ot)
 
 /********************** to 3d object operator *****************/
 
-static int to_3d_object_exec(bContext *C, wmOperator *op)
+static int text_to_3d_object_exec(bContext *C, wmOperator *op)
 {
        Text *text= CTX_data_edit_text(C);
        int split_lines= RNA_boolean_get(op->ptr, "split_lines");
@@ -3193,7 +3193,7 @@ void TEXT_OT_to_3d_object(wmOperatorType *ot)
        ot->description= "Create 3d text object from active text data block";
        
        /* api callbacks */
-       ot->exec= to_3d_object_exec;
+       ot->exec= text_to_3d_object_exec;
        ot->poll= text_edit_poll;
        
        /* flags */