Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-02 16:12:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-02 16:12:30 +0300
commit369a5cc29e80d0ac30f9db444f2c0f9c1da32e01 (patch)
treee6510d985b37ef027e5614da8b5479a2d95c7a92 /source/blender/editors/space_console
parent5d7ed88f17c7a253c81ee48c147149d73dd88e6a (diff)
fix for compiling with the c90 standard, support for non-static variable initializers is a c99 feature.
Diffstat (limited to 'source/blender/editors/space_console')
-rw-r--r--source/blender/editors/space_console/console_draw.c12
-rw-r--r--source/blender/editors/space_console/console_ops.c16
2 files changed, 22 insertions, 6 deletions
diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c
index edbb539e836..f1fead47a0a 100644
--- a/source/blender/editors/space_console/console_draw.c
+++ b/source/blender/editors/space_console/console_draw.c
@@ -270,7 +270,11 @@ static int console_draw_string(ConsoleDrawContext *cdc, char *str, int str_len,
BLF_draw(mono, str);
if(cdc->sel[0] != cdc->sel[1]) {
- int isel[2]= {str_len - cdc->sel[1], str_len - cdc->sel[0]};
+ int isel[2];
+
+ isel[0]= str_len - cdc->sel[1];
+ isel[1]= str_len - cdc->sel[0];
+
// glColor4ub(255, 255, 0, 96); // debug
console_draw_sel(isel, cdc->xy, str_len, cdc->cwidth, cdc->lheight);
STEP_SEL(-(str_len + 1));
@@ -447,8 +451,12 @@ int console_text_height(struct SpaceConsole *sc, struct ARegion *ar, ReportList
void *console_text_pick(struct SpaceConsole *sc, struct ARegion *ar, ReportList *reports, int mouse_y)
{
- int mval[2] = {0, mouse_y};
void *mouse_pick= NULL;
+ int mval[2];
+
+ mval[0]= 0;
+ mval[1]= mouse_y;
+
console_text_main__internal(sc, ar, reports, 0, mval, &mouse_pick, NULL);
return (void *)mouse_pick;
}
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index 2b419b0a833..ceb16d2aab9 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -404,12 +404,17 @@ static int 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")) {
- char str[2] = {event->ascii, '\0'};
/* if alt/ctrl/super are pressed pass through */
- if(event->ctrl || event->oskey)
+ if(event->ctrl || event->oskey) {
return OPERATOR_PASS_THROUGH;
+ }
+ else {
+ char str[2];
+ str[0]= event->ascii;
+ str[1]= '\0';
- RNA_string_set(op->ptr, "text", str);
+ RNA_string_set(op->ptr, "text", str);
+ }
}
return insert_exec(C, op);
}
@@ -863,7 +868,10 @@ static void console_modal_select_apply(bContext *C, wmOperator *op, wmEvent *eve
SpaceConsole *sc= CTX_wm_space_console(C);
ARegion *ar= CTX_wm_region(C);
SetConsoleCursor *scu= op->customdata;
- int mval[2] = {event->mval[0], event->mval[1]};
+ int mval[2];
+
+ mval[0]= event->mval[0];
+ mval[1]= event->mval[1];
set_cursor_to_pos(sc, ar, scu, mval, TRUE);
ED_area_tag_redraw(CTX_wm_area(C));