Revision: 46553
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46553
Author:   campbellbarton
Date:     2012-05-11 16:11:52 +0000 (Fri, 11 May 2012)
Log Message:
-----------
style cleanup: whitespace

Modified Paths:
--------------
    trunk/blender/source/blender/blenfont/BLF_api.h
    trunk/blender/source/blender/blenfont/intern/blf_dir.c
    trunk/blender/source/blender/blenfont/intern/blf_font.c
    trunk/blender/source/blender/blenfont/intern/blf_glyph.c
    trunk/blender/source/blender/blenfont/intern/blf_lang.c
    trunk/blender/source/blender/blenfont/intern/blf_translation.c

Modified: trunk/blender/source/blender/blenfont/BLF_api.h
===================================================================
--- trunk/blender/source/blender/blenfont/BLF_api.h     2012-05-11 14:53:48 UTC 
(rev 46552)
+++ trunk/blender/source/blender/blenfont/BLF_api.h     2012-05-11 16:11:52 UTC 
(rev 46553)
@@ -174,12 +174,12 @@
 void BLF_dir_free(char **dirs, int count);
 
 /* font->flags. */
-#define BLF_ROTATION (1<<0)
-#define BLF_CLIPPING (1<<1)
-#define BLF_SHADOW (1<<2)
-#define BLF_KERNING_DEFAULT (1<<3)
-#define BLF_MATRIX (1<<4)
-#define BLF_ASPECT (1<<5)
+#define BLF_ROTATION         (1 << 0)
+#define BLF_CLIPPING         (1 << 1)
+#define BLF_SHADOW           (1 << 2)
+#define BLF_KERNING_DEFAULT  (1 << 3)
+#define BLF_MATRIX           (1 << 4)
+#define BLF_ASPECT           (1 << 5)
 
 #define BLF_DRAW_STR_DUMMY_MAX 1024
 

Modified: trunk/blender/source/blender/blenfont/intern/blf_dir.c
===================================================================
--- trunk/blender/source/blender/blenfont/intern/blf_dir.c      2012-05-11 
14:53:48 UTC (rev 46552)
+++ trunk/blender/source/blender/blenfont/intern/blf_dir.c      2012-05-11 
16:11:52 UTC (rev 46553)
@@ -163,10 +163,10 @@
                        file[i] = str[i];
 
                file[i] = '.';
-               file[i+1] = 't';
-               file[i+2] = 't';
-               file[i+3] = 'f';
-               file[i+4] = '\0';
+               file[i + 1] = 't';
+               file[i + 2] = 't';
+               file[i + 3] = 'f';
+               file[i + 4] = '\0';
                s++;
                *size = atoi(s);
                return 1;

Modified: trunk/blender/source/blender/blenfont/intern/blf_font.c
===================================================================
--- trunk/blender/source/blender/blenfont/intern/blf_font.c     2012-05-11 
14:53:48 UTC (rev 46552)
+++ trunk/blender/source/blender/blenfont/intern/blf_font.c     2012-05-11 
16:11:52 UTC (rev 46553)
@@ -45,7 +45,7 @@
 
 
 #include "BLI_blenlib.h"
-#include "BLI_linklist.h"      /* linknode */
+#include "BLI_linklist.h"  /* linknode */
 #include "BLI_math.h"
 
 #include "BIF_gl.h"
@@ -103,7 +103,7 @@
        if (glyph_ascii_table['0'] == NULL) {
                GlyphBLF *g;
                unsigned int i;
-               for (i = 0; i<256; i++) {
+               for (i = 0; i < 256; i++) {
                        g = blf_glyph_search(font->glyph_cache, i);
                        if (!g) {
                                FT_UInt glyph_index = 
FT_Get_Char_Index(font->face, i);
@@ -263,7 +263,7 @@
                        /* don't draw beyond the buffer bounds */
                        int width_clip = g->width;
                        int height_clip = g->height;
-                       int yb_start = g->pitch < 0 ? 0 : g->height-1;
+                       int yb_start = g->pitch < 0 ? 0 : g->height - 1;
 
                        if (width_clip + chx > font->bw)
                                width_clip -= chx + width_clip - font->bw;
@@ -285,7 +285,7 @@
 
                                                if (a > 0.0f) {
                                                        float alphatest;
-                                                       fbuf = font->b_fbuf + 
font->bch * ((chx + x) + ((pen_y + y)*font->bw));
+                                                       fbuf = font->b_fbuf + 
font->bch * ((chx + x) + ((pen_y + y) * font->bw));
                                                        if (a >= 1.0f) {
                                                                fbuf[0] = 
font->b_col[0];
                                                                fbuf[1] = 
font->b_col[1];
@@ -293,10 +293,10 @@
                                                                fbuf[3] = 
(alphatest = (fbuf[3] + (font->b_col[3]))) < 1.0f ? alphatest : 1.0f;
                                                        }
                                                        else {
-                                                               fbuf[0] = 
(font->b_col[0]*a) + (fbuf[0] * (1-a));
-                                                               fbuf[1] = 
(font->b_col[1]*a) + (fbuf[1] * (1-a));
-                                                               fbuf[2] = 
(font->b_col[2]*a) + (fbuf[2] * (1-a));
-                                                               fbuf[3] = 
(alphatest = (fbuf[3] + (font->b_col[3]*a))) < 1.0f ? alphatest : 1.0f;
+                                                               fbuf[0] = 
(font->b_col[0] * a) + (fbuf[0] * (1 - a));
+                                                               fbuf[1] = 
(font->b_col[1] * a) + (fbuf[1] * (1 - a));
+                                                               fbuf[2] = 
(font->b_col[2] * a) + (fbuf[2] * (1 - a));
+                                                               fbuf[3] = 
(alphatest = (fbuf[3] + (font->b_col[3] * a))) < 1.0f ? alphatest : 1.0f;
                                                        }
                                                }
                                        }
@@ -316,7 +316,7 @@
 
                                                if (a > 0.0f) {
                                                        int alphatest;
-                                                       cbuf = font->b_cbuf + 
font->bch * ((chx + x) + ((pen_y + y)*font->bw));
+                                                       cbuf = font->b_cbuf + 
font->bch * ((chx + x) + ((pen_y + y) * font->bw));
                                                        if (a >= 1.0f) {
                                                                cbuf[0] = 
b_col_char[0];
                                                                cbuf[1] = 
b_col_char[1];
@@ -324,10 +324,10 @@
                                                                cbuf[3] = 
(alphatest = ((int)cbuf[3] + (int)b_col_char[3])) < 255 ? alphatest : 255;
                                                        }
                                                        else {
-                                                               cbuf[0] = 
(b_col_char[0]*a) + (cbuf[0] * (1-a));
-                                                               cbuf[1] = 
(b_col_char[1]*a) + (cbuf[1] * (1-a));
-                                                               cbuf[2] = 
(b_col_char[2]*a) + (cbuf[2] * (1-a));
-                                                               cbuf[3] = 
(alphatest = ((int)cbuf[3] + (int)((font->b_col[3]*a)*255.0f))) <
+                                                               cbuf[0] = 
(b_col_char[0] * a) + (cbuf[0] * (1 - a));
+                                                               cbuf[1] = 
(b_col_char[1] * a) + (cbuf[1] * (1 - a));
+                                                               cbuf[2] = 
(b_col_char[2] * a) + (cbuf[2] * (1 - a));
+                                                               cbuf[3] = 
(alphatest = ((int)cbuf[3] + (int)((font->b_col[3] * a) * 255.0f))) <
                                                                          255 ? 
alphatest : 255;
                                                        }
                                                }

Modified: trunk/blender/source/blender/blenfont/intern/blf_glyph.c
===================================================================
--- trunk/blender/source/blender/blenfont/intern/blf_glyph.c    2012-05-11 
14:53:48 UTC (rev 46552)
+++ trunk/blender/source/blender/blenfont/intern/blf_glyph.c    2012-05-11 
16:11:52 UTC (rev 46553)
@@ -82,7 +82,7 @@
        memset(gc->glyph_ascii_table, 0, sizeof(gc->glyph_ascii_table));
        memset(gc->bucket, 0, sizeof(gc->bucket));
 
-       gc->textures = (GLuint *)malloc(sizeof(GLuint)*256);
+       gc->textures = (GLuint *)malloc(sizeof(GLuint) * 256);
        gc->ntex = 256;
        gc->cur_tex = -1;
        gc->x_offs = 0;
@@ -147,8 +147,8 @@
                }
        }
 
-       if (gc->cur_tex+1 > 0)
-               glDeleteTextures(gc->cur_tex+1, gc->textures);
+       if (gc->cur_tex + 1 > 0)
+               glDeleteTextures(gc->cur_tex + 1, gc->textures);
        free((void *)gc->textures);
        MEM_freeN(gc);
 }
@@ -163,7 +163,7 @@
 
        if (gc->cur_tex >= gc->ntex) {
                gc->ntex *= 2;
-               gc->textures = (GLuint *)realloc((void *)gc->textures, 
sizeof(GLuint)*gc->ntex);
+               gc->textures = (GLuint *)realloc((void *)gc->textures, 
sizeof(GLuint) * gc->ntex);
        }
 
        gc->p2_width = blf_next_p2((gc->rem_glyphs * gc->max_glyph_width) + 
(gc->pad * 2));
@@ -223,7 +223,7 @@
        if (sharp)
                err = FT_Load_Glyph(font->face, (FT_UInt)index, 
FT_LOAD_TARGET_MONO);
        else
-               err = FT_Load_Glyph(font->face, (FT_UInt)index, 
FT_LOAD_TARGET_NORMAL | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP); /* Sure about 
NO_* flags? */
+               err = FT_Load_Glyph(font->face, (FT_UInt)index, 
FT_LOAD_TARGET_NORMAL | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP);  /* Sure about 
NO_* flags? */
        if (err)
                return NULL;
 
@@ -314,11 +314,11 @@
 
 static void blf_texture5_draw(const float shadow_col[4], float uv[2][2], float 
x1, float y1, float x2, float y2)
 {
-       float soft[25] = {1/60.0f, 1/60.0f, 2/60.0f, 1/60.0f, 1/60.0f,
-                         1/60.0f, 3/60.0f, 5/60.0f, 3/60.0f, 1/60.0f,
-                         2/60.0f, 5/60.0f, 8/60.0f, 5/60.0f, 2/60.0f,
-                         1/60.0f, 3/60.0f, 5/60.0f, 3/60.0f, 1/60.0f,
-                         1/60.0f, 1/60.0f, 2/60.0f, 1/60.0f, 1/60.0f};
+       float soft[25] = {1 / 60.0f, 1 / 60.0f, 2 / 60.0f, 1 / 60.0f, 1 / 60.0f,
+                         1 / 60.0f, 3 / 60.0f, 5 / 60.0f, 3 / 60.0f, 1 / 60.0f,
+                         2 / 60.0f, 5 / 60.0f, 8 / 60.0f, 5 / 60.0f, 2 / 60.0f,
+                         1 / 60.0f, 3 / 60.0f, 5 / 60.0f, 3 / 60.0f, 1 / 60.0f,
+                         1 / 60.0f, 1 / 60.0f, 2 / 60.0f, 1 / 60.0f, 1 / 
60.0f};
        
        float color[4], *fp = soft;
        int dx, dy;
@@ -331,7 +331,7 @@
                for (dy = -2; dy < 3; dy++, fp++) {
                        color[3] = *(fp) * shadow_col[3];
                        glColor4fv(color);
-                       blf_texture_draw(uv, x1+dx, y1+dy, x2+dx, y2+dy);
+                       blf_texture_draw(uv, x1 + dx, y1 + dy, x2 + dx, y2 + 
dy);
                }
        }
        
@@ -340,9 +340,9 @@
 
 static void blf_texture3_draw(const float shadow_col[4], float uv[2][2], float 
x1, float y1, float x2, float y2)
 {
-       float soft[9] = {1/16.0f, 2/16.0f, 1/16.0f,
-                        2/16.0f, 4/16.0f, 2/16.0f,
-                        1/16.0f, 2/16.0f, 1/16.0f};
+       float soft[9] = {1 / 16.0f, 2 / 16.0f, 1 / 16.0f,
+                        2 / 16.0f, 4 / 16.0f, 2 / 16.0f,
+                        1 / 16.0f, 2 / 16.0f, 1 / 16.0f};
 
        float color[4], *fp = soft;
        int dx, dy;
@@ -355,7 +355,7 @@
                for (dy = -1; dy < 2; dy++, fp++) {
                        color[3] = *(fp) * shadow_col[3];
                        glColor4fv(color);
-                       blf_texture_draw(uv, x1+dx, y1+dy, x2+dx, y2+dy);
+                       blf_texture_draw(uv, x1 + dx, y1 + dy, x2 + dx, y2 + 
dy);
                }
        }
        

Modified: trunk/blender/source/blender/blenfont/intern/blf_lang.c
===================================================================
--- trunk/blender/source/blender/blenfont/intern/blf_lang.c     2012-05-11 
14:53:48 UTC (rev 46552)
+++ trunk/blender/source/blender/blenfont/intern/blf_lang.c     2012-05-11 
16:11:52 UTC (rev 46553)
@@ -42,7 +42,7 @@
 
 #include <locale.h>
 
-#if defined (_WIN32)
+#if defined(_WIN32)
 #include <windows.h>
 #endif
 
@@ -83,7 +83,7 @@
        "catalan", "ca_AD",
        "czech", "cs_CZ",
        "ptb", "pt",
-#if defined (_WIN32) && !defined(FREE_WINDOWS)
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
        "Chinese (Simplified)_China.1252", "zh_CN",
        "Chinese (Traditional)_China.1252", "zh_TW",
 #else
@@ -170,19 +170,19 @@
        int ok = 1;
        const char *long_locale = locales[2 * U.language];
 
-       if ((U.transopts&USER_DOTRANSLATE) == 0)
+       if ((U.transopts & USER_DOTRANSLATE) == 0)
                return;
 
        if (str)
                short_locale = str;
        else
-               short_locale = locales[ 2 * U.language + 1];
+               short_locale = locales[2 * U.language + 1];
 
-#if defined (_WIN32) && !defined(FREE_WINDOWS)
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
        if (short_locale) {
                char *envStr;
 
-               if (U.language == 0)/* use system setting */
+               if (U.language == 0) /* use system setting */
                        envStr = BLI_sprintfN("LANG=%s", getenv("LANG"));
                else
                        envStr = BLI_sprintfN("LANG=%s", short_locale);
@@ -201,8 +201,8 @@
        }
 #else
        {
-               static char default_lang[64] ="\0";
-               static char default_language[64] ="\0";
+               static char default_lang[64] = "\0";
+               static char default_language[64] = "\0";
 
                if (default_lang[0] == 0)
                        get_language_variable("LANG", default_lang, 
sizeof(default_lang));

Modified: trunk/blender/source/blender/blenfont/intern/blf_translation.c
===================================================================
--- trunk/blender/source/blender/blenfont/intern/blf_translation.c      
2012-05-11 14:53:48 UTC (rev 46552)
+++ trunk/blender/source/blender/blenfont/intern/blf_translation.c      
2012-05-11 16:11:52 UTC (rev 46553)
@@ -39,7 +39,7 @@
 
 /* needed for windows version of gettext */
 #ifndef LC_MESSAGES
-#      define LC_MESSAGES 1729
+#  define LC_MESSAGES 1729
 #endif
 
 #endif
@@ -57,7 +57,7 @@
 #include "DNA_userdef_types.h" /* For user settings. */
 
 #ifdef WITH_INTERNATIONAL
-static const char unifont_filename[] ="droidsans.ttf.gz";

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to