Commit 8ec9dfd99185fce2b397bce7cfae2106f8ba0295

Werner Lemberg 2000-11-07T23:56:02

Moving doc comments for BASE functions from source to header files.

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
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
diff --git a/include/freetype/ftlist.h b/include/freetype/ftlist.h
index 5b898be..bca83de 100644
--- a/include/freetype/ftlist.h
+++ b/include/freetype/ftlist.h
@@ -34,20 +34,91 @@
 #endif
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Find                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Finds the list node for a given listed object.                     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    list :: A pointer to the parent list.                              */
+  /*    data :: The address of the listed object.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    List node.  NULL if it wasn't found.                               */
+  /*                                                                       */
   FT_EXPORT( FT_ListNode )  FT_List_Find( FT_List  list,
                                           void*    data );
 
-  FT_EXPORT( void )  FT_List_Add        ( FT_List      list,
-                                          FT_ListNode  node );
 
-  FT_EXPORT( void )  FT_List_Insert     ( FT_List      list,
-                                          FT_ListNode  node );
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Add                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Appends an element to the end of a list.                           */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    list :: A pointer to the parent list.                              */
+  /*    node :: The node to append.                                        */
+  /*                                                                       */
+  FT_EXPORT( void )  FT_List_Add( FT_List      list,
+                                  FT_ListNode  node );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Insert                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Inserts an element at the head of a list.                          */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    list :: A pointer to parent list.                                  */
+  /*    node :: The node to insert.                                        */
+  /*                                                                       */
+  FT_EXPORT( void )  FT_List_Insert( FT_List      list,
+                                     FT_ListNode  node );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Remove                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Removes a node from a list.  This function doesn't check whether   */
+  /*    the node is in the list!                                           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    node :: The node to remove.                                        */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    list :: A pointer to the parent list.                              */
+  /*                                                                       */
+  FT_EXPORT( void )  FT_List_Remove( FT_List      list,
+                                     FT_ListNode  node );
 
-  FT_EXPORT( void )  FT_List_Remove     ( FT_List      list,
-                                          FT_ListNode  node );
 
-  FT_EXPORT( void )  FT_List_Up         ( FT_List      list,
-                                          FT_ListNode  node );
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Up                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Moves a node to the head/top of a list.  Used to maintain LRU      */
+  /*    lists.                                                             */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    list :: A pointer to the parent list.                              */
+  /*    node :: The node to move.                                          */
+  /*                                                                       */
+  FT_EXPORT( void )  FT_List_Up( FT_List      list,
+                                 FT_ListNode  node );
 
 
   /*************************************************************************/
@@ -69,6 +140,26 @@
                                          void*        user );
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Iterate                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Parses a list and calls a given iterator function on each element. */
+  /*    Note that parsing is stopped as soon as one of the iterator calls  */
+  /*    returns a non-zero value.                                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    list     :: A handle to the list.                                  */
+  /*    iterator :: An interator function, called on each node of the      */
+  /*                list.                                                  */
+  /*    user     :: A user-supplied field which is passed as the second    */
+  /*                argument to the iterator.                              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result (a FreeType error code) of the last iterator call.      */
+  /*                                                                       */
   FT_EXPORT( FT_Error )  FT_List_Iterate( FT_List           list,
                                           FT_List_Iterator  iterator,
                                           void*             user );
@@ -97,6 +188,25 @@
                                        void*      user );
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Finalize                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Destroys all elements in the list as well as the list itself.      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    list    :: A handle to the list.                                   */
+  /*                                                                       */
+  /*    destroy :: A list destructor that will be applied to each element  */
+  /*               of the list.                                            */
+  /*                                                                       */
+  /*    memory  :: The current memory object which handles deallocation.   */
+  /*                                                                       */
+  /*    user    :: A user-supplied field which is passed as the last       */
+  /*               argument to the destructor.                             */
+  /*                                                                       */
   FT_EXPORT( void )  FT_List_Finalize( FT_List             list,
                                        FT_List_Destructor  destroy,
                                        FT_Memory           memory,
diff --git a/include/freetype/internal/ftmemory.h b/include/freetype/internal/ftmemory.h
index 7997b24..ad1d266 100644
--- a/include/freetype/internal/ftmemory.h
+++ b/include/freetype/internal/ftmemory.h
@@ -56,15 +56,91 @@
   /*************************************************************************/
   /*************************************************************************/
 
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Alloc                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Allocates a new block of memory.  The returned area is always      */
+  /*    zero-filled; this is a strong convention in many FreeType parts.   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    memory :: A handle to a given `memory object' which handles        */
+  /*              allocation.                                              */
+  /*                                                                       */
+  /*    size   :: The size in bytes of the block to allocate.              */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    P      :: A pointer to the fresh new block.  It should be set to   */
+  /*              NULL if `size' is 0, or in case of error.                */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
   FT_BASE( FT_Error )  FT_Alloc( FT_Memory  memory,
                                  FT_Long    size,
-                                 void**     P );
+                                 void*     *P );
 
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Realloc                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Reallocates a block of memory pointed to by `*P' to `Size' bytes   */
+  /*    from the heap, possibly changing `*P'.                             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    memory  :: A handle to a given `memory object' which handles       */
+  /*               reallocation.                                           */
+  /*                                                                       */
+  /*    current :: The current block size in bytes.                        */
+  /*                                                                       */
+  /*    size    :: The new block size in bytes.                            */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    P       :: A pointer to the fresh new block.  It should be set to  */
+  /*               NULL if `size' is 0, or in case of error.               */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    All callers of FT_Realloc() _must_ provide the current block size  */
+  /*    as well as the new one.                                            */
+  /*                                                                       */
   FT_BASE( FT_Error )  FT_Realloc( FT_Memory  memory,
                                    FT_Long    current,
                                    FT_Long    size,
                                    void**     P );
 
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Free                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Releases a given block of memory allocated through FT_Alloc().     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    memory :: A handle to a given `memory object' which handles        */
+  /*              memory deallocation                                      */
+  /*                                                                       */
+  /*    P      :: This is the _address_ of a _pointer_ which points to the */
+  /*              allocated block.  It is always set to NULL on exit.      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    If P or *P are NULL, this function should return successfully.     */
+  /*    This is a strong convention within all of FreeType and its         */
+  /*    drivers.                                                           */
+  /*                                                                       */
   FT_BASE( void )  FT_Free( FT_Memory  memory,
                             void**     P );
 
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 6197823..7cbb0af 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -338,9 +338,43 @@
   FT_EXPORT( FT_Error )  FT_Done_Size( FT_Size  size );
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_GlyphSlot                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    It is sometimes useful to have more than one glyph slot for a      */
+  /*    given face object.  This function is used to create additional     */
+  /*    slots.  All of them are automatically discarded when the face is   */
+  /*    destroyed.                                                         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face  :: A handle to a parent face object.                         */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aslot :: A handle to a new glyph slot object.                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
   FT_BASE( FT_Error )    FT_New_GlyphSlot( FT_Face        face,
-                                           FT_GlyphSlot*  aslot );
+                                           FT_GlyphSlot  *aslot );
+
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Done_GlyphSlot                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Destroys a given glyph slot.  Remember however that all slots are  */
+  /*    automatically destroyed with its parent.  Using this function is   */
+  /*    not always mandatory.                                              */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    slot :: A handle to a target glyph slot.                           */
+  /*                                                                       */
   FT_BASE( void )  FT_Done_GlyphSlot( FT_GlyphSlot  slot );
 
 
@@ -409,10 +443,10 @@
 
 
   FT_BASE( FT_Error )  FT_GlyphLoader_New( FT_Memory         memory,
-                                           FT_GlyphLoader**  aloader );
+                                           FT_GlyphLoader*  *aloader );
 
   FT_BASE( FT_Error )  FT_GlyphLoader_Create_Extra(
-                                   FT_GlyphLoader*  loader );
+                         FT_GlyphLoader*  loader );
 
   FT_BASE( void )      FT_GlyphLoader_Done( FT_GlyphLoader*  loader );
 
diff --git a/src/base/ftlist.c b/src/base/ftlist.c
index bde617f..6cb384a 100644
--- a/src/base/ftlist.c
+++ b/src/base/ftlist.c
@@ -38,21 +38,8 @@
 #define FT_COMPONENT  trace_list
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Find                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Finds the list node for a given listed object.                     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    list :: A pointer to the parent list.                              */
-  /*    data :: The address of the listed object.                          */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    List node.  NULL if it wasn't found.                               */
-  /*                                                                       */
+  /* documentation is in ftlist.h */
+
   FT_BASE_DEF( FT_ListNode )  FT_List_Find( FT_List  list,
                                             void*    data )
   {
@@ -72,18 +59,8 @@
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Add                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Appends an element to the end of a list.                           */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    list :: A pointer to the parent list.                              */
-  /*    node :: The node to append.                                        */
-  /*                                                                       */
+  /* documentation is in ftlist.h */
+
   FT_BASE_DEF( void )  FT_List_Add( FT_List      list,
                                     FT_ListNode  node )
   {
@@ -102,18 +79,8 @@
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Insert                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Inserts an element at the head of a list.                          */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    list :: A pointer to parent list.                                  */
-  /*    node :: The node to insert.                                        */
-  /*                                                                       */
+  /* documentation is in ftlist.h */
+
   FT_BASE_DEF( void )  FT_List_Insert( FT_List      list,
                                        FT_ListNode  node )
   {
@@ -132,21 +99,8 @@
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Remove                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Removes a node from a list.  This function doesn't check whether   */
-  /*    the node is in the list!                                           */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    node :: The node to remove.                                        */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    list :: A pointer to the parent list.                              */
-  /*                                                                       */
+  /* documentation is in ftlist.h */
+
   FT_BASE_DEF( void )  FT_List_Remove( FT_List      list,
                                        FT_ListNode  node )
   {
@@ -168,19 +122,8 @@
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Up                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Moves a node to the head/top of a list.  Used to maintain LRU      */
-  /*    lists.                                                             */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    list :: A pointer to the parent list.                              */
-  /*    node :: The node to move.                                          */
-  /*                                                                       */
+  /* documentation is in ftlist.h */
+
   FT_BASE_DEF( void )  FT_List_Up( FT_List      list,
                                    FT_ListNode  node )
   {
@@ -208,26 +151,8 @@
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Iterate                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Parses a list and calls a given iterator function on each element. */
-  /*    Note that parsing is stopped as soon as one of the iterator calls  */
-  /*    returns a non-zero value.                                          */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    list     :: A handle to the list.                                  */
-  /*    iterator :: An interator function, called on each node of the      */
-  /*                list.                                                  */
-  /*    user     :: A user-supplied field which is passed as the second    */
-  /*                argument to the iterator.                              */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The result (a FreeType error code) of the last iterator call.      */
-  /*                                                                       */
+  /* documentation is in ftlist.h */
+
   FT_BASE_DEF( FT_Error )  FT_List_Iterate( FT_List            list,
                                             FT_List_Iterator   iterator,
                                             void*              user )
@@ -252,25 +177,8 @@
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Finalize                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Destroys all elements in the list as well as the list itself.      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    list    :: A handle to the list.                                   */
-  /*                                                                       */
-  /*    destroy :: A list destructor that will be applied to each element  */
-  /*               of the list.                                            */
-  /*                                                                       */
-  /*    memory  :: The current memory object which handles deallocation.   */
-  /*                                                                       */
-  /*    user    :: A user-supplied field which is passed as the last       */
-  /*               argument to the destructor.                             */
-  /*                                                                       */
+  /* documentation is in ftlist.h */
+
   FT_BASE_DEF( void )  FT_List_Finalize( FT_List             list,
                                          FT_List_Destructor  destroy,
                                          FT_Memory           memory,
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 0d55ec9..7bc48eb 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -48,31 +48,11 @@
 #define FT_COMPONENT  trace_memory
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Alloc                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Allocates a new block of memory.  The returned area is always      */
-  /*    zero-filled; this is a strong convention in many FreeType parts.   */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    memory :: A handle to a given `memory object' which handles        */
-  /*              allocation.                                              */
-  /*                                                                       */
-  /*    size   :: The size in bytes of the block to allocate.              */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    P      :: A pointer to the fresh new block.  It should be set to   */
-  /*              NULL if `size' is 0, or in case of error.                */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
+  /* documentation is in ftmemory.h */
+
   FT_BASE_DEF( FT_Error )  FT_Alloc( FT_Memory  memory,
                                      FT_Long    size,
-                                     void**     P )
+                                     void*     *P )
   {
     FT_Assert( P != 0 );
 
@@ -100,34 +80,8 @@
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Realloc                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Reallocates a block of memory pointed to by `*P' to `Size' bytes   */
-  /*    from the heap, possibly changing `*P'.                             */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    memory  :: A handle to a given `memory object' which handles       */
-  /*               reallocation.                                           */
-  /*                                                                       */
-  /*    current :: The current block size in bytes.                        */
-  /*                                                                       */
-  /*    size    :: The new block size in bytes.                            */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    P       :: A pointer to the fresh new block.  It should be set to  */
-  /*               NULL if `size' is 0, or in case of error.               */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    All callers of FT_Realloc() _must_ provide the current block size  */
-  /*    as well as the new one.                                            */
-  /*                                                                       */
+  /* documentation is in ftmemory.h */
+
   FT_BASE_DEF( FT_Error )  FT_Realloc( FT_Memory  memory,
                                        FT_Long    current,
                                        FT_Long    size,
@@ -164,29 +118,8 @@
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Free                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Releases a given block of memory allocated through FT_Alloc().     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    memory :: A handle to a given `memory object' which handles        */
-  /*              memory deallocation                                      */
-  /*                                                                       */
-  /*    P      :: This is the _address_ of a _pointer_ which points to the */
-  /*              allocated block.  It is always set to NULL on exit.      */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    If P or *P are NULL, this function should return successfully.     */
-  /*    This is a strong convention within all of FreeType and its         */
-  /*    drivers.                                                           */
-  /*                                                                       */
+  /* documentation is in ftmemory.h */
+
   FT_BASE_DEF( void )  FT_Free( FT_Memory  memory,
                                 void**     P )
   {
@@ -362,7 +295,7 @@
 
   /* create a new glyph loader */
   FT_BASE_DEF( FT_Error )  FT_GlyphLoader_New( FT_Memory         memory,
-                                               FT_GlyphLoader**  aloader )
+                                               FT_GlyphLoader*  *aloader )
   {
     FT_GlyphLoader*  loader;
     FT_Error         error;
@@ -447,7 +380,7 @@
 
 
   FT_BASE_DEF( FT_Error )  FT_GlyphLoader_Create_Extra(
-                           FT_GlyphLoader*  loader )
+                             FT_GlyphLoader*  loader )
   {
     FT_Error   error;
     FT_Memory  memory = loader->memory;
@@ -479,10 +412,10 @@
   /* function reallocates its outline tables if necessary.  Note that it   */
   /* DOESN'T change the number of points within the loader!                */
   /*                                                                       */
-  FT_BASE_DEF( FT_Error ) FT_GlyphLoader_Check_Points(
-                            FT_GlyphLoader*  loader,
-                            FT_UInt          n_points,
-                            FT_UInt          n_contours )
+  FT_BASE_DEF( FT_Error )  FT_GlyphLoader_Check_Points(
+                             FT_GlyphLoader*  loader,
+                             FT_UInt          n_points,
+                             FT_UInt          n_contours )
   {
     FT_Memory    memory  = loader->memory;
     FT_Error     error   = FT_Err_Ok;
@@ -745,28 +678,10 @@
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_New_GlyphSlot                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    It is sometimes useful to have more than one glyph slot for a      */
-  /*    given face object.  This function is used to create additional     */
-  /*    slots.  All of them are automatically discarded when the face is   */
-  /*    destroyed.                                                         */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face  :: A handle to a parent face object.                         */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    aslot :: A handle to a new glyph slot object.                      */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
+  /* documentation is in ftobjs.h */
+
   FT_BASE_DEF( FT_Error )  FT_New_GlyphSlot( FT_Face        face,
-                                             FT_GlyphSlot*  aslot )
+                                             FT_GlyphSlot  *aslot )
   {
     FT_Error          error;
     FT_Driver         driver;
@@ -806,19 +721,8 @@
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Done_GlyphSlot                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Destroys a given glyph slot.  Remember however that all slots are  */
-  /*    automatically destroyed with its parent.  Using this function is   */
-  /*    not always mandatory.                                              */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    slot :: A handle to a target glyph slot.                           */
-  /*                                                                       */
+  /* documentation is in ftobjs.h */
+
   FT_BASE_DEF( void )  FT_Done_GlyphSlot( FT_GlyphSlot  slot )
   {
     if ( slot )
@@ -2463,27 +2367,8 @@
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Module_Interface                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Finds a module and returns its specific interface as a typeless    */
-  /*    pointer.                                                           */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    library     :: A handle to the library object.                     */
-  /*                                                                       */
-  /*    module_name :: The module's name (as an ASCII string).             */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    A module-specific interface if available, 0 otherwise.             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    You should better be familiar with FreeType internals to know      */
-  /*    which module to look for, and what its interface is :-)            */
-  /*                                                                       */
+  /* documentation is in ftobjs.h */
+
   FT_BASE_DEF( const void* )  FT_Get_Module_Interface( FT_Library   library,
                                                        const char*  mod_name )
   {
diff --git a/src/base/ftstream.c b/src/base/ftstream.c
index 8f30e01..5b4e1dc 100644
--- a/src/base/ftstream.c
+++ b/src/base/ftstream.c
@@ -636,9 +636,9 @@
   }
 
 
-  FT_BASE_DEF( FT_Error ) FT_Read_Fields( FT_Stream              stream,
-                                          const FT_Frame_Field*  fields,
-                                          void*                  structure )
+  FT_BASE_DEF( FT_Error )  FT_Read_Fields( FT_Stream              stream,
+                                           const FT_Frame_Field*  fields,
+                                           void*                  structure )
   {
     FT_Error  error;
     FT_Bool   frame_accessed = 0;