~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/blenlib/BLI_blenlib.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: BLI_blenlib.h,v 1.8 2004/04/03 13:59:26 ton Exp $
 
2
 * $Id: BLI_blenlib.h,v 1.13 2005/05/20 12:18:11 jesterking Exp $
3
3
 *
4
4
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5
5
 *
59
59
 * - The blenlib uses type defines from makesdna/, and functions from
60
60
 * standard libraries.
61
61
 * 
62
 
 * $Id: BLI_blenlib.h,v 1.8 2004/04/03 13:59:26 ton Exp $ 
 
62
 * $Id: BLI_blenlib.h,v 1.13 2005/05/20 12:18:11 jesterking Exp $ 
63
63
*/
64
64
 
65
65
#ifndef BLI_BLENLIB_H
66
66
#define BLI_BLENLIB_H
67
67
 
68
 
#include "DNA_listBase.h" /* braindamage for the masses... needed
69
 
                             because fillvlakbase and fillvertbase are
70
 
                             used outside */
 
68
/* braindamage for the masses... needed
 
69
        because fillfacebase and fillvertbase are used outside */
 
70
#include "DNA_listBase.h" 
71
71
 
72
 
extern ListBase fillvlakbase;
 
72
extern ListBase fillfacebase;
73
73
extern ListBase fillvertbase;
74
74
/**
75
75
 * @attention Defined in scanfill.c
128
128
void BLI_makestringcode(char *fromfile, char *str);
129
129
 
130
130
        /**
 
131
         * Change every @a from in @a string into @a to. The
 
132
         * result will be in @a string
 
133
         *
 
134
         * @a string The string to work on
 
135
         * @a from The character to replace
 
136
         * @a to The character to replace with
 
137
         */
 
138
void BLI_char_switch(char *string, char from, char to);
 
139
 
 
140
        /**
 
141
         * Makes sure @a path has platform-specific slashes.
 
142
         * 
 
143
         * @a path The path to 'clean'
 
144
         */
 
145
void BLI_clean(char *path);
 
146
        /**
131
147
         * Duplicates the cstring @a str into a newly mallocN'd
132
148
         * string and returns it.
133
149
         * 
328
344
 */
329
345
void BLI_setScanFillColourRef(char* c);
330
346
 
 
347
int BLI_strcasecmp(const char *s1, const char *s2);
 
348
int BLI_strncasecmp(const char *s1, const char *s2, int n);
 
349
 
331
350
#define PRNTSUB(type,arg)                       printf(#arg ": %" #type " ", arg)
 
351
 
 
352
#ifndef PRINT
332
353
#define PRINT(t,v)                                      {PRNTSUB(t,v); printf("\n");}
333
354
#define PRINT2(t1,v1,t2,v2)                     {PRNTSUB(t1,v1); PRNTSUB(t2,v2); printf("\n");}
334
355
#define PRINT3(t1,v1,t2,v2,t3,v3)       {PRNTSUB(t1,v1); PRNTSUB(t2,v2); PRNTSUB(t3,v3); printf("\n");}
335
356
#define PRINT4(t1,v1,t2,v2,t3,v3,t4,v4) {PRNTSUB(t1,v1); PRNTSUB(t2,v2); PRNTSUB(t3,v3); PRNTSUB(t4,v4); printf("\n");}
 
357
#endif
336
358
 
337
359
/**
338
360
 * @param array The array in question
345
367
 * @param member The name of a member field of @a strct
346
368
 * @retval The offset in bytes of @a member within @a strct
347
369
 */
348
 
#define BLI_STRUCT_OFFSET(strct, member)        (((struct) 0).(membr))
 
370
#define BLI_STRUCT_OFFSET(strct, member)        ((int) &((strct*) 0)->member)
349
371
 
350
372
#ifdef __cplusplus
351
373
}