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:
Diffstat (limited to 'source/blender/blenkernel/intern/font.c')
-rw-r--r--source/blender/blenkernel/intern/font.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 9de8af2c981..bf0427e4fee 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -208,7 +208,7 @@ int utf8towchar(wchar_t *w, char *c)
/* The vfont code */
void free_vfont(struct VFont *vf)
{
- if (vf == 0) return;
+ if (vf == NULL) return;
if (vf->data) {
while(vf->data->characters.first)
@@ -476,7 +476,7 @@ static void build_underline(Curve *cu, float x1, float y1, float x2, float y2, i
nu2->flagu = CU_NURB_CYCLIC;
bp = (BPoint*)MEM_callocN(4 * sizeof(BPoint),"underline_bp");
- if (bp == 0){
+ if (bp == NULL){
MEM_freeN(nu2);
return;
}
@@ -544,10 +544,10 @@ static void buildchar(Curve *cu, unsigned long character, CharInfo *info, float
bezt1 = nu1->bezt;
if (bezt1){
nu2 =(Nurb*) MEM_mallocN(sizeof(Nurb),"duplichar_nurb");
- if (nu2 == 0) break;
+ if (nu2 == NULL) break;
memcpy(nu2, nu1, sizeof(struct Nurb));
nu2->resolu= cu->resolu;
- nu2->bp = 0;
+ nu2->bp = NULL;
nu2->knotsu = nu2->knotsv = NULL;
nu2->flag= CU_SMOOTH;
nu2->charidx = charidx;
@@ -562,7 +562,7 @@ static void buildchar(Curve *cu, unsigned long character, CharInfo *info, float
i = nu2->pntsu;
bezt2 = (BezTriple*)MEM_mallocN(i * sizeof(BezTriple),"duplichar_bezt2");
- if (bezt2 == 0){
+ if (bezt2 == NULL){
MEM_freeN(nu2);
break;
}
@@ -686,14 +686,14 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
/* renark: do calculations including the trailing '\0' of a string
because the cursor can be at that location */
- if(ob->type!=OB_FONT) return 0;
+ if(ob->type!=OB_FONT) return NULL;
// Set font data
cu= (Curve *) ob->data;
vfont= cu->vfont;
- if(cu->str == NULL) return 0;
- if(vfont == NULL) return 0;
+ if(cu->str == NULL) return NULL;
+ if(vfont == NULL) return NULL;
// Create unicode string
utf8len = utf8slen(cu->str);
@@ -723,7 +723,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
if(!vfd) {
if(mem)
MEM_freeN(mem);
- return 0;
+ return NULL;
}
/* calc offset and rotation of each char */
@@ -787,11 +787,11 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
che= find_vfont_char(vfd, ascii);
/* No VFont found */
- if (vfont==0) {
+ if (vfont==NULL) {
if(mem)
MEM_freeN(mem);
MEM_freeN(chartransdata);
- return 0;
+ return NULL;
}
if (vfont != oldvfont) {
@@ -804,7 +804,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
if(mem)
MEM_freeN(mem);
MEM_freeN(chartransdata);
- return 0;
+ return NULL;
}
twidth = char_width(cu, che, info);
@@ -1219,7 +1219,5 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
MEM_freeN(mem);
MEM_freeN(chartransdata);
- return 0;
+ return NULL;
}
-
-