diff options
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_customdata_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 23 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_particle_types.h | 9 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 17 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_screen_types.h | 12 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 17 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_tracking_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 48 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_windowmanager_types.h | 18 | ||||
-rw-r--r-- | source/blender/makesdna/SConscript | 28 | ||||
-rw-r--r-- | source/blender/makesdna/intern/SConscript | 28 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 31 |
13 files changed, 168 insertions, 70 deletions
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 6f7bb5a723e..e28b8780250 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -46,7 +46,7 @@ typedef struct CustomDataLayer { int active_clone; /* number of the layer to render*/ int active_mask; /* number of the layer to render*/ int uid; /* shape keyblock unique id reference*/ - char name[64]; /* layer name, MAX_CUSTOMDATA_LAYER_AAME */ + char name[64]; /* layer name, MAX_CUSTOMDATA_LAYER_NAME */ void *data; /* layer data */ } CustomDataLayer; diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 3875a0d5799..089103c66e5 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -76,7 +76,8 @@ typedef enum ModifierType { eModifierType_Remesh = 41, eModifierType_Skin = 42, eModifierType_LaplacianSmooth = 43, - eModifierType_Triangulate = 44, + eModifierType_Triangulate = 44, + eModifierType_UVWarp = 45, NUM_MODIFIER_TYPES } ModifierType; @@ -586,7 +587,7 @@ typedef struct MeshDeformModifierData { /* runtime */ void (*bindfunc)(struct Scene *scene, struct MeshDeformModifierData *mmd, - float *vertexcos, int totvert, float cagemat[][4]); + float *vertexcos, int totvert, float cagemat[4][4]); } MeshDeformModifierData; typedef enum { @@ -1140,4 +1141,20 @@ typedef struct LaplacianSmoothModifierData { short flag, repeat; } LaplacianSmoothModifierData; -#endif +typedef struct UVWarpModifierData { + ModifierData modifier; + + char axis_u, axis_v; + char pad[6]; + float center[2]; /* used for rotate/scale */ + + struct Object *object_src; /* source */ + char bone_src[64]; /* optional name of bone target, MAX_ID_NAME-2 */ + struct Object *object_dst; /* target */ + char bone_dst[64]; /* optional name of bone target, MAX_ID_NAME-2 */ + + char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ + char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ +} UVWarpModifierData; + +#endif /* __DNA_MODIFIER_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 5952aa8afb0..1cf16fb52b3 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -116,6 +116,9 @@ typedef struct ParticleData { float size; /* size and multiplier so that we can update size when ever */ + float sphdensity; /* density of sph particle */ + int pad; + int hair_index; short flag; short alive; /* the life state of a particle */ @@ -130,6 +133,8 @@ typedef struct SPHFluidSettings { float stiffness_k, stiffness_knear, rest_density; float buoyancy; int flag, spring_frames; + short solver; + short pad[3]; } SPHFluidSettings; /* fluid->flag */ @@ -141,6 +146,10 @@ typedef struct SPHFluidSettings { #define SPH_FAC_VISCOSITY 32 #define SPH_FAC_REST_LENGTH 64 +/* fluid->solver (numerical ID field, not bitfield) */ +#define SPH_SOLVER_DDR 0 +#define SPH_SOLVER_CLASSICAL 1 + typedef struct ParticleSettings { ID id; struct AnimData *adt; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 58ab4d0ea09..a2eb54bde99 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -495,7 +495,8 @@ typedef struct RenderData { /* Bake Render options */ short bake_osa, bake_filter, bake_mode, bake_flag; short bake_normal_space, bake_quad_split; - float bake_maxdist, bake_biasdist, bake_pad; + float bake_maxdist, bake_biasdist; + int bake_rays_number; /* path to render output */ char pic[1024]; /* 1024 = FILE_MAX */ @@ -643,7 +644,8 @@ typedef struct GameData { short physicsEngine; short exitkey, pad; short ticrate, maxlogicstep, physubstep, maxphystep; - short obstacleSimulation, pad1; + short obstacleSimulation; + short raster_storage; float levelHeight; float deactivationtime, lineardeactthreshold, angulardeactthreshold, pad2; } GameData; @@ -670,6 +672,12 @@ typedef struct GameData { #define OBSTSIMULATION_TOI_rays 1 #define OBSTSIMULATION_TOI_cells 2 +/* Raster storage */ +#define RAS_STORE_AUTO 0 +#define RAS_STORE_IMMEDIATE 1 +#define RAS_STORE_VA 2 +#define RAS_STORE_VBO 3 + /* GameData.flag */ #define GAME_RESTRICT_ANIM_UPDATES (1 << 0) #define GAME_ENABLE_ALL_FRAMES (1 << 1) @@ -953,7 +961,7 @@ typedef struct ToolSettings { short uvcalc_mapalign; short uvcalc_flag; short uv_flag, uv_selectmode; - short uv_subsurf_level; + short pad2; /* Grease Pencil */ short gpencil_flags; @@ -981,7 +989,7 @@ typedef struct ToolSettings { /* Multires */ char multires_subdiv_type; - char pad2[5]; + char pad3[5]; /* Skeleton generation */ short skgen_resolution; @@ -1206,6 +1214,7 @@ typedef struct Scene { /* seq_flag */ #define R_SEQ_GL_PREV 1 // #define R_SEQ_GL_REND 2 // UNUSED, opengl render has its own operator now. +#define R_SEQ_SOLID_TEX 4 /* displaymode */ diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index b1cd54950e6..de6ddb4b896 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -82,7 +82,8 @@ typedef struct bScreen { typedef struct ScrVert { struct ScrVert *next, *prev, *newv; vec2s vec; - int flag; + /* first one used internally, second one for tools */ + short flag, editflag; } ScrVert; typedef struct ScrEdge { @@ -159,7 +160,8 @@ typedef struct ARegion { short do_draw; /* private, cached notifier events */ short do_draw_overlay; /* private, cached notifier events */ short swap; /* private, indicator to survive swap-exchange */ - short pad[3]; + short overlap; /* private, set for indicate drawing overlapped */ + short pad[2]; struct ARegionType *type; /* callbacks for this region type */ @@ -167,6 +169,8 @@ typedef struct ARegion { ListBase panels; /* Panel */ ListBase handlers; /* wmEventHandler */ + struct wmTimer *regiontimer; /* blend in/out */ + char *headerstr; /* use this string to draw info */ void *regiondata; /* XXX 2.50, need spacedata equivalent? */ } ARegion; @@ -235,10 +239,6 @@ enum { #define RGN_ALIGN_VSPLIT 6 #define RGN_ALIGN_FLOAT 7 #define RGN_ALIGN_QSPLIT 8 -#define RGN_OVERLAP_TOP 9 -#define RGN_OVERLAP_BOTTOM 10 -#define RGN_OVERLAP_LEFT 11 -#define RGN_OVERLAP_RIGHT 12 #define RGN_SPLIT_PREV 32 diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 408dc17c6a0..1f665f2e0c0 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -495,7 +495,7 @@ typedef enum eSpaceSeq_Flag { SEQ_MARKER_TRANS = (1 << 1), SEQ_DRAW_COLOR_SEPARATED = (1 << 2), SEQ_DRAW_SAFE_MARGINS = (1 << 3), -/* SEQ_DRAW_GPENCIL = (1 << 4), */ /* DEPRECATED */ + SEQ_SHOW_GPENCIL = (1 << 4), SEQ_NO_DRAW_CFRANUM = (1 << 5), } eSpaceSeq_Flag; @@ -777,7 +777,7 @@ typedef enum eSpaceImage_Flag { SI_DRAW_TILE = (1 << 19), SI_SMOOTH_UV = (1 << 20), SI_DRAW_STRETCH = (1 << 21), -/* SI_DISPGP = (1 << 22), */ /* deprecated */ + SI_SHOW_GPENCIL = (1 << 22), SI_DRAW_OTHER = (1 << 23), SI_COLOR_CORRECTION = (1 << 24), @@ -798,7 +798,7 @@ typedef struct SpaceText { int top, viewlines; short flags, menunr; - short lheight; /* user preference */ + short lheight; /* user preference, is font_size! */ char cwidth, linenrs_tot; /* runtime computed, character width and the number of chars to use when showing line numbers */ int left; int showlinenrs; @@ -817,8 +817,9 @@ typedef struct SpaceText { char findstr[256]; /* ST_MAX_FIND_STR */ char replacestr[256]; /* ST_MAX_FIND_STR */ - short margin_column; /* column number to show right margin at */ - char pad[6]; + short margin_column; /* column number to show right margin at */ + short lheight_dpi; /* actual lineheight, dpi controlled */ + char pad[4]; void *drawcache; /* cache for faster drawing */ } SpaceText; @@ -887,7 +888,7 @@ typedef struct SpaceNode { struct ID *id, *from; /* context, no need to save in file? well... pinning... */ short flag, pad1; /* menunr: browse id block in header */ - float aspect, aspect_sqrt; + float aspect, pad2; /* internal state variables */ float xof, yof; /* offset for drawing the backdrop */ float zoom; /* zoom for backdrop */ @@ -907,7 +908,7 @@ typedef struct SpaceNode { /* snode->flag */ typedef enum eSpaceNode_Flag { SNODE_BACKDRAW = (1 << 1), -/* SNODE_DISPGP = (1 << 2), */ /* XXX: Grease Pencil - deprecated? */ + SNODE_SHOW_GPENCIL = (1 << 2), SNODE_USE_ALPHA = (1 << 3), SNODE_SHOW_ALPHA = (1 << 4), SNODE_SHOW_R = (1 << 7), @@ -1061,7 +1062,7 @@ typedef enum eSpaceClip_Flag { SC_SHOW_GRID = (1 << 9), SC_SHOW_STABLE = (1 << 10), SC_MANUAL_CALIBRATION = (1 << 11), -/* SC_SHOW_GPENCIL = (1 << 12),*/ /* UNUSED */ + SC_SHOW_GPENCIL = (1 << 12), SC_SHOW_FILTERS = (1 << 13), SC_SHOW_GRAPH_FRAMES = (1 << 14), SC_SHOW_GRAPH_TRACKS = (1 << 15), diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h index 12819303b26..b258fbaa668 100644 --- a/source/blender/makesdna/DNA_tracking_types.h +++ b/source/blender/makesdna/DNA_tracking_types.h @@ -373,7 +373,7 @@ enum { /* MovieTrackingStrabilization->filter */ enum { - TRACKING_FILTER_NEAREAST = 0, + TRACKING_FILTER_NEAREST = 0, TRACKING_FILTER_BILINEAR = 1, TRACKING_FILTER_BICUBIC = 2 }; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index b8bb7a5846d..2f082afb189 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -143,8 +143,10 @@ typedef struct uiWidgetStateColors { typedef struct uiPanelColors { char header[4]; + char back[4]; short show_header; - short pad; + short show_back; + int pad; } uiPanelColors; typedef struct ThemeUI { @@ -157,7 +159,7 @@ typedef struct ThemeUI { uiWidgetStateColors wcol_state; - uiPanelColors panel; + uiPanelColors panel; /* depricated, but we keep it for do_versions (2.66.1) */ char iconfile[256]; // FILE_MAXFILE length float icon_alpha; @@ -172,33 +174,36 @@ typedef struct ThemeUI { typedef struct ThemeSpace { /* main window colors */ char back[4]; - char title[4]; + char title[4]; /* panel title */ char text[4]; char text_hi[4]; /* header colors */ - char header[4]; - char header_title[4]; + char header[4]; /* region background */ + char header_title[4]; /* unused */ char header_text[4]; char header_text_hi[4]; /* button/tool regions */ - char button[4]; - char button_title[4]; + char button[4]; /* region background */ + char button_title[4]; /* panel title */ char button_text[4]; char button_text_hi[4]; /* listview regions */ - char list[4]; - char list_title[4]; + char list[4]; /* region background */ + char list_title[4]; /* panel title */ char list_text[4]; char list_text_hi[4]; /* float panel */ - char panel[4]; - char panel_title[4]; - char panel_text[4]; - char panel_text_hi[4]; +/* char panel[4]; unused */ +/* char panel_title[4]; unused */ +/* char panel_text[4]; unused */ +/* char panel_text_hi[4]; unused */ + + /* note, cannot use name 'panel' because of DNA mapping old files */ + uiPanelColors panelcolors; char shade1[4]; char shade2[4]; @@ -360,9 +365,10 @@ typedef struct UserDef { short versions; short dbl_click_time; - int gameflags; - int wheellinescroll; - int uiflag, language; + short gameflags; + short wheellinescroll; + int uiflag, uiflag2; + int language; short userpref, viewzoom; int mixbufsize; @@ -413,7 +419,7 @@ typedef struct UserDef { short scrcastfps; /* frame rate for screencast to be played back */ short scrcastwait; /* milliseconds between screencast snapshots */ - short widget_unit; /* defaults to 20 for 72 DPI setting */ + short widget_unit; /* private, defaults to 20 for 72 DPI setting */ short anisotropic_filter; short use_16bit_textures, use_gpu_mipmap; @@ -444,7 +450,7 @@ typedef struct UserDef { int compute_device_id; float fcu_inactive_alpha; /* opacity of inactive F-Curves in F-Curve Editor */ - float pad; + float pixelsize; /* private, set by GHOST, to multiply DPI with */ } UserDef; extern UserDef U; /* from blenkernel blender.c */ @@ -540,6 +546,12 @@ typedef enum eUserpref_UI_Flag { USER_HIDE_SYSTEM_BOOKMARKS = (1 << 31) } eUserpref_UI_Flag; +/* uiflag2 */ +typedef enum eUserpref_UI_Flag2 { + USER_KEEP_SESSION = (1 << 0), + USER_REGION_OVERLAP = (1 << 1) +} eUserpref_UI_Flag2; + /* Auto-Keying mode */ typedef enum eAutokey_Mode { /* AUTOKEY_ON is a bitflag */ diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index c83b0bc366f..dbe54a4fcdf 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -225,6 +225,7 @@ typedef struct View3D { #define V3D_DISPBGPICS 2 #define V3D_HIDE_HELPLINES 4 #define V3D_INVALID_BACKBUF 8 +#define V3D_INVALID_BACKBUF 8 #define V3D_ALIGN 1024 #define V3D_SELECT_OUTLINE 2048 @@ -261,7 +262,7 @@ typedef struct View3D { /* View3d->flag2 (short) */ #define V3D_RENDER_OVERRIDE 4 #define V3D_SOLID_TEX 8 -#define V3D_DISPGP 16 +#define V3D_SHOW_GPENCIL 16 #define V3D_LOCK_CAMERA 32 #define V3D_RENDER_SHADOW 64 /* This is a runtime only flag that's used to tell draw_mesh_object() that we're doing a shadow pass instead of a regular draw */ #define V3D_SHOW_RECONSTRUCTION 128 diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 2294abc0735..27aef3b8ec6 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -65,19 +65,21 @@ struct uiLayout; /* keep in sync with 'wm_report_items' in wm_rna.c */ typedef enum ReportType { - RPT_DEBUG = 1<<0, - RPT_INFO = 1<<1, - RPT_OPERATOR = 1<<2, - RPT_WARNING = 1<<3, - RPT_ERROR = 1<<4, - RPT_ERROR_INVALID_INPUT = 1<<5, - RPT_ERROR_INVALID_CONTEXT = 1<<6, - RPT_ERROR_OUT_OF_MEMORY = 1<<7 + RPT_DEBUG = 1 << 0, + RPT_INFO = 1 << 1, + RPT_OPERATOR = 1 << 2, + RPT_PROPERTY = 1 << 3, + RPT_WARNING = 1 << 4, + RPT_ERROR = 1 << 5, + RPT_ERROR_INVALID_INPUT = 1 << 6, + RPT_ERROR_INVALID_CONTEXT = 1 << 7, + RPT_ERROR_OUT_OF_MEMORY = 1 << 8 } ReportType; #define RPT_DEBUG_ALL (RPT_DEBUG) #define RPT_INFO_ALL (RPT_INFO) #define RPT_OPERATOR_ALL (RPT_OPERATOR) +#define RPT_PROPERTY_ALL (RPT_PROPERTY) #define RPT_WARNING_ALL (RPT_WARNING) #define RPT_ERROR_ALL (RPT_ERROR|RPT_ERROR_INVALID_INPUT|RPT_ERROR_INVALID_CONTEXT|RPT_ERROR_OUT_OF_MEMORY) diff --git a/source/blender/makesdna/SConscript b/source/blender/makesdna/SConscript index c3d39783b00..a6520a6c03e 100644 --- a/source/blender/makesdna/SConscript +++ b/source/blender/makesdna/SConscript @@ -1,4 +1,30 @@ -#!/usr/bin/python +#!/usr/bin/env python +# +# ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# The Original Code is Copyright (C) 2006, Blender Foundation +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): Nathan Letwory. +# +# ***** END GPL LICENSE BLOCK ***** + Import ('env') objs = [] diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript index c1e6eb5281d..add9611866d 100644 --- a/source/blender/makesdna/intern/SConscript +++ b/source/blender/makesdna/intern/SConscript @@ -1,4 +1,30 @@ -#!/usr/bin/python +#!/usr/bin/env python +# +# ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# The Original Code is Copyright (C) 2006, Blender Foundation +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): Nathan Letwory. +# +# ***** END GPL LICENSE BLOCK ***** + import sys import os diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index de91c17553e..12df9def368 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -210,7 +210,7 @@ static int calculate_structlens(int); /** * Construct the DNA.c file */ -void dna_write(FILE *file, void *pntr, int size); +static void dna_write(FILE *file, const void *pntr, const int size); /** * Report all structures found so far, and print their lengths. @@ -894,7 +894,7 @@ static int calculate_structlens(int firststruct) #define MAX_DNA_LINE_LENGTH 20 -void dna_write(FILE *file, void *pntr, int size) +static void dna_write(FILE *file, const void *pntr, const int size) { static int linelength = 0; int i; @@ -936,7 +936,7 @@ void printStructLengths(void) } -static int make_structDNA(char *baseDirectory, FILE *file) +static int make_structDNA(const char *baseDirectory, FILE *file) { int len, i; short *sp; @@ -986,7 +986,7 @@ static int make_structDNA(char *baseDirectory, FILE *file) /* little test first... */ /* Mind the breaking condition here! */ if (debugSDNA) printf("\tStart of header scan:\n"); - for (i = 0; strlen(includefiles[i]); i++) { + for (i = 0; *(includefiles[i]) != '\0'; i++) { sprintf(str, "%s%s", baseDirectory, includefiles[i]); if (debugSDNA) printf("\t|-- Converting %s\n", str); if (convert_include(str)) { @@ -1038,12 +1038,10 @@ static int make_structDNA(char *baseDirectory, FILE *file) /* pass */ } else { - strcpy(str, "SDNA"); - dna_write(file, str, 4); + dna_write(file, "SDNA", 4); /* write names */ - strcpy(str, "NAME"); - dna_write(file, str, 4); + dna_write(file, "NAME", 4); len = nr_names; dna_write(file, &len, 4); @@ -1055,8 +1053,7 @@ static int make_structDNA(char *baseDirectory, FILE *file) dna_write(file, names[0], len); /* write TYPES */ - strcpy(str, "TYPE"); - dna_write(file, str, 4); + dna_write(file, "TYPE", 4); len = nr_types; dna_write(file, &len, 4); @@ -1069,16 +1066,14 @@ static int make_structDNA(char *baseDirectory, FILE *file) dna_write(file, types[0], len); /* WRITE TYPELENGTHS */ - strcpy(str, "TLEN"); - dna_write(file, str, 4); + dna_write(file, "TLEN", 4); len = 2 * nr_types; if (nr_types & 1) len += 2; dna_write(file, typelens_native, len); /* WRITE STRUCTS */ - strcpy(str, "STRC"); - dna_write(file, str, 4); + dna_write(file, "STRC", 4); len = nr_structs; dna_write(file, &len, 4); @@ -1102,7 +1097,7 @@ static int make_structDNA(char *baseDirectory, FILE *file) else { /* add all include files defined in the global array */ - for (i = 0; strlen(includefiles[i]); i++) { + for (i = 0; *(includefiles[i]) != '\0'; i++) { fprintf(fp, "#include \"%s%s\"\n", baseDirectory, includefiles[i]); } @@ -1167,13 +1162,13 @@ int main(int argc, char **argv) return_status = 1; } else { - char baseDirectory[256]; + const char *baseDirectory; if (argc == 3) { - strcpy(baseDirectory, argv[2]); + baseDirectory = argv[2]; } else { - strcpy(baseDirectory, BASE_HEADER); + baseDirectory = BASE_HEADER; } fprintf(file, "const unsigned char DNAstr[] = {\n"); |