minor cleanup for string use - no functional changes
authorCampbell Barton <ideasman42@gmail.com>
Wed, 11 Jan 2012 09:33:44 +0000 (09:33 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 11 Jan 2012 09:33:44 +0000 (09:33 +0000)
- use more logical names for strings, noticed too many strings called `str` when reviewing name patch.
- pass __func__ macro to uiBeginBlock(), quite a few names were wrong (copy/paste error).

28 files changed:
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/library.c
source/blender/editors/animation/anim_draw.c
source/blender/editors/armature/poseSlide.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/view2d.c
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_buttons/buttons_header.c
source/blender/editors/space_clip/clip_draw.c
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_view3d/drawanimviz.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/gpu/GPU_extensions.h
source/blender/gpu/intern/gpu_extensions.c
source/blender/windowmanager/intern/wm_operators.c
source/blenderplayer/bad_level_call_stubs/stubs.c

index a5c8f5c..6ee2da9 100644 (file)
@@ -1202,14 +1202,14 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
        }
        
        if (scene->r.stamp & R_STAMP_FRAME) {
-               char format[32];
+               char fmtstr[32];
                int digits= 1;
                
                if(scene->r.efra>9)
                        digits= 1 + (int) log10(scene->r.efra);
 
-               BLI_snprintf(format, sizeof(format), do_prefix ? "Frame %%0%di":"%%0%di", digits);
-               BLI_snprintf (stamp_data->frame, sizeof(stamp_data->frame), format, scene->r.cfra);
+               BLI_snprintf(fmtstr, sizeof(fmtstr), do_prefix ? "Frame %%0%di":"%%0%di", digits);
+               BLI_snprintf (stamp_data->frame, sizeof(stamp_data->frame), fmtstr, scene->r.cfra);
        } else {
                stamp_data->frame[0] = '\0';
        }
index 315f1e1..795cf75 100644 (file)
@@ -991,7 +991,7 @@ static void IDnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, shor
                ID *id;
                
                for (i=0, id= lb->first; id; id= id->next, i++) {
-                       char buf[32];
+                       char numstr[32];
                        
                        if (nr && id==link) *nr= i+1;
 
@@ -1002,12 +1002,12 @@ static void IDnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, shor
                                        if ( ((Image *)id)->source==IMA_SRC_VIEWER )
                                                continue;
                        
-                       get_flags_for_id(id, buf);
+                       get_flags_for_id(id, numstr);
                                
-                       BLI_dynstr_append(pupds, buf);
+                       BLI_dynstr_append(pupds, numstr);
                        BLI_dynstr_append(pupds, id->name+2);
-                       BLI_snprintf(buf, sizeof(buf), "%%x%d", i+1);
-                       BLI_dynstr_append(pupds, buf);
+                       BLI_snprintf(numstr, sizeof(numstr), "%%x%d", i+1);
+                       BLI_dynstr_append(pupds, numstr);
                        
                        /* icon */
                        switch(GS(id->name))
@@ -1017,8 +1017,8 @@ static void IDnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, shor
                        case ID_IM: /* fall through */
                        case ID_WO: /* fall through */
                        case ID_LA: /* fall through */
-                               BLI_snprintf(buf, sizeof(buf), "%%i%d", BKE_icon_getid(id) );
-                               BLI_dynstr_append(pupds, buf);
+                               BLI_snprintf(numstr, sizeof(numstr), "%%i%d", BKE_icon_getid(id) );
+                               BLI_dynstr_append(pupds, numstr);
                                break;
                        default:
                                break;
index 569125e..32e5fe8 100644 (file)
@@ -180,7 +180,7 @@ void ANIM_timecode_string_from_frame (char *str, Scene *scene, int power, short
 static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time)
 {
        float xscale, yscale, x, y;
-       char str[32] = "    t"; /* t is the character to start replacing from */
+       char numstr[32] = "    t";      /* t is the character to start replacing from */
        short slen;
        
        /* because the frame number text is subject to the same scaling as the contents of the view */
@@ -193,10 +193,10 @@ static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time)
         *        but power = 1 is required for frames (to get integer frames)
         */
        if (time)
-               ANIM_timecode_string_from_frame(&str[4], scene, 0, time, FRA2TIME(cfra));
+               ANIM_timecode_string_from_frame(&numstr[4], scene, 0, time, FRA2TIME(cfra));
        else    
-               ANIM_timecode_string_from_frame(&str[4], scene, 1, time, cfra);
-       slen= (short)UI_GetStringWidth(str) - 1;
+               ANIM_timecode_string_from_frame(&numstr[4], scene, 1, time, cfra);
+       slen= (short)UI_GetStringWidth(numstr) - 1;
        
        /* get starting coordinates for drawing */
        x= cfra * xscale;
@@ -208,7 +208,7 @@ static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time)
        
        /* draw current frame number - black text */
        UI_ThemeColor(TH_TEXT);
-       UI_DrawString(x-5, y+3, str);
+       UI_DrawString(x-5, y+3, numstr);
        
        /* restore view transform */
        glScalef(xscale, 1.0, 1.0);
index efc8ffe..6a93231 100644 (file)
@@ -523,28 +523,28 @@ static void pose_slide_reset (tPoseSlideOp *pso)
 /* draw percentage indicator in header */
 static void pose_slide_draw_status (tPoseSlideOp *pso)
 {
-       char statusStr[32];
-       char mode[32];
+       char status_str[32];
+       char mode_str[32];
        
        switch (pso->mode) {
                case POSESLIDE_PUSH:
-                       strcpy(mode, "Push Pose");
+                       strcpy(mode_str, "Push Pose");
                        break;
                case POSESLIDE_RELAX:
-                       strcpy(mode, "Relax Pose");
+                       strcpy(mode_str, "Relax Pose");
                        break;
                case POSESLIDE_BREAKDOWN:
-                       strcpy(mode, "Breakdown");
+                       strcpy(mode_str, "Breakdown");
                        break;
                
                default:
                        // unknown
-                       strcpy(mode, "Sliding-Tool");
+                       strcpy(mode_str, "Sliding-Tool");
                        break;
        }
        
-       sprintf(statusStr, "%s: %d %%", mode, (int)(pso->percentage*100.0f));
-       ED_area_headerprint(pso->sa, statusStr);
+       sprintf(status_str, "%s: %d %%", mode_str, (int)(pso->percentage*100.0f));
+       ED_area_headerprint(pso->sa, status_str);
 }
 
 /* common code for invoke() methods */
index c535f2c..973b43f 100644 (file)
@@ -2109,7 +2109,7 @@ uiBlock *ui_block_func_COL(bContext *C, uiPopupBlockHandle *handle, void *arg_bu
        uiBut *but= arg_but;
        uiBlock *block;
        
-       block= uiBeginBlock(C, handle->region, "colorpicker", UI_EMBOSS);
+       block= uiBeginBlock(C, handle->region, __func__, UI_EMBOSS);
        
        if (but->rnaprop) {
                if (RNA_property_subtype(but->rnaprop) == PROP_COLOR_GAMMA) {
@@ -2299,8 +2299,8 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut
        uiStyle *style= UI_GetStyle();
        uiPopupBlockHandle *handle;
        uiPopupMenu *pup;
-       pup= MEM_callocN(sizeof(uiPopupMenu), "menu dummy");
-       pup->block= uiBeginBlock(C, NULL, "ui_button_menu_create", UI_EMBOSSP);
+       pup= MEM_callocN(sizeof(uiPopupMenu), __func__);
+       pup->block= uiBeginBlock(C, NULL, __func__, UI_EMBOSSP);
        pup->layout= uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style);
        pup->slideout= (but && (but->block->flag & UI_BLOCK_LOOP));
        pup->but= but;
@@ -2361,7 +2361,7 @@ uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon)
        uiPopupMenu *pup= MEM_callocN(sizeof(uiPopupMenu), "popup menu");
        uiBut *but;
        
-       pup->block= uiBeginBlock(C, NULL, "uiPupMenuBegin", UI_EMBOSSP);
+       pup->block= uiBeginBlock(C, NULL, __func__, UI_EMBOSSP);
        pup->block->flag |= UI_BLOCK_POPUP_MEMORY;
        pup->block->puphash= ui_popup_menu_hash(title);
        pup->layout= uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style);
index 573b6cd..ccca0c8 100644 (file)
@@ -413,11 +413,11 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
                }
 
                if(id->us > 1) {
-                       char str[32];
+                       char numstr[32];
 
-                       BLI_snprintf(str, sizeof(str), "%d", id->us);
+                       BLI_snprintf(numstr, sizeof(numstr), "%d", id->us);
 
-                       but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X + ((id->us < 10) ? 0:10), UI_UNIT_Y, NULL, 0, 0, 0, 0,
+                       but= uiDefBut(block, BUT, 0, numstr, 0,0,UI_UNIT_X + ((id->us < 10) ? 0:10), UI_UNIT_Y, NULL, 0, 0, 0, 0,
                                      TIP_("Display number of users of this data (click to make a single-user copy)"));
 
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ALONE));
@@ -1621,7 +1621,7 @@ static uiBlock *curvemap_clipping_func(bContext *C, struct ARegion *ar, void *cu
        uiBut *bt;
        float width= 8*UI_UNIT_X;
 
-       block= uiBeginBlock(C, ar, "curvemap_clipping_func", UI_EMBOSS);
+       block = uiBeginBlock(C, ar, __func__, UI_EMBOSS);
 
        /* use this for a fake extra empy space around the buttons */
        uiDefBut(block, LABEL, 0, "",                   -4, 16, width+8, 6*UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
@@ -1680,7 +1680,7 @@ static uiBlock *curvemap_tools_func(bContext *C, struct ARegion *ar, void *cumap
        uiBlock *block;
        short yco= 0, menuwidth=10*UI_UNIT_X;
 
-       block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
        uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v);
 
        uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset View"),                     0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, "");
@@ -1702,7 +1702,7 @@ static uiBlock *curvemap_brush_tools_func(bContext *C, struct ARegion *ar, void
        uiBlock *block;
        short yco= 0, menuwidth=10*UI_UNIT_X;
 
-       block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
        uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v);
 
        uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset View"),             0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, "");
@@ -2281,7 +2281,8 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
        uiBlock *block;
        uiBut *but;
        Panel *pa;
-       char *name, str[32];
+       const char *name;
+       char numstr[32];
        int rnaicon=0, icon=0, i= 0, activei= 0, len= 0, items, found, min, max;
 
        /* validate arguments */
@@ -2372,7 +2373,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
                                        uiItemL(row, (name)? name: "", icon);
 
                                        if(name)
-                                               MEM_freeN(name);
+                                               MEM_freeN((void *)name);
                                }
 
                                i++;
@@ -2385,8 +2386,8 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
                        uiItemL(row, "", ICON_NONE);
 
                /* next/prev button */
-               BLI_snprintf(str, sizeof(str), "%d :", i);
-               but= uiDefIconTextButR_prop(block, NUM, 0, 0, str, 0,0,UI_UNIT_X*5,UI_UNIT_Y, activeptr, activeprop, 0, 0, 0, 0, 0, "");
+               BLI_snprintf(numstr, sizeof(numstr), "%d :", i);
+               but= uiDefIconTextButR_prop(block, NUM, 0, 0, numstr, 0,0,UI_UNIT_X*5,UI_UNIT_Y, activeptr, activeprop, 0, 0, 0, 0, 0, "");
                if(i == 0)
                        uiButSetFlag(but, UI_BUT_DISABLED);
        }
index 57d46de..81ea337 100644 (file)
@@ -1507,7 +1507,7 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short
 static void scroll_printstr(Scene *scene, float x, float y, float val, int power, short unit, char dir)
 {
        int len;
-       char str[32];
+       char timecode_str[32];
        
        /* adjust the scale unit to work ok */
        if (dir == 'v') {
@@ -1522,10 +1522,10 @@ static void scroll_printstr(Scene *scene, float x, float y, float val, int power
        }
        
        /* get string to print */
-       ANIM_timecode_string_from_frame(str, scene, power, (unit == V2D_UNIT_SECONDS), val);
+       ANIM_timecode_string_from_frame(timecode_str, scene, power, (unit == V2D_UNIT_SECONDS), val);
        
        /* get length of string, and adjust printing location to fit it into the horizontal scrollbar */
-       len= strlen(str);
+       len= strlen(timecode_str);
        if (dir == 'h') {
                /* seconds/timecode display has slightly longer strings... */
                if (unit == V2D_UNIT_SECONDS)
@@ -1536,12 +1536,12 @@ static void scroll_printstr(Scene *scene, float x, float y, float val, int power
        
        /* Add degree sympbol to end of string for vertical scrollbar? */
        if ((dir == 'v') && (unit == V2D_UNIT_DEGREES)) {
-               str[len]= 186;
-               str[len+1]= 0;
+               timecode_str[len]= 186;
+               timecode_str[len+1]= 0;
        }
        
        /* draw it */
-       BLF_draw_default_ascii(x, y, 0.0f, str, sizeof(str)-1);
+       BLF_draw_default_ascii(x, y, 0.0f, timecode_str, sizeof(timecode_str)-1);
 }
 
 /* Draw scrollbars in the given 2d-region */
index 619e76e..309b455 100644 (file)
@@ -119,7 +119,7 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar)
                }
        }
        {       /* second pass: widgets */
-               uiBlock *block= uiBeginBlock(C, ar, "dopesheet channel buttons", UI_EMBOSS);
+               uiBlock *block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
                size_t channel_index = 0;
                
                y= (float)ACHANNEL_FIRST;
index 1c352b1..6777e2c 100644 (file)
@@ -108,7 +108,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
 
        buttons_context_compute(C, sbuts);
        
-       block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
        uiBlockSetHandleFunc(block, do_buttons_buttons, NULL);
        
        xco= ED_area_header_switchbutton(C, block, yco);
index 1593ecd..0d1c312 100644 (file)
@@ -75,20 +75,20 @@ void clip_draw_curfra_label(SpaceClip *sc, float x, float y)
 {
        uiStyle *style= UI_GetStyle();
        int fontid= style->widget.uifont_id;
-       char str[32];
+       char numstr[32];
        float font_dims[2] = {0.0f, 0.0f};
 
        /* frame number */
        BLF_size(fontid, 11.0f, U.dpi);
-       BLI_snprintf(str, sizeof(str), "%d", sc->user.framenr);
+       BLI_snprintf(numstr, sizeof(numstr), "%d", sc->user.framenr);
 
-       BLF_width_and_height(fontid, str, &font_dims[0], &font_dims[1]);
+       BLF_width_and_height(fontid, numstr, &font_dims[0], &font_dims[1]);
 
        glRecti(x, y, x + font_dims[0] + 6.0f, y + font_dims[1] + 4.0f);
 
        UI_ThemeColor(TH_TEXT);
        BLF_position(fontid, x+2.0f, y+2.0f, 0.0f);
-       BLF_draw(fontid, str, sizeof(str));
+       BLF_draw(fontid, numstr, sizeof(numstr));
 }
 
 static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Scene *scene)
index 41aae64..7517c0c 100644 (file)
@@ -118,7 +118,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
        const int separator  = 4;
 
        /* Additional locals. */
-       char  name[32];
+       char uiblockstr[32];
        int loadbutton;
        int fnumbuttons;
        int min_x       = 10;
@@ -134,8 +134,8 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
        ARegion*                  artmp;
        
        /* Initialize UI block. */
-       sprintf(name, "win %p", (void *)ar);
-       block = uiBeginBlock(C, ar, name, UI_EMBOSS);
+       sprintf(uiblockstr, "win %p", (void *)ar);
+       block = uiBeginBlock(C, ar, uiblockstr, UI_EMBOSS);
        uiBlockSetHandleFunc(block, do_file_buttons, NULL);
 
        /* exception to make space for collapsed region icon */
@@ -450,7 +450,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
        struct FileList* files = sfile->files;
        struct direntry *file;
        ImBuf *imb;
-       uiBlock *block = uiBeginBlock(C, ar, "FileNames", UI_EMBOSS);
+       uiBlock *block = uiBeginBlock(C, ar, __func__, UI_EMBOSS);
        int numfiles;
        int numfiles_layout;
        int sx, sy;
index 288ff76..5b50500 100644 (file)
@@ -970,7 +970,7 @@ int filelist_islibrary(struct FileList* filelist, char* dir, char* group)
        return BLO_is_a_library(filelist->dir, dir, group);
 }
 
-static int groupname_to_code(char *group)
+static int groupname_to_code(const char *group)
 {
        char buf[32];
        char *lslash;
index 7091fe0..7bdb37d 100644 (file)
@@ -1003,7 +1003,7 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar)
                }
        }
        {       /* second pass: widgets */
-               uiBlock *block= uiBeginBlock(C, ar, "graph channel buttons", UI_EMBOSS);
+               uiBlock *block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
                size_t channel_index = 0;
                
                y= (float)ACHANNEL_FIRST;
index 8d8c793..3aebc39 100644 (file)
@@ -335,7 +335,7 @@ static void image_panel_preview(ScrArea *sa, short cntrl)   // IMAGE_HANDLER_PREVI
                return;
        }
        
-       block= uiBeginBlock(C, ar, "image_panel_preview", UI_EMBOSS);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
        uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | UI_PNL_SCALE | cntrl);
        uiSetPanelHandler(IMAGE_HANDLER_PREVIEW);  // for close and esc
        
index f5feaad..09a8ebc 100644 (file)
@@ -2999,7 +2999,7 @@ static uiBlock *sensor_menu(bContext *C, ARegion *ar, void *UNUSED(arg))
        uiBlock *block;
        int yco=0;
        
-       block= uiBeginBlock(C, ar, "filemenu", UI_EMBOSSP);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSSP);
        uiBlockSetButmFunc(block, do_sensor_menu, NULL);
        
        uiDefBut(block, BUTM, 1, "Show Objects",        0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
@@ -3048,7 +3048,7 @@ static uiBlock *controller_menu(bContext *C, ARegion *ar, void *UNUSED(arg))
        uiBlock *block;
        int yco=0;
        
-       block= uiBeginBlock(C, ar, "filemenu", UI_EMBOSSP);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSSP);
        uiBlockSetButmFunc(block, do_controller_menu, NULL);
        
        uiDefBut(block, BUTM, 1, "Show Objects",        0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
@@ -3097,7 +3097,7 @@ static uiBlock *actuator_menu(bContext *C, ARegion *ar, void *UNUSED(arg))
        uiBlock *block;
        int xco=0;
        
-       block= uiBeginBlock(C, ar, "filemenu", UI_EMBOSSP);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSSP);
        uiBlockSetButmFunc(block, do_actuator_menu, NULL);
        
        uiDefBut(block, BUTM, 1, "Show Objects",        0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
@@ -3143,7 +3143,7 @@ static uiBlock *controller_state_mask_menu(bContext *C, ARegion *ar, void *arg_c
 
        short yco = 12, xco = 0, stbit, offset;
 
-       block= uiBeginBlock(C, ar, "Controller state mask", UI_EMBOSS);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
 
        /* use this for a fake extra empy space around the buttons */
        uiDefBut(block, LABEL, 0, "",                   -5, -5, 200, 34, NULL, 0, 0, 0, 0, "");
@@ -3191,7 +3191,7 @@ static uiBlock *object_state_mask_menu(bContext *C, ARegion *ar, void *arg_obj)
        uiBlock *block;
        short xco = 0;
 
-       block= uiBeginBlock(C, ar, "obstatemenu", UI_EMBOSSP);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSSP);
        uiBlockSetButmFunc(block, do_object_state_menu, arg_obj);
        
        uiDefBut(block, BUTM, 1, "Set all bits",                0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
@@ -4488,7 +4488,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
        uiLayout *layout, *row, *box;
        uiBlock *block;
        uiBut *but;
-       char name[32];
+       char uiblockstr[32];
        short a, count;
        int xco, yco, width;
        
@@ -4497,8 +4497,8 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
        RNA_pointer_create(NULL, &RNA_SpaceLogicEditor, slogic, &logic_ptr);
        idar= get_selected_and_linked_obs(C, &count, slogic->scaflag);
        
-       sprintf(name, "buttonswin %p", (void *)ar);
-       block= uiBeginBlock(C, ar, name, UI_EMBOSS);
+       sprintf(uiblockstr, "buttonswin %p", (void *)ar);
+       block= uiBeginBlock(C, ar, uiblockstr, UI_EMBOSS);
        uiBlockSetHandleFunc(block, do_logic_buts, NULL);
        
        /* loop over all objects and set visible/linked flags for the logic bricks */
@@ -4802,7 +4802,7 @@ void logic_buttons(bContext *C, ARegion *ar)
        int a, iact, stbit, offset;
        int xco, yco, width, ycoo;
        short count;
-       char name[32];
+       char numstr[32];
        /* pin is a bool used for actuator and sensor drawing with states
         * pin so changing states dosnt hide the logic brick */
        char pin;
@@ -4815,8 +4815,8 @@ void logic_buttons(bContext *C, ARegion *ar)
        if(ob==NULL) return;
 //     uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
 
-       sprintf(name, "buttonswin %p", (void *)ar);
-       block= uiBeginBlock(C, ar, name, UI_EMBOSS);
+       sprintf(numstr, "buttonswin %p", (void *)ar);
+       block= uiBeginBlock(C, ar, numstr, UI_EMBOSS);
        uiBlockSetHandleFunc(block, do_logic_buts, NULL);
 
        RNA_pointer_create(NULL, &RNA_SpaceLogicEditor, slogic, &logic_ptr);
@@ -4932,8 +4932,8 @@ void logic_buttons(bContext *C, ARegion *ar)
                                                uiDefIconButBitS(block, ICONTOG, CONT_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, UI_UNIT_Y, &cont->flag, 0, 0, 0, 0, "Controller settings");
                                                uiDefIconButBitS(block, TOG, CONT_PRIO, B_REDR, ICON_BOOKMARKS, (short)(xco+width-66), yco, 22, UI_UNIT_Y, &cont->flag, 0, 0, 0, 0, "Mark controller for execution before all non-marked controllers (good for startup scripts)");
 
-                                               sprintf(name, "%d", first_bit(cont->state_mask)+1);
-                                               uiDefBlockBut(block, controller_state_mask_menu, cont, name, (short)(xco+width-44), yco, 22, UI_UNIT_Y, "Set controller state index (from 1 to 30)");
+                                               sprintf(numstr, "%d", first_bit(cont->state_mask)+1);
+                                               uiDefBlockBut(block, controller_state_mask_menu, cont, numstr, (short)(xco+width-44), yco, 22, UI_UNIT_Y, "Set controller state index (from 1 to 30)");
                                
                                                if(cont->flag & CONT_SHOW) {
                                                        cont->otype= cont->type;
index 6af43e7..9f13fd7 100644 (file)
@@ -958,7 +958,7 @@ void draw_nla_channel_list (bContext *C, bAnimContext *ac, ARegion *ar)
                draw_nla_channel_list_gl(ac, &anim_data, v2d, y);
        }
        {       /* second pass: UI widgets */
-               uiBlock *block= uiBeginBlock(C, ar, "NLA channel buttons", UI_EMBOSS);
+               uiBlock *block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
                size_t channel_index = 0;
                
                y= (float)(-NLACHANNEL_HEIGHT(snla));
index 285bac9..1f1eb9b 100644 (file)
@@ -132,7 +132,7 @@ static uiBlock *socket_component_menu(bContext *C, ARegion *ar, void *args_v)
        uiBlock *block;
        uiLayout *layout;
        
-       block= uiBeginBlock(C, ar, "socket menu", UI_EMBOSS);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
        uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN);
        
        layout= uiLayoutColumn(uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, args->x, args->y+2, args->width, NODE_DY, UI_GetStyle()), 0);
@@ -1203,10 +1203,10 @@ static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA *
                /* don't use iuser->framenr directly because it may not be updated if auto-refresh is off */
                Scene *scene= CTX_data_scene(C);
                ImageUser *iuser= node->storage;
-               char tstr[32];
+               char numstr[32];
                const int framenr= BKE_image_user_get_frame(iuser, CFRA, 0);
-               BLI_snprintf(tstr, sizeof(tstr), "Frame: %d", framenr);
-               uiItemL(layout, tstr, ICON_NONE);
+               BLI_snprintf(numstr, sizeof(numstr), "Frame: %d", framenr);
+               uiItemL(layout, numstr, ICON_NONE);
        }
 
        if (ELEM(source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE)) {
index da7f22b..ea9a8b1 100644 (file)
@@ -195,18 +195,18 @@ static void node_scaling_widget(int color_id, float aspect, float xmin, float ym
 static void node_uiblocks_init(const bContext *C, bNodeTree *ntree)
 {
        bNode *node;
-       char str[32];
+       char uiblockstr[32];
        
        /* add node uiBlocks in drawing order - prevents events going to overlapping nodes */
        
-       for(node= ntree->nodes.first; node; node=node->next) {
-                       /* ui block */
-                       sprintf(str, "node buttons %p", (void *)node);
-                       node->block= uiBeginBlock(C, CTX_wm_region(C), str, UI_EMBOSS);
-                       uiBlockSetHandleFunc(node->block, do_node_internal_buttons, node);
-                       
-                       /* this cancels events for background nodes */
-                       uiBlockSetFlag(node->block, UI_BLOCK_CLIP_EVENTS);
+       for (node= ntree->nodes.first; node; node= node->next) {
+               /* ui block */
+               sprintf(uiblockstr, "node buttons %p", (void *)node);
+               node->block= uiBeginBlock(C, CTX_wm_region(C), uiblockstr, UI_EMBOSS);
+               uiBlockSetHandleFunc(node->block, do_node_internal_buttons, node);
+
+               /* this cancels events for background nodes */
+               uiBlockSetFlag(node->block, UI_BLOCK_CLIP_EVENTS);
        }
 }
 
index f3bab19..71cb83a 100644 (file)
@@ -1649,7 +1649,7 @@ void draw_outliner(const bContext *C)
 
        /* draw outliner stuff (background, hierachy lines and names) */
        outliner_back(ar);
-       block= uiBeginBlock(C, ar, "outliner buttons", UI_EMBOSS);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
        outliner_draw_tree((bContext *)C, block, scene, ar, soops);
        
        if(ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) {
index 2b59a02..18c4b32 100644 (file)
@@ -328,7 +328,7 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire
        float x1, x2, y1, y2;
        float handsize;
        float minhandle, maxhandle;
-       char str[32];
+       char numstr[32];
        unsigned int whichsel=0;
        
        x1= seq->startdisp;
@@ -392,15 +392,15 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire
        if(G.moving || (seq->flag & whichsel)) {
                const char col[4]= {255, 255, 255, 255};
                if (direction == SEQ_LEFTHANDLE) {
-                       sprintf(str, "%d", seq->startdisp);
+                       sprintf(numstr, "%d", seq->startdisp);
                        x1= rx1;
                        y1 -= 0.45f;
                } else {
-                       sprintf(str, "%d", seq->enddisp - 1);
+                       sprintf(numstr, "%d", seq->enddisp - 1);
                        x1= x2 - handsize*0.75f;
                        y1= y2 + 0.05f;
                }
-               UI_view2d_text_cache_add(v2d, x1, y1, str, col);
+               UI_view2d_text_cache_add(v2d, x1, y1, numstr, col);
        }       
 }
 
index 1784d94..638bf5b 100644 (file)
@@ -218,23 +218,23 @@ void draw_motion_path_instance(Scene *scene,
                col[3]= 255;
 
                for (i=0, mpv=mpv_start; i < len; i+=stepsize, mpv+=stepsize) {
-                       char str[32];
+                       char numstr[32];
                        float co[3];
                        
                        /* only draw framenum if several consecutive highlighted points don't occur on same point */
                        if (i == 0) {
-                               sprintf(str, "%d", (i+sfra));
+                               sprintf(numstr, "%d", (i+sfra));
                                mul_v3_m4v3(co, ob->imat, mpv->co);
-                               view3d_cached_text_draw_add(co, str, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col);
+                               view3d_cached_text_draw_add(co, numstr, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col);
                        }
                        else if ((i > stepsize) && (i < len-stepsize)) { 
                                bMotionPathVert *mpvP = (mpv - stepsize);
                                bMotionPathVert *mpvN = (mpv + stepsize);
                                
                                if ((equals_v3v3(mpv->co, mpvP->co)==0) || (equals_v3v3(mpv->co, mpvN->co)==0)) {
-                                       sprintf(str, "%d", (sfra+i));
+                                       sprintf(numstr, "%d", (sfra+i));
                                        mul_v3_m4v3(co, ob->imat, mpv->co);
-                                       view3d_cached_text_draw_add(co, str, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col);
+                                       view3d_cached_text_draw_add(co, numstr, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col);
                                }
                        }
                }
@@ -293,11 +293,11 @@ void draw_motion_path_instance(Scene *scene,
                                float mframe= (float)(sfra + i);
                                
                                if (BLI_dlrbTree_search_exact(&keys, compare_ak_cfraPtr, &mframe)) {
-                                       char str[32];
+                                       char numstr[32];
                                        
-                                       sprintf(str, "%d", (sfra+i));
+                                       sprintf(numstr, "%d", (sfra+i));
                                        mul_v3_m4v3(co, ob->imat, mpv->co);
-                                       view3d_cached_text_draw_add(co, str, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col);
+                                       view3d_cached_text_draw_add(co, numstr, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col);
                                }
                        }
                }
index 7f54821..0066e9d 100644 (file)
@@ -2663,7 +2663,7 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, EditMesh *em, UnitSet
        EditFace *efa;
        float v1[3], v2[3], v3[3], v4[3], vmid[3];
        float fvec[3];
-       char val[32]; /* Stores the measurement display text here */
+       char numstr[32]; /* Stores the measurement display text here */
        const char *conv_float; /* Use a float conversion matching the grid size */
        unsigned char col[4]= {0, 0, 0, 255}; /* color of the text to draw */
        float area; /* area of the face */
@@ -2696,11 +2696,11 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, EditMesh *em, UnitSet
                                        mul_mat3_m4_v3(ob->obmat, v2);
                                }
                                if(unit->system)
-                                       bUnit_AsString(val, sizeof(val), len_v3v3(v1, v2)*unit->scale_length, 3, unit->system, B_UNIT_LENGTH, do_split, FALSE);
+                                       bUnit_AsString(numstr, sizeof(numstr), len_v3v3(v1, v2)*unit->scale_length, 3, unit->system, B_UNIT_LENGTH, do_split, FALSE);
                                else
-                                       sprintf(val, conv_float, len_v3v3(v1, v2));
+                                       sprintf(numstr, conv_float, len_v3v3(v1, v2));
 
-                               view3d_cached_text_draw_add(vmid, val, 0, V3D_CACHE_TEXT_ASCII, col);
+                               view3d_cached_text_draw_add(vmid, numstr, 0, V3D_CACHE_TEXT_ASCII, col);
                        }
                }
        }
@@ -2730,11 +2730,11 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, EditMesh *em, UnitSet
                                        area = area_tri_v3(v1, v2, v3);
 
                                if(unit->system)
-                                       bUnit_AsString(val, sizeof(val), area*unit->scale_length, 3, unit->system, B_UNIT_LENGTH, do_split, FALSE); // XXX should be B_UNIT_AREA
+                                       bUnit_AsString(numstr, sizeof(numstr), area*unit->scale_length, 3, unit->system, B_UNIT_LENGTH, do_split, FALSE); // XXX should be B_UNIT_AREA
                                else
-                                       sprintf(val, conv_float, area);
+                                       sprintf(numstr, conv_float, area);
 
-                               view3d_cached_text_draw_add(efa->cent, val, 0, V3D_CACHE_TEXT_ASCII, col);
+                               view3d_cached_text_draw_add(efa->cent, numstr, 0, V3D_CACHE_TEXT_ASCII, col);
                        }
                }
        }
@@ -2768,31 +2768,31 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, EditMesh *em, UnitSet
                                
                        if( (e4->f & e1->f & SELECT) || (do_moving && (efa->v1->f & SELECT)) ) {
                                /* Vec 1 */
-                               sprintf(val,"%.3g", RAD2DEGF(angle_v3v3v3(v4, v1, v2)));
+                               sprintf(numstr,"%.3g", RAD2DEGF(angle_v3v3v3(v4, v1, v2)));
                                interp_v3_v3v3(fvec, efa->cent, efa->v1->co, 0.8f);
-                               view3d_cached_text_draw_add(fvec, val, 0, V3D_CACHE_TEXT_ASCII, col);
+                               view3d_cached_text_draw_add(fvec, numstr, 0, V3D_CACHE_TEXT_ASCII, col);
                        }
                        if( (e1->f & e2->f & SELECT) || (do_moving && (efa->v2->f & SELECT)) ) {
                                /* Vec 2 */
-                               sprintf(val,"%.3g", RAD2DEGF(angle_v3v3v3(v1, v2, v3)));
+                               sprintf(numstr,"%.3g", RAD2DEGF(angle_v3v3v3(v1, v2, v3)));
                                interp_v3_v3v3(fvec, efa->cent, efa->v2->co, 0.8f);
-                               view3d_cached_text_draw_add(fvec, val, 0, V3D_CACHE_TEXT_ASCII, col);
+                               view3d_cached_text_draw_add(fvec, numstr, 0, V3D_CACHE_TEXT_ASCII, col);
                        }
                        if( (e2->f & e3->f & SELECT) || (do_moving && (efa->v3->f & SELECT)) ) {
                                /* Vec 3 */
                                if(efa->v4) 
-                                       sprintf(val,"%.3g", RAD2DEGF(angle_v3v3v3(v2, v3, v4)));
+                                       sprintf(numstr,"%.3g", RAD2DEGF(angle_v3v3v3(v2, v3, v4)));
                                else
-                                       sprintf(val,"%.3g", RAD2DEGF(angle_v3v3v3(v2, v3, v1)));
+                                       sprintf(numstr,"%.3g", RAD2DEGF(angle_v3v3v3(v2, v3, v1)));
                                interp_v3_v3v3(fvec, efa->cent, efa->v3->co, 0.8f);
-                               view3d_cached_text_draw_add(fvec, val, 0, V3D_CACHE_TEXT_ASCII, col);
+                               view3d_cached_text_draw_add(fvec, numstr, 0, V3D_CACHE_TEXT_ASCII, col);
                        }
                                /* Vec 4 */
                        if(efa->v4) {
                                if( (e3->f & e4->f & SELECT) || (do_moving && (efa->v4->f & SELECT)) ) {
-                                       sprintf(val,"%.3g", RAD2DEGF(angle_v3v3v3(v3, v4, v1)));
+                                       sprintf(numstr,"%.3g", RAD2DEGF(angle_v3v3v3(v3, v4, v1)));
                                        interp_v3_v3v3(fvec, efa->cent, efa->v4->co, 0.8f);
-                                       view3d_cached_text_draw_add(fvec, val, 0, V3D_CACHE_TEXT_ASCII, col);
+                                       view3d_cached_text_draw_add(fvec, numstr, 0, V3D_CACHE_TEXT_ASCII, col);
                                }
                        }
                }
@@ -2805,7 +2805,7 @@ static void draw_em_indices(EditMesh *em)
        EditFace *f;
        EditVert *v;
        int i;
-       char val[32];
+       char numstr[32];
        float pos[3];
        unsigned char col[4];
 
@@ -2815,8 +2815,8 @@ static void draw_em_indices(EditMesh *em)
                UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEANG, col);
                for (v = em->verts.first, i = 0; v; v = v->next, i++) {
                        if (v->f & SELECT) {
-                               sprintf(val, "%d", i);
-                               view3d_cached_text_draw_add(v->co, val, 0, V3D_CACHE_TEXT_ASCII, col);
+                               sprintf(numstr, "%d", i);
+                               view3d_cached_text_draw_add(v->co, numstr, 0, V3D_CACHE_TEXT_ASCII, col);
                        }
                }
        }
@@ -2825,9 +2825,9 @@ static void draw_em_indices(EditMesh *em)
                UI_GetThemeColor3ubv(TH_DRAWEXTRA_EDGELEN, col);
                for (e = em->edges.first, i = 0; e; e = e->next, i++) {
                        if (e->f & SELECT) {
-                               sprintf(val, "%d", i);
+                               sprintf(numstr, "%d", i);
                                mid_v3_v3v3(pos, e->v1->co, e->v2->co);
-                               view3d_cached_text_draw_add(pos, val, 0, V3D_CACHE_TEXT_ASCII, col);
+                               view3d_cached_text_draw_add(pos, numstr, 0, V3D_CACHE_TEXT_ASCII, col);
                        }
                }
        }
@@ -2836,8 +2836,8 @@ static void draw_em_indices(EditMesh *em)
                UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEAREA, col);
                for (f = em->faces.first, i = 0; f; f = f->next, i++) {
                        if (f->f & SELECT) {
-                               sprintf(val, "%d", i);
-                               view3d_cached_text_draw_add(f->cent, val, 0, V3D_CACHE_TEXT_ASCII, col);
+                               sprintf(numstr, "%d", i);
+                               view3d_cached_text_draw_add(f->cent, numstr, 0, V3D_CACHE_TEXT_ASCII, col);
                        }
                }
        }
@@ -4042,7 +4042,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
        int a, totpart, totpoint=0, totve=0, drawn, draw_as, totchild=0;
        int select=ob->flag&SELECT, create_cdata=0, need_v=0;
        GLint polygonmode[2];
-       char val[32];
+       char numstr[32];
        unsigned char tcol[4]= {0, 0, 0, 255};
 
 /* 1. */
@@ -4430,8 +4430,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
 
                                if((part->draw & PART_DRAW_NUM || part->draw & PART_DRAW_HEALTH) && (v3d->flag2 & V3D_RENDER_OVERRIDE)==0){
                                        float vec_txt[3];
-                                       char *val_pos= val;
-                                       val[0]= '\0';
+                                       char *val_pos= numstr;
+                                       numstr[0]= '\0';
 
                                        if(part->draw&PART_DRAW_NUM) {
                                                if(a < totpart && (part->draw & PART_DRAW_HEALTH) && (part->phystype==PART_PHYS_BOIDS)) {
@@ -4450,7 +4450,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
                                        /* in path drawing state.co is the end point */
                                        /* use worldspace beause object matrix is already applied */
                                        mul_v3_m4v3(vec_txt, ob->imat, state.co);
-                                       view3d_cached_text_draw_add(vec_txt, val, 10, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, tcol);
+                                       view3d_cached_text_draw_add(vec_txt, numstr, 10, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, tcol);
                                }
                        }
                }
@@ -4539,10 +4539,10 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
 
                        for(a=0, pa=psys->particles; a<totpart; a++, pa++){
                                float vec_txt[3];
-                               sprintf(val, "%i", a);
+                               sprintf(numstr, "%i", a);
                                /* use worldspace beause object matrix is already applied */
                                mul_v3_m4v3(vec_txt, ob->imat, cache[a]->co);
-                               view3d_cached_text_draw_add(vec_txt, val, 10, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, tcol);
+                               view3d_cached_text_draw_add(vec_txt, numstr, 10, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, tcol);
                        }
                }
        }
index 1b923c7..3353030 100644 (file)
@@ -1334,7 +1334,7 @@ static void view3d_panel_preview(bContext *C, ARegion *ar, short cntrl)   // VIEW3
        View3D *v3d= sa->spacedata.first;
        int ofsx, ofsy;
        
-       block= uiBeginBlock(C, ar, "view3d_panel_preview", UI_EMBOSS);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
        uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | UI_PNL_SCALE | cntrl);
        uiSetPanelHandler(VIEW3D_HANDLER_PREVIEW);  // for close and esc
        
index 3b35517..0f08c19 100644 (file)
@@ -2890,14 +2890,14 @@ static void view3d_main_area_draw_info(const bContext *C, ARegion *ar, const cha
                draw_viewport_name(ar, v3d);
        }
        if (grid_unit) { /* draw below the viewport name */
-               char tstr[32]= "";
+               char numstr[32]= "";
 
                UI_ThemeColor(TH_TEXT_HI);
                if(v3d->grid != 1.0f) {
-                       BLI_snprintf(tstr, sizeof(tstr), "%s x %.4g", grid_unit, v3d->grid);
+                       BLI_snprintf(numstr, sizeof(numstr), "%s x %.4g", grid_unit, v3d->grid);
                }
 
-               BLF_draw_default_ascii(22,  ar->winy-(USER_SHOW_VIEWPORTNAME?40:20), 0.0f, tstr[0]?tstr : grid_unit, sizeof(tstr)); /* XXX, use real length */
+               BLF_draw_default_ascii(22,  ar->winy-(USER_SHOW_VIEWPORTNAME?40:20), 0.0f, numstr[0]?numstr : grid_unit, sizeof(numstr)); /* XXX, use real length */
        }
 }
 
index 03e169a..9fb0dd1 100644 (file)
@@ -167,7 +167,7 @@ void GPU_shader_uniform_vector(GPUShader *shader, int location, int length,
        int arraysize, float *value);
 void GPU_shader_uniform_texture(GPUShader *shader, int location, GPUTexture *tex);
 
-int GPU_shader_get_attribute(GPUShader *shader, char *name);
+int GPU_shader_get_attribute(GPUShader *shader, const char *name);
 
 /* Vertex attributes for shaders */
 
index c4ed886..cc486b7 100644 (file)
@@ -1156,7 +1156,7 @@ void GPU_shader_uniform_texture(GPUShader *UNUSED(shader), int location, GPUText
        GPU_print_error("Post Uniform Texture");
 }
 
-int GPU_shader_get_attribute(GPUShader *shader, char *name)
+int GPU_shader_get_attribute(GPUShader *shader, const char *name)
 {
        int index;
        
index 2ab876b..2a28a7e 100644 (file)
@@ -939,7 +939,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op)
        int width= 300;
        
 
-       block= uiBeginBlock(C, ar, "redo_popup", UI_EMBOSS);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
        uiBlockClearFlag(block, UI_BLOCK_LOOP);
        uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT);
 
@@ -1015,7 +1015,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData)
        uiLayout *layout;
        uiStyle *style= UI_GetStyle();
 
-       block = uiBeginBlock(C, ar, "operator dialog", UI_EMBOSS);
+       block = uiBeginBlock(C, ar, __func__, UI_EMBOSS);
        uiBlockClearFlag(block, UI_BLOCK_LOOP);
        uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT);
 
@@ -1056,7 +1056,7 @@ static uiBlock *wm_operator_ui_create(bContext *C, ARegion *ar, void *userData)
        uiLayout *layout;
        uiStyle *style= UI_GetStyle();
 
-       block= uiBeginBlock(C, ar, "opui_popup", UI_EMBOSS);
+       block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
        uiBlockClearFlag(block, UI_BLOCK_LOOP);
        uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT);
 
index 9efb811..6488c37 100644 (file)
@@ -349,7 +349,7 @@ void uiItemBooleanO(struct uiLayout *layout, char *name, int icon, char *opname,
 void uiItemIntO(struct uiLayout *layout, char *name, int icon, char *opname, char *propname, int value){}
 void uiItemFloatO(struct uiLayout *layout, char *name, int icon, char *opname, char *propname, float value){}
 void uiItemStringO(struct uiLayout *layout, char *name, int icon, char *opname, char *propname, char *value){}
-void uiItemL(struct uiLayout *layout, char *name, int icon){}
+void uiItemL(struct uiLayout *layout, const char *name, int icon){}
 void uiItemM(struct uiLayout *layout, struct bContext *C, char *menuname, char *name, int icon){}
 void uiItemS(struct uiLayout *layout){}
 void uiItemFullR(struct uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, char *name, int icon){}