Formatting. Adding a .cvsignore file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498
diff --git a/.cvsignore b/.cvsignore
new file mode 100644
index 0000000..aee2e4c
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1 @@
+config.mk
diff --git a/include/freetype/cache/ftcmanag.h b/include/freetype/cache/ftcmanag.h
index ec899b9..32024d8 100644
--- a/include/freetype/cache/ftcmanag.h
+++ b/include/freetype/cache/ftcmanag.h
@@ -23,11 +23,11 @@
/* - Maintain a mapping between generic FTC_FaceIDs and live FT_Face */
/* objects. The mapping itself is performed through a user-provided */
/* callback. However, the manager maintains a small cache of FT_Face */
- /* & FT_Size objects in order to speed things considerably. */
+ /* & FT_Size objects in order to speed up things considerably. */
/* */
/* - Manage one or more cache objects. Each cache is in charge of */
/* holding a varying number of `cache nodes'. Each cache node */
- /* represents a minimal amount of individually-accessible cached */
+ /* represents a minimal amount of individually accessible cached */
/* data. For example, a cache node can be an FT_Glyph image */
/* containing a vector outline, or some glyph metrics, or anything */
/* else. */
@@ -81,40 +81,41 @@
#define FTC_MAX_CACHES 16
- /****************************************************************
- *
- * <Struct> FTC_ManagerRec
- *
- * <Description>
- * the cache manager structure. Each cache manager is in
- * charge of performing two tasks:
- *
- * <Fields>
- * library :: handle to FreeType library instance
- * faces_lru :: lru list of FT_Face objects in cache
- * sizes_lru :: lru list of FT_Size objects in cache
- *
- * max_bytes :: maximum number of bytes to be allocated
- * in the cache. this is only related to
- * the byte size of the nodes cached by
- * the manager.
- *
- * num_bytes :: current number of bytes allocated in
- * the cache. only related to the byte size
- * of cached nodes.
- *
- * num_nodes :: current number of nodes in the manager
- *
- * global_lru :: the global lru list of all cache nodes
- *
- * caches :: a table of installed/registered cache
- * objects
- *
- * request_data :: user-provided data passed to the requester
- * request_face :: user-provided function used to implement
- * a mapping between abstract FTC_FaceIDs
- * and real FT_Face objects..
- */
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* FTC_ManagerRec */
+ /* */
+ /* <Description> */
+ /* The cache manager structure. */
+ /* */
+ /* <Fields> */
+ /* library :: A handle to a FreeType library instance. */
+ /* */
+ /* faces_lru :: The lru list of FT_Face objects in the cache. */
+ /* */
+ /* sizes_lru :: The lru list of FT_Size objects in the cache. */
+ /* */
+ /* max_bytes :: The maximum number of bytes to be allocated in the */
+ /* cache. This is only related to the byte size of */
+ /* the nodes cached by the manager. */
+ /* */
+ /* num_bytes :: The current number of bytes allocated in the */
+ /* cache. Only related to the byte size of cached */
+ /* nodes. */
+ /* */
+ /* num_nodes :: The current number of nodes in the manager. */
+ /* */
+ /* global_lru :: The global lru list of all cache nodes. */
+ /* */
+ /* caches :: A table of installed/registered cache objects. */
+ /* */
+ /* request_data :: User-provided data passed to the requester. */
+ /* */
+ /* request_face :: User-provided function used to implement a mapping */
+ /* between abstract FTC_FaceIDs and real FT_Face */
+ /* objects. */
+ /* */
typedef struct FTC_ManagerRec_
{
FT_Library library;
@@ -133,28 +134,27 @@
} FTC_ManagerRec;
- /**********************************************************************
- *
- * <Function> FTC_Manager_Compress
- *
- * <Description>
- * this function is used to check the state of the cache manager
- * if its "num_bytes" field is greater than its "max_bytes"
- * field, this function will flush as many old cache nodes as
- * possible (ignoring cache nodes with a non-zero reference
- * count).
- *
- * <input>
- * manager :: handle to cache manager
- *
- * <note>
- * client applications should not call this function directly.
- * it is normally invoked by specific cache implementations.
- *
- * the reason this function is exported is to allow client-
- * specific cache classes..
- *
- */
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FTC_Manager_Compress */
+ /* */
+ /* <Description> */
+ /* This function is used to check the state of the cache manager if */
+ /* its `num_bytes' field is greater than its `max_bytes' field. It */
+ /* will flush as many old cache nodes as possible (ignoring cache */
+ /* nodes with a non-zero reference count). */
+ /* */
+ /* <Input> */
+ /* manager :: A handle to the cache manager. */
+ /* */
+ /* <Note> */
+ /* Client applications should not call this function directly. It is */
+ /* normally invoked by specific cache implementations. */
+ /* */
+ /* The reason this function is exported is to allow client-specific */
+ /* cache classes. */
+ /* */
FT_EXPORT_DEF( void ) FTC_Manager_Compress( FTC_Manager manager );
@@ -182,7 +182,7 @@
typedef FTC_CacheNodeRec* FTC_CacheNode;
- /* the fields `cachenode.data' is typecasted to this type */
+ /* the field `cachenode.data' is typecast to this type */
typedef struct FTC_CacheNode_Data_
{
FT_UShort cache_index;
@@ -190,63 +190,73 @@
} FTC_CacheNode_Data;
- /* return a pointer to the FTC_CacheNode_Data contained in a */
- /* CacheNode's `data' field */
+
+ /* return a pointer to FTC_CacheNode_Data contained in a */
+ /* CacheNode's `data' field */
#define FTC_CACHENODE_TO_DATA_P( n ) \
( (FTC_CacheNode_Data*)&(n)->data )
#define FTC_LIST_TO_CACHENODE( n ) ( (FTC_CacheNode)(n) )
- /**********************************************************************
- *
- * <FuncType> FTC_CacheNode_SizeFunc
- *
- * <Description>
- * a function used to compute the total size in bytes of a given
- * cache node. It is used by the cache manager to compute the
- * number of old nodes to flush when the cache is full..
- *
- * <Input>
- * node :: handle to target cache node
- * cache_data :: a generic pointer passed to the destructor.
- */
+
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* FTC_CacheNode_SizeFunc */
+ /* */
+ /* <Description> */
+ /* A function used to compute the total size in bytes of a given */
+ /* cache node. It is used by the cache manager to compute the number */
+ /* of old nodes to flush when the cache is full. */
+ /* */
+ /* <Input> */
+ /* node :: A handle to the target cache node. */
+ /* */
+ /* cache_data :: A generic pointer passed to the destructor. */
+ /* */
typedef FT_ULong (*FTC_CacheNode_SizeFunc)( FTC_CacheNode node,
FT_Pointer cache_data );
- /**********************************************************************
- *
- * <FuncType> FTC_CacheNode_DestroyFunc
- *
- * <Description>
- * a function used to destroy a given cache node. It is called
- * by the manager when the cache is full and old nodes need to
- * be flushed out..
- *
- * <Input>
- * node :: handle to target cache node
- * cache_data :: a generic pointer passed to the destructor.
- */
+
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* FTC_CacheNode_DestroyFunc */
+ /* */
+ /* <Description> */
+ /* A function used to destroy a given cache node. It is called by */
+ /* the manager when the cache is full and old nodes need to be */
+ /* flushed out. */
+ /* */
+ /* <Input> */
+ /* node :: A handle to the target cache node. */
+ /* */
+ /* cache_data :: A generic pointer passed to the destructor. */
+ /* */
typedef void (*FTC_CacheNode_DestroyFunc)( FTC_CacheNode node,
FT_Pointer cache_data );
- /**********************************************************************
- *
- * <Struct> FTC_CacheNode_Class
- *
- * <Description>
- * a very simple structure used to describe a cache node's class
- * to the cache manager
- *
- * <Fields>
- * size_node :: a function used to size the node
- * destroy_node :: a function used to destroy the node
- *
- * <Note>
- * the cache node class doesn't include a "new_node" function
- * because the cache manager never allocates cache node directly,
- * it delegates this task to its cache objects..
- *
- */
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* FTC_CacheNode_Class */
+ /* */
+ /* <Description> */
+ /* A very simple structure used to describe a cache node's class to */
+ /* the cache manager. */
+ /* */
+ /* <Fields> */
+ /* size_node :: A function used to size the node. */
+ /* */
+ /* destroy_node :: A function used to destroy the node. */
+ /* */
+ /* <Note> */
+ /* The cache node class doesn't include a `new_node' function because */
+ /* the cache manager never allocates cache node directly; it */
+ /* delegates this task to its cache objects. */
+ /* */
+ /* */
typedef struct FTC_CacheNode_Class_
{
FTC_CacheNode_SizeFunc size_node;
@@ -264,45 +274,50 @@
/*************************************************************************/
- /**********************************************************************
- *
- * <FuncType> FTC_Cache_InitFunc
- *
- * <Description>
- * a function used to initialize a given cache object
- *
- * <Input>
- * cache :: handle to new cache
- */
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* FTC_Cache_InitFunc */
+ /* */
+ /* <Description> */
+ /* A function used to initialize a given cache object. */
+ /* */
+ /* <Input> */
+ /* cache :: A handle to the new cache. */
+ /* */
typedef FT_Error (*FTC_Cache_InitFunc)( FTC_Cache cache );
- /**********************************************************************
- *
- * <FuncType> FTC_Cache_DoneFunc
- *
- * <Description>
- * a function used to finalize a given cache object
- *
- * <Input>
- * cache :: handle to target cache
- */
- typedef void (*FTC_Cache_DoneFunc)( FTC_Cache cache );
-
-
- /**********************************************************************
- *
- * <Struct> FTC_Cache_Class
- *
- * <Description>
- * a structure used to describe a given cache object class to
- * the cache manager.
- *
- * <Fields>
- * cache_byte_size :: size of cache object in bytes
- * init_cache :: cache object initializer
- * done_cache :: cache object finalizer
- */
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* FTC_Cache_DoneFunc */
+ /* */
+ /* <Description> */
+ /* A function to finalize a given cache object. */
+ /* */
+ /* <Input> */
+ /* cache :: A handle to the target cache. */
+ /* */
+ typedef void (*FTC_Cache_DoneFunc)( FTC_Cache cache );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* FTC_Cache_Class */
+ /* */
+ /* <Description> */
+ /* A structure used to describe a given cache object class to the */
+ /* cache manager. */
+ /* */
+ /* <Fields> */
+ /* cache_byte_size :: The size of the cache object in bytes. */
+ /* */
+ /* init_cache :: The cache object initializer. */
+ /* */
+ /* done_cache :: The cache object finalizer. */
+ /* */
struct FTC_Cache_Class_
{
FT_UInt cache_byte_size;
@@ -311,22 +326,28 @@
};
- /**********************************************************************
- *
- * <Struct> FTC_CacheRec
- *
- * <Description>
- * a structure used to describe an abstract cache object
- *
- * <Fields>
- * manager :: handle to parent cache manager
- * memory :: handle to memory manager
- * clazz :: pointer to cache clazz
- * node_clazz :: pointer to cache's node clazz
- *
- * cache_index :: index of cache in manager's table
- * cache_data :: data passed to the cache node constructor/finalizer
- */
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* FTC_CacheRec */
+ /* */
+ /* <Description> */
+ /* A structure used to describe an abstract cache object. */
+ /* */
+ /* <Fields> */
+ /* manager :: A handle to the parent cache manager. */
+ /* */
+ /* memory :: A handle to the memory manager. */
+ /* */
+ /* clazz :: A pointer to the cache class. */
+ /* */
+ /* node_clazz :: A pointer to the cache's node class. */
+ /* */
+ /* cache_index :: An index of the cache in the manager's table. */
+ /* */
+ /* cache_data :: Data passed to the cache node */
+ /* constructor/finalizer. */
+ /* */
typedef struct FTC_CacheRec_
{
FTC_Manager manager;
@@ -340,7 +361,6 @@
} FTC_CacheRec;
-
#ifdef __cplusplus
}
#endif
diff --git a/include/freetype/cache/ftcsbits.h b/include/freetype/cache/ftcsbits.h
index d9d8011..d95a817 100644
--- a/include/freetype/cache/ftcsbits.h
+++ b/include/freetype/cache/ftcsbits.h
@@ -2,7 +2,7 @@
/* */
/* ftcsbits.h */
/* */
-/* a small-bitmaps cache (specification). */
+/* A small-bitmap cache (specification). */
/* */
/* Copyright 2000 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
@@ -15,25 +15,27 @@
/* */
/***************************************************************************/
+
#ifndef FTCSBITS_H
#define FTCSBITS_H
+
#include <freetype/cache/ftcchunk.h>
+
#ifdef __cplusplus
extern "C" {
#endif
- /* handle to small bitmap */
- typedef struct FTC_SBitRec_* FTC_SBit;
-
- /* handle to small bitmap cache */
- typedef struct FTC_SBit_CacheRec_* FTC_SBit_Cache;
+ /* handle to small bitmap */
+ typedef struct FTC_SBitRec_* FTC_SBit;
+ /* handle to small bitmap cache */
+ typedef struct FTC_SBit_CacheRec_* FTC_SBit_Cache;
- /* a compact structure used to hold a single small bitmap */
- typedef struct FTC_SBitRec_
+ /* a compact structure used to hold a single small bitmap */
+ typedef struct FTC_SBitRec_
{
FT_Byte width;
FT_Byte height;
@@ -50,16 +52,13 @@
} FTC_SBitRec;
- FT_EXPORT_DEF( FT_Error )
- FTC_SBit_Cache_New( FTC_Manager manager,
- FTC_SBit_Cache *acache );
+ FT_EXPORT_DEF( FT_Error ) FTC_SBit_Cache_New( FTC_Manager manager,
+ FTC_SBit_Cache* acache );
-
- FT_EXPORT_DEF( FT_Error )
- FTC_SBit_Cache_Lookup( FTC_SBit_Cache cache,
- FTC_Image_Desc* desc,
- FT_UInt gindex,
- FTC_SBit *sbit );
+ FT_EXPORT_DEF( FT_Error ) FTC_SBit_Cache_Lookup( FTC_SBit_Cache cache,
+ FTC_Image_Desc* desc,
+ FT_UInt gindex,
+ FTC_SBit *sbit );
#ifdef __cplusplus
@@ -69,5 +68,5 @@
#endif /* FTCSBITS_H */
-/* END */
+/* END */