-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathheaderDoc2HTML.pl
More file actions
executable file
·4795 lines (4270 loc) · 155 KB
/
headerDoc2HTML.pl
File metadata and controls
executable file
·4795 lines (4270 loc) · 155 KB
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
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/perl
#
# Script name: headerDoc2HTML
# Synopsis: Scans a file for headerDoc comments and generates an HTML
# file from the comments it finds.
#
# Last Updated: $Date: 2011/05/06 20:29:05 $
#
# ObjC additions by SKoT McDonald <skot@tomandandy.com> Aug 2001
#
# Copyright (c) 1999-2004 Apple Computer, Inc. All rights reserved.
#
# @APPLE_LICENSE_HEADER_START@
#
# This file contains Original Code and/or Modifications of Original Code
# as defined in and that are subject to the Apple Public Source License
# Version 2.0 (the 'License'). You may not use this file except in
# compliance with the License. Please obtain a copy of the License at
# http://www.opensource.apple.com/apsl/ and read it before using this
# file.
#
# The Original Code and all software distributed under the License are
# distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
# Please see the License for the specific language governing rights and
# limitations under the License.
#
# @APPLE_LICENSE_HEADER_END@
#
# $Revision: 1304738945 $
#####################################################################
# /*!
# @header
# The main HeaderDoc tool, <code>headerDoc2HTML.pl</code>
# (<code>headerdoc2html</code> when installed), translates a
# header file (or source code file) into HTML
# (or XML).
#
# This document provides API-level documentation
# on the tool's internals. For user documentation, see
# {@linkdoc //apple_ref/doc/uid/TP40001215 HeaderDoc User Guide}.
# @indexgroup HeaderDoc Tools
# */
# /*!
# @abstract
# The version number of the HeaderDoc suite.
# */
my $HeaderDoc_Version = "8.8";
# /*!
# @abstract
# The revision control revision number for this script.
# @discussion
# In the git repository, contains the number of seconds since
# January 1, 1970.
# */
my $VERSION = '$Revision: 1304738945 $';
# /*!
# @abstract
# The default comment in the right side if a header or
# class lacks a discussion.
# */
$HeaderDoc::defaultHeaderComment = "Use the links in the table of contents to the left to access the documentation.<br>\n";
# /*!
# @abstract
# Enables parsing of a bit more of the C programming
# language to support nonstandard (external) uses of
# the parser.
# @discussion
# HeaderDoc itself does not use this functionality.
# */
$HeaderDoc::parseIfElse = 0;
# /*!
# @abstract
# Storage for the bareNamesFromAPIRefs flag
# @discussion
# By default, if you use an \@link tag and
# specify only an API reference marker (apple_ref),
# as a link destination (with no link text),
# HeaderDoc substitutes a class method call for
# Objective-C methods and a name in the form
# <code>classname::methodName</code> for other
# methods.
#
# If you set this flag to 1, this behavior is
# disabled for Objective-C methods.
#
# If you set this flag to 2, this behavior is
# disabled for non-Objective-C methods.
#
# If you set this flag to 3, this behavior is
# disabled for all methods.
# */
$HeaderDoc::nameFromAPIRefReturnsOnlyName = 0;
################ General Constants ###################################
# /*! @abstract
# If running in MacPerl in Mac OS 9, contains 1; normally 0.
# */
my $isMacOS;
# /*! @abstract
# Normally "/", but ":" if running in MacPerl in Mac OS 9.
# */
my $pathSeparator;
################ Flag Storage ###################################
# /*! @abstract
# Storage for the -o flag.
# */
my $specifiedOutputDir;
# /*! @abstract
# Storage for the -d flag.
# */
my $debugging = 0;
# /*! @abstract
# Storage for the -v flag.
# */
my $printVersion;
# /*! @abstract
# Storage for the -q flag.
# */
my $quietLevel;
# /*! @abstract
# Storage for the -X flag. Also set for the -m flag.
# */
my $xml_output;
# /*! @abstract
# Storage for the -m flag.
# */
my $man_output;
# /*! @abstract
# Storage for the -f flag.
# */
my $function_list_output;
# /*! @abstract
# Storage for the -x flag.
# */
my $doxytag_output;
# /*! @abstract
# Storage for the -s flag.
# */
my $headerdoc_strip;
# /*! @abstract
# Storage for the -P flag. Also set for the -f flag.
# */
my $use_stdout;
# /*! @abstract
# Storage for the -r flag (not yet implemented).
# */
my $regenerate_headers;
# # /*! @abstract
# Storage for the -h flag. (Legacy cruft.)
# */
# my $write_control_file;
################ Other Globals ###################################
# /*! @abstract
# Language currently being parsed.
# */
my $lang = "C";
# Legacy cruft for "DB export" module. To be deleted in the future.
# my $testingExport = 0;
# my $export;
# Look-up tables are used when exporting API and doc to tab-delimited
# data files, which can be used for import to a database.
# The look-up tables supply uniqueID-to-APIName mappings.
# my $lookupTableDirName;
# my $lookupTableDir;
# my $functionFilename;
# my $typesFilename;
# my $enumsFilename;
# /*!
# @abstract
# The array of input files to be procesed.
# */
my @inputFiles;
# /*! @abstract
# Temp storage for list of temp files.
# */
my @doxyTagFiles;
# Described later. Defined inside the BEGIN block.
# @HeaderDoc::ignorePrefixes = ();
# @HeaderDoc::perHeaderIgnorePrefixes = ();
# %HeaderDoc::perHeaderIncludes = ();
# /*!
# @abstract
# Used to set the owning class when processing
# embedded API symbols.
# */
$HeaderDoc::currentClass = undef;
# /*!
# @abstract
# Provides an out-of-band way for the block
# parser to change the main API owner at the
# top level of HeaderDoc.
# @discussion
# Used to work around the rather odd way
# Perl's classes are designed. (They have no
# end, and due to limitations in HeaderDoc,
# they cannot be parsed as a single block
# and pulled apart as other languages can.)
#
# Normally, this is empty. When set by the
# parser, the top-level API owner is reset
# to that object.
# */
$HeaderDoc::perlClassChange = undef;
# /*!
# @abstract
# Determines whether the macro filter code
# should treat the <code>!=</code> token as
# a <code>==</code> token due to consistent
# eccentricities in what is being parsed.
# @discussion
# HeaderDoc <code>never</code> uses this
# feature. It is provided entirely for other
# (internal) tools that use the same code for
# very different purposes.
# @seealso HeaderDoc::reverse_match
# */
$HeaderDoc::enable_reverse_match = 0;
# /*!
# @abstract
# The specific value that causes HeaderDoc
# to treat the <code>!=</code> token as
# a <code>==</code> token due to consistent
# eccentricities in what is being parsed.
# @discussion
# HeaderDoc <code>never</code> uses this
# feature. It is provided entirely for other
# (internal) tools that use the same code for
# very different purposes.
#
# @seealso HeaderDoc::enable_reverse_match
# */
$HeaderDoc::reverse_match = 0;
# /*!
# @abstract
# Determines whether the macro filter code
# attempts to handle <code>switch</code> and
# <code>case</code> statements.
# @discussion
# HeaderDoc <code>never</code> uses this
# feature. It is provided entirely for other
# (internal) tools that use the same code for
# very different purposes.
# */
$HeaderDoc::interpret_case = 0;
# /*!
# @abstract
# Set high to idicate that HeaderDoc needs to process a file again.
# @abstract
# In practice, this goes high whenever HeaderDoc encounters
# an <code>\@ignore</code> or <code>\@ignorefuncmacro</code>
# tag in an <code>\@header</code> comment.
# */
my $reprocess_input = 0;
# No longer used. Always zero.
# $HeaderDoc::nodec = 0;
# /*!
# @abstract
# The name of the current function group.
# @discussion
# Set by the <code>\@functiongroup</code> tag. Reset to empty upon
# changing to a new header. (If empty, the value of
# {@link HeaderDoc::globalGroup}
# is used instead.
# */
my $functionGroup = "";
# $HeaderDoc::outerNamesOnly = 0;
# /*!
# @abstract
# The name of the current group.
# @discussion
# Set by the <code>\@group</code> tag. Reset to empty upon
# changing to a new header.
# */
$HeaderDoc::globalGroup = "";
# /*!
# @abstract
# Indicates that all token objects should be marked hidden.
#
# @discussion
# The block parser uses this variable as an out-of-band way to
# pass the "hide node" flag data to the parse tree package.
#
# Ideally, this should eventuallly go away and should be replaced
# by changes to every place where a new node gets created, but
# that isn't nearly as easy as it sounds.
# */
$HeaderDoc::hidetokens = 0;
# /*!
# @abstract
# The exit status. Changed to nonzero whenever an error occurs.
# */
$HeaderDoc::exitstatus = 0;
# /*!
# @abstract
# The skiplist file.
# @discussion
# If HeaderDoc is processing a single directory as its input,
# it looks for a file at the top level of that directory called
# <code>skiplist</code>. If it finds that file, it reads it,
# and for each line that is not commented out (with a # sign),
# it adds it into this newline-delimited list.
#
# HeaderDoc later uses this list to determine which files
# to skip when processing the content. Note that the
# preferred way to do this is with exclude lists (the
# <code>-e</code> flag).
# */
$HeaderDoc::skiplist = "";
# /*!
# @abstract
# The API reference language for IDL file content.
# @discussion
# An IDL file contains an interface description in an abstract
# interface description language (hence the abbreviation).
# Thus, the actual interfaces could be for any programming
# language.
#
# By default, IDL file API references (apple_ref symbol markers)
# are emitted using <code>idl</code> as the language name, but
# you can override this by specifying a different value for
# the <code>IDLLanguage</code> field in the HeaderDoc
# config file.
# */
$HeaderDoc::idl_language = "idl";
# /*!
# @abstract
# The default C compiler.
# @discussion
# By default, HeaderDoc uses <code>/usr/bin/gcc</code> to calculate
# the values of complex #define macros. This can be overridden with
# the <code>cCompiler</code> field in the HeaderDoc config file.
# */
$HeaderDoc::c_compiler = "/usr/bin/gcc";
# /*!
# @abstract
# Turns on debug output when objects are allocated and released.
# */
$HeaderDoc::debugAllocations = 0;
# /*!
# @abstract
# New TOC style variable.
# @discussion
# Set by {@link setTOCFormat}.
# */
$HeaderDoc::newTOC = 0;
my @headerObjects; # holds finished objects, ready for printing
# we defer printing until all header objects are ready
# so that we can merge ObjC category methods into the
# headerObject that holds the class, if it exists.
my @categoryObjects; # holds finished objects that represent ObjC categories
my %objCClassNameToObject = (); # makes it easy to find the class object to add category methods to
my %headerIncluded = ();
# /*!
# @abstract
# A hash of all API reference markers for minir API elements emitted so far.
# @discussion
# Used to prevent anyAPI reference markers from being
# emitted when a documentation block that describes a declaration
# with multiple names gets emitted a second (or subsequent) time.
# */
%HeaderDoc::appleRefUsed = ();
# /*!
# @abstract
# A hash table mapping availability macros
# to the text that describes them.
# @discussion
# Used in the block parser to get a human-readable
# string that describes the availability of the
# current declaration.
# */
%HeaderDoc::availability_defs = ();
# /*!
# @abstract
# A hash table mapping availability macros
# to whether or not the macro declaration takes
# a parenthesized argument list.
# @discussion
# Used in the block parser to determine whether to
# strip off the subsequent parenthetical
# code or not.
# */
%HeaderDoc::availability_has_args = ();
# /*!
# @abstract
# The list of filename patterns to exclude when
# producing documentation.
# @discussion
# Obtained from the file specified by the
# <code>-e</code> flag.
# */
@HeaderDoc::exclude_patterns = ();
# $HeaderDoc::enable_custom_references = 0;
my @classObjects;
# /*!
# @abstract
# Set to 1 if you need to enable lots of debugging
# for a single file.
# @discussion
# Most of the time, when debugging, you can get by
# with processing a single file. When debugging
# subtle C preprocessing bugs or other subtle
# misbehavior, however, it is occasionally
# necessary to process a <b>lot</b> of files to
# reproduce the bug.
#
# This flag allows you to leave debugging off until
# you get to a particular file, then turn it
# on temporarily for the duration of that file.
#
# This flag must be used in conjunction with
# {@link HeaderDoc::debugFile}.
# */
$HeaderDoc::fileDebug = 0;
# /*!
# @abstract
# Set to the name of a file to tell HeaderDoc
# to enable debugging when processing that file.
# @discussion
# Only active if {@link HeaderDoc::fileDebug} is
# nonzero.
# */
$HeaderDoc::debugFile = "";
# /*!
# @abstract
# The current line number being parsed.
# @discussion
# Used as an out-of-band way to get this information
# into the parse tree. Should ideally be an argument
# when each parse tree node is being created, but that
# isn't nearly as easy as it sounds.
# */
$HeaderDoc::CurLine = 0;
# $HeaderDoc::debugFile = "AAutoToolbar.h";
# $HeaderDoc::debugFile = "IOFWCommand.h";
# $HeaderDoc::debugFile = "IONetworkInterface.h";
# Turn on autoflushing of 'print' output. This is useful
# when HeaderDoc is operating in support of a GUI front-end
# which needs to get each line of log output as it is printed.
$| = 1;
# Check options in BEGIN block to avoid overhead of loading supporting
# modules in error cases.
my $uninstalledModulesPath;
BEGIN {
use FindBin qw ($Bin);
use Cwd;
# use Getopt::Std;
use Getopt::Long;
use File::Find;
# /*!
# @abstract
# Magic flag used when parsing manual page declarations.
#
# @discussion
# Set to 1 if (in C) you want a function declaration
# to end after the closing parenthesis even if there
# is no trailing semicolon. Do NOT set this for
# normal parsing; it will break many typedef
# declarations and similar. This also enables
# some broken man page detection for deleting lines
# that say <code>or</code> and <code>and</code>.
#
# Note that HeaderDoc does not actually set this flag.
# It is used by other tools that share this parser.
# */
$HeaderDoc::parsing_man_pages = undef;
# /*!
# @abstract
# Global header object for the header currently
# being parsed.
# @discussion
# This should eventually go away.
# */
$HeaderDoc::headerObject = undef;
# /*!
# @abstract
# Storage for the <code>-T</code> flag.
# */
$HeaderDoc::testmode = undef;
# /*!
# @abstract
# Storage for the <code>-M</code> flag.
# */
$HeaderDoc::man_section = "3";
# /*!
# @abstract
# Global variable where the language family info for the
# header currently being parsed is stored.
# @discussion
# Historical versions of HeaderDoc used this in place
# of passing this information around through the code.
# This has been corrected in current versions, but
# the {@link //apple_ref/perl/instm/HeaderDoc::BlockParse/blockParse//() blockParse} and {@link //apple_ref/perl/instm/HeaderDoc::BlockParse/blockParseOutside//() blockParseOutside}
# functions still support falling back to this and
# {@link HeaderDoc::sublang} for backwards
# compatibility. (This backward compatibility is
# temporary, however.)
# */
$HeaderDoc::lang = undef;
# /*!
# @abstract
# Global variable where the language info for the
# header currently being parsed is stored.
# @discussion
# Historical versions of HeaderDoc used this in place
# of passing this information around through the code.
# This has been corrected in current versions, but
# the {@link //apple_ref/perl/instm/HeaderDoc::BlockParse/blockParse//() blockParse} and {@link //apple_ref/perl/instm/HeaderDoc::BlockParse/blockParseOutside//() blockParseOutside}
# functions still support falling back to this and
# {@link HeaderDoc::lang} for backwards
# compatibility. (This backward compatibility is
# temporary, however.)
# */
$HeaderDoc::sublang = undef;
# /*!
# @abstract
# Storage for the <code>-H</code> flag.
# */
$HeaderDoc::insert_header = 0;
# /*!
# @abstract
# Storage for the <code>introductionName</code> configuration file field.
# */
$HeaderDoc::introductionName = "Introduction";
# /*!
# @abstract
# Storage for the <code>--auto-availability</code> flag.
# @discussion
# By default, HeaderDoc ignores <code>#if</code>
# directives with Apple-provided availability
# macros. This flag enables that support by
# setting this value to 1.
# */
$HeaderDoc::auto_availability = 0;
# /*!
# @abstract
# Enable internal documentation.
# @discussion
# Storage for the <code>--document-internal</code> flag.
# */
$HeaderDoc::document_internal = 0;
# /*!
# @abstract
# Flags certain XML tags as illegal due to
# Apple-internal constraints.
# */
$HeaderDoc::ExtraAppleWarnings = 0;
# /*!
# @abstract
# Storage for the <code>-C</code> flag.
# */
$HeaderDoc::ClassAsComposite = 0;
# /*!
# @abstract
# The current access control state used and modified by the parser.
# @discussion
# This should probably be passed around through arguments, but
# for now, it is't.
# */
$HeaderDoc::AccessControlState = "";
# /*!
# @abstract
# Disables adding the next <code>#define</code>declaration to the
# C preprocessor macro set.
# @discussion
# Triggered by a <code>\@noparse</code> directive in comment.
# When this directive is encountered, the directive is parsed for
# documentation purposes, but is not added to the set of
# macros that affect parsing of other declarations.
# */
$HeaderDoc::skipNextPDefine = 0;
# /*!
# @abstract
# Deprecated.
# @discussion
# Storage for an old scheme to ignore junk CPP tokens at the start of line.
# This holds the value of the ignorePrefixes field in the config file.
#
# The currently recommended way to do this is with the C preprocessor
# on the command line (-D FOO="") or in code.
# */
%HeaderDoc::ignorePrefixes = ();
# /*!
# @abstract
# Deprecated.
# @discussion
# Storage for an old scheme to ignore junk CPP tokens at the start of line.
# This holds the list of values from <code>\@ignore</code> tags.
#
# The currently recommended way to do this is with the C preprocessor
# on the command line (-D FOO="") or in code.
# */
%HeaderDoc::perHeaderIgnorePrefixes = ();
# /*!
# @abstract
# Deprecated.
# @discussion
# Storage for an old scheme to ignore junk CPP tokens at the start of line.
# This holds the list of values from <code>\@ignorefuncmacro</code> tags.
#
# The currently recommended way to do this is with the C preprocessor
# in the code itself.
# */
%HeaderDoc::perHeaderIgnoreFuncMacros = ();
# /*!
# @abstract
# A hash of macro definition states passed in on the command
# line that are interpreted by the macro filter engine.
# @discussion
# Legal values are:
#
# <dl>
# <dt> 1</dt><dd>Value we want defined to a particular value
# (<code>-D</code> flag specified).</dd>
# <dt> -1</dt><dd>Value we want to be explicitly undefined
# (<code>-U</code> flag specified).</dd>
# <dt> 0</dt><dd>Don't care. (Default behavior for any token.)</dd>
# </dl>
#
# This variable is used only if <code>-D</code> or <code>-U</code> is
# passed on the command line (which, in turn, sets the variable
# {@link HeaderDoc::filter_macro_definition_state}
# to 1).
# */
%HeaderDoc::filter_macro_definition_state = ();
# /*!
# @abstract
# A hash of macro values passed in on the command
# line that are interpreted by the macro filter engine.
# @discussion
# This hash contains the actual numerical values passed in on
# the command line. If no value is specified, the value
# defaults to 1.
#
# This variable is used only if <code>-D</code> or <code>-U</code> is
# passed on the command line (which, in turn, sets the variable
# {@link HeaderDoc::filter_macro_definition_state}
# to 1).
#
# For explicitly undefined values (<code>-U</code>), this value is
# unimportant and should be left blank.
# */
%HeaderDoc::filter_macro_definition_value = ();
# /*!
# @abstract
# A list of <code>#include</code> directives in the current header.
# */
%HeaderDoc::perHeaderIncludes = ();
# /*!
# @abstract
# A list of line numbers where CPP <code>#include</code> and
# <code>#if</code> directives appear.
# @discussion
# Used for determining which C preprocessor directives should be
# applied to a given block of code.
# */
%HeaderDoc::perHeaderRanges = ();
# /*!
# @abstract
# Enables/disables "outer name" type handling (<code>-O</code> flag).
# @discussion
# By default, HeaderDoc documents all names for type declarations.
# This flag disables emission of documentation for inner
# (structure, enumeration, or union) tag names declared inline.
#
# For example, <code>typdef struct a { ... } b;</code> has two
# names by default: <code>a</code> and <code>b</code>. With the
# <code>-O</code> flag, only the outer name (<code>b</code>) is
# emitted in the documentation.
# */
$HeaderDoc::outerNamesOnly = 0; # storage for -O flag.
# /*!
# @abstract
# Used for quickly looking up names of
# fields in data types by the data type name
# and field name.
# */
%HeaderDoc::namerefs = ();
# /*!
# @abstract
# A counter used for generating UUIDs for inherited content.
# */
$HeaderDoc::uniquenumber = 0;
# $HeaderDoc::counter = 0; # Now unused. @@@
# /*!
# @abstract
# The configuration file path specified by the <code>-c</code>flag.
# */
$HeaderDoc::specified_config_file = "";
# /*!
# @abstract
# Storage for the <code>-F</code> flag.
# @discussion
# Note that this variable may get removed eventually in favor
# of a more flexible output style variable.
# */
$HeaderDoc::use_iframes = 1;
use lib '/Library/Perl/TechPubs'; # Apple configuration workaround
use lib '/AppleInternal/Library/Perl'; # Apple configuration workaround
my %options = ();
# $lookupTableDirName = "LookupTables"; # Legacy cruft.
# $functionFilename = "functions.tab";; # Legacy cruft.
# $typesFilename = "types.tab"; # Legacy cruft.
# $enumsFilename = "enumConstants.tab"; # Legacy cruft.
# /*!
# @abstract
# Sorts content in the right side (content) pane by group.
# */
$HeaderDoc::groupright = 0;
# /*!
# @abstract
# Enables support for JavaDoc-style comments (comments with a second
# asterisk at the start of the comment instead of an exclamation point).
# */
$HeaderDoc::parse_javadoc = 0;
# /*!
# @abstract
# Enables strict parameter taggint warnings (<code>-t</code> flag).
# */
$HeaderDoc::force_parameter_tagging = 0;
# /*!
# @abstract
# Controls whether to include the body of macros or not.
# @discussion
# By default, HeaderDoc omits the body of macro definitions
# in the documentation. You can pass the <code>-i</code>
# flag to include macro bodies in the output. Doing so
# sets this variable to zero. Omitting the flag sets this
# variable to 1.
# */
$HeaderDoc::truncate_inline = 0;
# /*!
# @abstract
# Deprecated.
# @discussion
# Storage for the <code>-b</code> flag. This flag uses
# parser functionality that is no longer maintained.
# It may or may not work, and you should not count on
# it to continue working. It was primarily intended
# as a way of checking parser behavior when the
# colorizer code was nascent.
# */
$HeaderDoc::dumb_as_dirt = 1;
# /*!
# @abstract
# Disables link requests in declarations (<code>-l</code> flag).
# @discussion
# By default, HeaderDoc inserts link requests into the
# declarations in HTML output. If you have no interest
# in declaration linking, you can turn this off by
# passing the <code>-l</code> flag on the command line.
# Doing so clears this variable to 0.
# */
$HeaderDoc::add_link_requests = 1;
# /*!
# @abstract
# Tells HeaderDoc to suppress local variable documentation.
# @discussion
# By default, a local variable (an <code>\@var</code> tag
# inside a function or method discussion) is emitted on the
# output. This is desirable for internal documentation
# purposes, but is undesirable for public documentation
# purposes.
#
# Passing the <code>-L</code> flag on the command line sets this
# flag and suppresses the emission of documentation on these
# local variables.
# */
$HeaderDoc::suppress_local_variables = 0;
# /*!
# @abstract
# Enables emission of various stylesheet bits.
# @discussion
# Set if certain keys appear (with content) in the config file.
# */
$HeaderDoc::use_styles = 0;
# /*!
# @abstract
# Set to true when HeaderDoc should suppress warnings about
# API reference conficts, object name changes, and so on.
# @discussion
# This is set to 1 when HeaderDoc is deliberately making a
# change to an object that would normally trigger a warning.
# Do not set this indiscriminately, as doing so can mask
# actual errors in source content that result in incorrect
# output.
# */
$HeaderDoc::ignore_apiuid_errors = 0;
# /*!
# @abstract
# Storage for the <code>tocformat</code> value from the config file.
# */
$HeaderDoc::explicit_toc_format = undef;
# /*!
# @abstract
# Storage for the contents of the file described in the
# <code>styleSheetExtrasFile</code> field of the config file.
# */
$HeaderDoc::styleSheetExtras = undef;
# /*!
# @abstract
# Storage for the <code>externalStyleSheets</code> value from the config file.
# */
$HeaderDoc::externalStyleSheets = undef;
# /*!
# @abstract
# Storage for the <code>externalTOCStyleSheets</code> value from the config file.
# */
$HeaderDoc::externalTOCStyleSheets = undef;
# /*!
# @abstract
# Storage for the <code>styleImports</code> value from the config file.
# */
$HeaderDoc::styleImports = undef;
# /*!
# @abstract
# Storage for the <code>tocStyleImports</code> value from the config file.
# */
$HeaderDoc::tocStyleImports = undef;
# /*!
# @abstract
# Storage for the <code>-C</code> flag. Set to <code>-1</code> if
# flag is set.
# @discussion
# This flag is only supported when combined with the older
# TOC formats (<code>-F</code> flag).
# */
$HeaderDoc::flagDashC = undef;
# /*!
# @abstract
# Storage for the <code>-u</code> (unsorted) flag.
# @discussion
# Set to <code>0</code> if flag is set, else 1.
# */
$HeaderDoc::sort_entries = undef;
# /*!
# @abstract
# Storage for the <code>-F</code> flag (legacy frames output mode).
# */
$HeaderDoc::flagDashF = undef;
# /*!
# @abstract
# Maximum line length for wrapping declarations.
# @discussion
# You can override this with the <code>wrapAtColumn</code>
# field in the configuration file.
# */
$HeaderDoc::maxDecLen = 60; # Wrap functions, etc. if declaration longer than this length
# /*!
# @abstract
# Storage for the <code>superclassName</code> value from the config file.
# */
$HeaderDoc::superclassName = "Superclass";
# /*!
# @abstract
# Storage for the <code>suppressDefaultJavaScript</code> value from the config file.
# */
$HeaderDoc::suppressDefaultJavaScript = 0;
# /*!
# @abstract
# Storage for the <code>suppressDefaultStyles</code> value from the config file.
# */
$HeaderDoc::suppressDefaultStyles = 0;
if ($^O =~ /MacOS/io) {
$pathSeparator = ":";
$isMacOS = 1;
#$Bin seems to return a colon after the path on certain versions of MacPerl
#if it's there we take it out. If not, leave it be
#WD-rpw 05/09/02
($uninstalledModulesPath = $FindBin::Bin) =~ s/([^:]*):$/$1/o;
} else {
$pathSeparator = "/";
$isMacOS = 0;
}
$uninstalledModulesPath = "$FindBin::Bin"."$pathSeparator"."Modules";
foreach (qw(Mac::Files)) {
$MOD_AVAIL{$_} = eval "use $_; 1";
}
# /*!
# @abstract
# Deprecated.
# @discussion
# Twig isn't installed by default in Mac OS X. This is used in a