[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18729] branches/blender2.5/blender/source : Moving Language code from interface/text.c to blenfont library.

Diego Borghetti bdiego at gmail.com
Thu Jan 29 06:19:52 CET 2009


Revision: 18729
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18729
Author:   bdiego
Date:     2009-01-29 06:19:27 +0100 (Thu, 29 Jan 2009)

Log Message:
-----------
Moving Language code from interface/text.c to blenfont library.

I go to start commit the new code here and then replace one
by one bmfont and ftfont, this do nothing right now, but it's
more easy keep the files here to work from the studio and my home.

I only update the Makefile and SConscript (but JesterKing a double
check never is bad), so please check the msvc and cmake files.

The new library is libblenfont.a

Modified Paths:
--------------
    branches/blender2.5/blender/source/Makefile
    branches/blender2.5/blender/source/blender/Makefile
    branches/blender2.5/blender/source/blender/SConscript
    branches/blender2.5/blender/source/blender/editors/include/UI_text.h
    branches/blender2.5/blender/source/blender/editors/interface/Makefile
    branches/blender2.5/blender/source/blender/editors/interface/text.c
    branches/blender2.5/blender/source/blender/windowmanager/SConscript
    branches/blender2.5/blender/source/blender/windowmanager/intern/Makefile
    branches/blender2.5/blender/source/blender/windowmanager/intern/wm_files.c
    branches/blender2.5/blender/source/blender/windowmanager/intern/wm_init_exit.c

Added Paths:
-----------
    branches/blender2.5/blender/source/blender/blenfont/
    branches/blender2.5/blender/source/blender/blenfont/BLF_api.h
    branches/blender2.5/blender/source/blender/blenfont/Makefile
    branches/blender2.5/blender/source/blender/blenfont/SConscript
    branches/blender2.5/blender/source/blender/blenfont/intern/
    branches/blender2.5/blender/source/blender/blenfont/intern/Makefile
    branches/blender2.5/blender/source/blender/blenfont/intern/blf_internal_types.h
    branches/blender2.5/blender/source/blender/blenfont/intern/blf_lang.c

Modified: branches/blender2.5/blender/source/Makefile
===================================================================
--- branches/blender2.5/blender/source/Makefile	2009-01-29 03:50:46 UTC (rev 18728)
+++ branches/blender2.5/blender/source/Makefile	2009-01-29 05:19:27 UTC (rev 18729)
@@ -107,6 +107,7 @@
 COMLIB += $(OCGDIR)/blender/gpu/$(DEBUG_DIR)libgpu.a
 COMLIB += $(NAN_GLEW)/lib/libglew.a
 COMLIB += $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a
+COMLIB += $(OCGDIR)/blender/blenfont/$(DEBUG_DIR)libblenfont.a
 
 ifneq ($(NAN_NO_KETSJI),true)
     COMLIB += $(OCGDIR)/gameengine/bloutines/$(DEBUG_DIR)libbloutines.a

Modified: branches/blender2.5/blender/source/blender/Makefile
===================================================================
--- branches/blender2.5/blender/source/blender/Makefile	2009-01-29 03:50:46 UTC (rev 18728)
+++ branches/blender2.5/blender/source/blender/Makefile	2009-01-29 05:19:27 UTC (rev 18729)
@@ -34,6 +34,7 @@
 DIRS += avi imbuf render radiosity blenlib blenkernel blenpluginapi
 DIRS += makesdna makesrna yafray
 DIRS += python nodes gpu
+DIRS += blenfont
 
 ifeq ($(WITH_FREETYPE2), true)
 	DIRS += ftfont

Modified: branches/blender2.5/blender/source/blender/SConscript
===================================================================
--- branches/blender2.5/blender/source/blender/SConscript	2009-01-29 03:50:46 UTC (rev 18728)
+++ branches/blender2.5/blender/source/blender/SConscript	2009-01-29 05:19:27 UTC (rev 18729)
@@ -17,7 +17,8 @@
             'readblenfile/SConscript',
             'render/SConscript',
             'nodes/SConscript',
-            'windowmanager/SConscript'])
+            'windowmanager/SConscript',
+	    'blenfont/SConscript'])
 
 
 

Added: branches/blender2.5/blender/source/blender/blenfont/BLF_api.h
===================================================================
--- branches/blender2.5/blender/source/blender/blenfont/BLF_api.h	                        (rev 0)
+++ branches/blender2.5/blender/source/blender/blenfont/BLF_api.h	2009-01-29 05:19:27 UTC (rev 18729)
@@ -0,0 +1,52 @@
+/**
+ * $Id:
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. 
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2009 Blender Foundation.
+ * All rights reserved.
+ *
+ * 
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef BLF_API_H
+#define BLF_API_H
+
+/* Read the .Blanguages file, return 1 on success or 0 if fails. */
+int BLF_lang_init(void);
+
+/* Free the memory allocate for the .Blanguages. */
+void BLF_lang_exit(void);
+
+/* Set the current Language. */
+void BLF_lang_set(int id);
+
+/* Return a string with all the Language available. */
+char *BLF_lang_pup(void);
+
+/* Return the number of invalid lines in the .Blanguages file,
+ * zero means no error found.
+ */
+int BLF_lang_error(void);
+
+/* Return the code string for the specified language code. */
+char *BLF_lang_find_code(short langid);
+
+#endif /* BLF_API_H */

Added: branches/blender2.5/blender/source/blender/blenfont/Makefile
===================================================================
--- branches/blender2.5/blender/source/blender/blenfont/Makefile	                        (rev 0)
+++ branches/blender2.5/blender/source/blender/blenfont/Makefile	2009-01-29 05:19:27 UTC (rev 18729)
@@ -0,0 +1,30 @@
+#
+# $Id:
+#
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2009 Blender Foundation
+# All rights reserved.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL LICENSE BLOCK *****
+
+SOURCEDIR = source/blender/blenfont
+DIRS = intern
+
+include nan_subdirs.mk

Added: branches/blender2.5/blender/source/blender/blenfont/SConscript
===================================================================
--- branches/blender2.5/blender/source/blender/blenfont/SConscript	                        (rev 0)
+++ branches/blender2.5/blender/source/blender/blenfont/SConscript	2009-01-29 05:19:27 UTC (rev 18729)
@@ -0,0 +1,9 @@
+#!/usr/bin/python
+import sys
+Import ('env')
+
+sources = env.Glob('intern/*.c')
+
+incs = '. intern ../blenkernel ../blenlib ../makesdna ../ftfont'
+
+env.BlenderLib ( 'bf_blenfont', sources, Split(incs), Split(defs), libtype=['core'], priority=[210] )

Added: branches/blender2.5/blender/source/blender/blenfont/intern/Makefile
===================================================================
--- branches/blender2.5/blender/source/blender/blenfont/intern/Makefile	                        (rev 0)
+++ branches/blender2.5/blender/source/blender/blenfont/intern/Makefile	2009-01-29 05:19:27 UTC (rev 18729)
@@ -0,0 +1,42 @@
+#
+# $Id:
+#
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2008 Blender Foundation.
+# All rights reserved.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL LICENSE BLOCK *****
+#
+#
+
+LIBNAME = blenfont
+DIR = $(OCGDIR)/blender/blenfont
+
+include nan_compile.mk
+
+CFLAGS += $(LEVEL_1_C_WARNINGS)
+
+CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
+CPPFLAGS += -I../../makesdna
+CPPFLAGS += -I../../blenlib
+CPPFLAGS += -I../../blenkernel
+CPPFLAGS += -I../../ftfont
+
+CPPFLAGS += -I..

Added: branches/blender2.5/blender/source/blender/blenfont/intern/blf_internal_types.h
===================================================================
--- branches/blender2.5/blender/source/blender/blenfont/intern/blf_internal_types.h	                        (rev 0)
+++ branches/blender2.5/blender/source/blender/blenfont/intern/blf_internal_types.h	2009-01-29 05:19:27 UTC (rev 18729)
@@ -0,0 +1,45 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. 
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2008 Blender Foundation.
+ * All rights reserved.
+ * 
+ * Contributor(s): Blender Foundation.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef BLF_INTERNAL_TYPES_H
+#define BLF_INTERNAL_TYPES_H
+
+typedef struct LangBLF {
+	struct LangBLF *next;
+	struct LangBLF *prev;
+
+	char *line;
+	char *language;
+	char *code;
+	int id;
+} LangBLF;
+
+#define BLF_LANG_FIND_BY_LINE 0
+#define BLF_LANG_FIND_BY_LANGUAGE 1
+#define BLF_LANG_FIND_BY_CODE 2
+
+#endif /* BLF_INTERNAL_TYPES_H */

Added: branches/blender2.5/blender/source/blender/blenfont/intern/blf_lang.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenfont/intern/blf_lang.c	                        (rev 0)
+++ branches/blender2.5/blender/source/blender/blenfont/intern/blf_lang.c	2009-01-29 05:19:27 UTC (rev 18729)
@@ -0,0 +1,242 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. 
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2008 Blender Foundation.
+ * All rights reserved.
+ * 
+ * Contributor(s): Blender Foundation.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_listBase.h"
+
+#include "BKE_utildefines.h"
+

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list