2 Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc.
3 Contributed by James Craig Burley.
5 This file is part of GNU Fortran.
7 GNU Fortran is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GNU Fortran is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU Fortran; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 /* From f/proj.h, which uses #error -- not all C compilers
23 support that, and we want *this* program to be compilable
24 by pretty much any C compiler. */
27 #include "coretypes.h"
31 /* Pull in the intrinsics info, but only the doc parts. */
32 #define FFEINTRIN_DOC 1
35 const char *family_name (ffeintrinFamily family
);
36 static void dumpif (ffeintrinFamily fam
);
37 static void dumpendif (void);
38 static void dumpclearif (void);
39 static void dumpem (void);
40 static void dumpgen (int menu
, const char *name
, const char *name_uc
,
42 static void dumpspec (int menu
, const char *name
, const char *name_uc
,
44 static void dumpimp (int menu
, const char *name
, const char *name_uc
, size_t genno
, ffeintrinFamily family
,
45 ffeintrinImp imp
, ffeintrinSpec spec
);
46 static const char *argument_info_ptr (ffeintrinImp imp
, int argno
);
47 static const char *argument_info_string (ffeintrinImp imp
, int argno
);
48 static const char *argument_name_ptr (ffeintrinImp imp
, int argno
);
49 static const char *argument_name_string (ffeintrinImp imp
, int argno
);
51 static const char *elaborate_if_complex (ffeintrinImp imp
, int argno
);
52 static const char *elaborate_if_maybe_complex (ffeintrinImp imp
, int argno
);
53 static const char *elaborate_if_real (ffeintrinImp imp
, int argno
);
55 static void print_type_string (const char *c
);
58 main (int argc
, char **argv ATTRIBUTE_UNUSED
)
63 Usage: intdoc > intdoc.texi\n\
64 Collects and dumps documentation on g77 intrinsics\n\
65 to the file named intdoc.texi.\n");
73 struct _ffeintrin_name_
75 const char *const name_uc
;
76 const char *const name_lc
;
77 const char *const name_ic
;
78 const ffeintrinGen generic
;
79 const ffeintrinSpec specific
;
82 struct _ffeintrin_gen_
84 const char *const name
; /* Name as seen in program. */
85 const ffeintrinSpec specs
[2];
88 struct _ffeintrin_spec_
90 const char *const name
; /* Uppercase name as seen in source code,
91 lowercase if no source name, "none" if no
92 name at all (NONE case). */
93 const bool is_actualarg
; /* Ok to pass as actual arg if -pedantic. */
94 const ffeintrinFamily family
;
95 const ffeintrinImp implementation
;
98 struct _ffeintrin_imp_
100 const char *const name
; /* Name of implementation. */
101 const char *const control
;
104 static const struct _ffeintrin_name_ names
[] = {
105 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) \
106 { UPPER, LOWER, MIXED, FFEINTRIN_ ## GEN, FFEINTRIN_ ## SPEC },
107 #define DEFGEN(CODE,NAME,SPEC1,SPEC2)
108 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
109 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
110 #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
111 #include "intrin.def"
119 static const struct _ffeintrin_gen_ gens
[] = {
120 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
121 #define DEFGEN(CODE,NAME,SPEC1,SPEC2) \
122 { NAME, { SPEC1, SPEC2, }, },
123 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
124 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
125 #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
126 #include "intrin.def"
134 static const struct _ffeintrin_imp_ imps
[] = {
135 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
136 #define DEFGEN(CODE,NAME,SPEC1,SPEC2)
137 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
138 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
140 #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
142 #include "intrin.def"
150 static const struct _ffeintrin_spec_ specs
[] = {
151 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
152 #define DEFGEN(CODE,NAME,SPEC1,SPEC2)
153 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \
154 { NAME, CALLABLE, FAMILY, IMP, },
155 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
156 #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
157 #include "intrin.def"
164 struct cc_pair
{ const ffeintrinImp imp
; const char *const text
; };
166 static const char *descriptions
[FFEINTRIN_imp
] = { 0 };
167 static const struct cc_pair cc_descriptions
[] = {
168 #define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, DESCRIPTION },
173 static const char *summaries
[FFEINTRIN_imp
] = { 0 };
174 static const struct cc_pair cc_summaries
[] = {
175 #define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, SUMMARY },
181 family_name (ffeintrinFamily family
)
185 case FFEINTRIN_familyF77
:
188 case FFEINTRIN_familyASC
:
191 case FFEINTRIN_familyMIL
:
194 case FFEINTRIN_familyGNU
:
197 case FFEINTRIN_familyF90
:
200 case FFEINTRIN_familyVXT
:
203 case FFEINTRIN_familyFVZ
:
206 case FFEINTRIN_familyF2C
:
209 case FFEINTRIN_familyF2U
:
212 case FFEINTRIN_familyBADU77
:
213 return "familyBADU77";
216 assert ("bad family" == NULL
);
221 static int in_ifset
= 0;
222 static ffeintrinFamily latest_family
= FFEINTRIN_familyNONE
;
225 dumpif (ffeintrinFamily fam
)
227 assert (fam
!= FFEINTRIN_familyNONE
);
229 || (fam
!= latest_family
))
232 printf ("@end ifset\n");
234 printf ("@ifset %s\n", family_name (fam
));
249 || (latest_family
!= FFEINTRIN_familyNONE
))
250 printf ("@end ifset\n");
251 latest_family
= FFEINTRIN_familyNONE
;
260 for (i
= 0; ((size_t) i
) < ARRAY_SIZE (cc_descriptions
); ++i
)
262 assert (descriptions
[cc_descriptions
[i
].imp
] == NULL
);
263 descriptions
[cc_descriptions
[i
].imp
] = cc_descriptions
[i
].text
;
266 for (i
= 0; ((size_t) i
) < ARRAY_SIZE (cc_summaries
); ++i
)
268 assert (summaries
[cc_summaries
[i
].imp
] == NULL
);
269 summaries
[cc_summaries
[i
].imp
] = cc_summaries
[i
].text
;
272 printf ("@c This file is automatically derived from intdoc.c, intdoc.in,\n");
273 printf ("@c ansify.c, intrin.def, and intrin.h. Edit those files instead.\n");
275 for (i
= 0; ((size_t) i
) < ARRAY_SIZE (names
); ++i
)
277 if (names
[i
].generic
!= FFEINTRIN_genNONE
)
278 dumpgen (1, names
[i
].name_ic
, names
[i
].name_uc
,
280 if (names
[i
].specific
!= FFEINTRIN_specNONE
)
281 dumpspec (1, names
[i
].name_ic
, names
[i
].name_uc
,
286 printf ("@end menu\n\n");
288 for (i
= 0; ((size_t) i
) < ARRAY_SIZE (names
); ++i
)
290 if (names
[i
].generic
!= FFEINTRIN_genNONE
)
291 dumpgen (0, names
[i
].name_ic
, names
[i
].name_uc
,
293 if (names
[i
].specific
!= FFEINTRIN_specNONE
)
294 dumpspec (0, names
[i
].name_ic
, names
[i
].name_uc
,
301 dumpgen (int menu
, const char *name
, const char *name_uc
, ffeintrinGen gen
)
308 for (i
= 0; i
< ARRAY_SIZE (gens
[gen
].specs
); ++i
)
310 if (gens
[gen
].specs
[i
] != FFEINTRIN_specNONE
)
315 for (i
= 0; i
< ARRAY_SIZE (gens
[gen
].specs
); ++i
)
320 if ((spec
= gens
[gen
].specs
[i
]) == FFEINTRIN_specNONE
)
323 dumpif (specs
[spec
].family
);
324 dumpimp (menu
, name
, name_uc
, i
, specs
[spec
].family
, specs
[spec
].implementation
,
326 if (!menu
&& (total
> 0))
331 For information on another intrinsic with the same name:\n");
336 For information on other intrinsics with the same name:\n");
338 for (j
= 0; j
< ARRAY_SIZE (gens
[gen
].specs
); ++j
)
342 if ((spec
= gens
[gen
].specs
[j
]) == FFEINTRIN_specNONE
)
344 printf ("@xref{%s Intrinsic (%s)}.\n",
345 name
, specs
[spec
].name
);
354 dumpspec (int menu
, const char *name
, const char *name_uc
, ffeintrinSpec spec
)
356 dumpif (specs
[spec
].family
);
357 dumpimp (menu
, name
, name_uc
, 0, specs
[spec
].family
, specs
[spec
].implementation
,
363 dumpimp (int menu
, const char *name
, const char *name_uc
, size_t genno
,
364 ffeintrinFamily family
, ffeintrinImp imp
, ffeintrinSpec spec
)
373 assert ((imp
!= FFEINTRIN_impNONE
) || !genno
);
377 printf ("* %s Intrinsic",
379 if (spec
!= FFEINTRIN_specNONE
)
380 printf (" (%s)", specs
[spec
].name
); /* See XYZZY1 below */
382 #define INDENT_SUMMARY 24
383 if ((imp
== FFEINTRIN_impNONE
)
384 || (summaries
[imp
] != NULL
))
386 int spaces
= INDENT_SUMMARY
- 14 - strlen (name
);
389 if (spec
!= FFEINTRIN_specNONE
)
390 spaces
-= (3 + strlen (specs
[spec
].name
)); /* See XYZZY1 above */
396 if (imp
== FFEINTRIN_impNONE
)
398 printf ("(Reserved for future use.)\n");
402 for (c
= summaries
[imp
]; c
[0] != '\0'; ++c
)
404 if (c
[0] == '@' && ISDIGIT (c
[1]))
406 int argno
= c
[1] - '0';
409 while (ISDIGIT (c
[0]))
411 argno
= 10 * argno
+ (c
[0] - '0');
414 assert (c
[0] == '@');
417 else if (argno
== 99)
418 { /* Yeah, this is a major kludge. */
420 spaces
= INDENT_SUMMARY
+ 1;
425 printf ("%s", argument_name_string (imp
, argno
- 1));
428 fputc (c
[0], stdout
);
435 printf ("@node %s Intrinsic", name
);
436 if (spec
!= FFEINTRIN_specNONE
)
437 printf (" (%s)", specs
[spec
].name
);
438 printf ("\n@subsubsection %s Intrinsic", name
);
439 if (spec
!= FFEINTRIN_specNONE
)
440 printf (" (%s)", specs
[spec
].name
);
441 printf ("\n@cindex %s intrinsic\n@cindex intrinsics, %s\n",
444 if (imp
== FFEINTRIN_impNONE
)
447 This intrinsic is not yet implemented.\n\
448 The name is, however, reserved as an intrinsic.\n\
449 Use @samp{EXTERNAL %s} to use this name for an\n\
450 external procedure.\n\
457 c
= imps
[imp
].control
;
458 subr
= (c
[0] == '-');
459 colon
= (c
[2] == ':') ? 2 : 3;
465 (subr
? "CALL " : ""), name
);
469 for (argno
= 0; ; ++argno
)
471 argc
= argument_name_ptr (imp
, argno
);
476 printf ("@var{%s}", argc
);
477 argi
= argument_info_string (imp
, argno
);
482 printf ("-1, @var{%s}-2, @dots{}, @var{%s}-n",
494 const char *arg_string
;
495 const char *arg_info
;
497 if (ISDIGIT (c
[colon
+ 1]))
499 other_arg
= c
[colon
+ 1] - '0';
500 arg_string
= argument_name_string (imp
, other_arg
);
501 arg_info
= argument_info_string (imp
, other_arg
);
513 print_type_string (c
);
514 printf (" function");
519 assert (other_arg
>= 0);
521 if ((arg_info
[0] == '?') || (arg_info
[0] == '!') || (arg_info
[0] == '+')
522 || (arg_info
[0] == '*') || (arg_info
[0] == 'n') || (arg_info
[0] == 'p'))
524 if ((arg_info
[0] == 'F') || (arg_info
[0] == 'N'))
526 The exact type is @samp{REAL(KIND=1)} when argument @var{%s} is\n\
527 any type other than @code{COMPLEX}, or when it is @code{COMPLEX(KIND=1)}.\n\
528 When @var{%s} is any @code{COMPLEX} type other than @code{COMPLEX(KIND=1)},\n\
529 this intrinsic is valid only when used as the argument to\n\
530 @code{REAL()}, as explained below.\n\n",
535 This intrinsic is valid when argument @var{%s} is\n\
536 @code{COMPLEX(KIND=1)}.\n\
537 When @var{%s} is any other @code{COMPLEX} type,\n\
538 this intrinsic is valid only when used as the argument to\n\
539 @code{REAL()}, as explained below.\n\n",
544 else if ((c
[0] == 'I')
546 printf (", the exact type being wide enough to hold a pointer\n\
547 on the target system (typically @code{INTEGER(KIND=1)} or @code{INTEGER(KIND=4)}).\n\n");
549 else if (c
[1] == '=' && ISDIGIT (c
[colon
+ 1]))
551 assert (other_arg
>= 0);
553 if ((arg_info
[0] == '?') || (arg_info
[0] == '!') || (arg_info
[0] == '+')
554 || (arg_info
[0] == '*') || (arg_info
[0] == 'n') || (arg_info
[0] == 'p'))
557 if (((c
[0] == arg_info
[0])
558 && ((c
[0] == 'A') || (c
[0] == 'C') || (c
[0] == 'I')
559 || (c
[0] == 'L') || (c
[0] == 'R')))
561 && (arg_info
[0] == 'C'))
563 && (arg_info
[0] == 'R')))
564 printf (", the @samp{KIND=} value of the type being that of argument @var{%s}.\n\n",
566 else if ((c
[0] == 'S')
567 && ((arg_info
[0] == 'C')
568 || (arg_info
[0] == 'F')
569 || (arg_info
[0] == 'N')))
571 The exact type depends on that of argument @var{%s}---if @var{%s} is\n\
572 @code{COMPLEX}, this function's type is @code{REAL}\n\
573 with the same @samp{KIND=} value as the type of @var{%s}.\n\
574 Otherwise, this function's type is the same as that of @var{%s}.\n\n",
575 arg_string
, arg_string
, arg_string
, arg_string
);
577 printf (", the exact type being that of argument @var{%s}.\n\n",
580 else if ((c
[1] == '=')
581 && (c
[colon
+ 1] == '*'))
582 printf (", the exact type being the result of cross-promoting the\n\
583 types of all the arguments.\n\n");
584 else if (c
[1] == '=')
585 assert ("?0:?:" == NULL
);
590 for (argno
= 0, argc
= &c
[colon
+ 3]; *argc
!= '\0'; ++argno
)
592 char optionality
= '\0';
606 printf ("%c", *argc
);
617 optionality
= *(argc
++);
622 length
= *++argc
- '0';
624 length
= 10 * length
+ (*(argc
++) - '0');
631 elements
= *++argc
- '0';
633 elements
= 10 * elements
+ (*(argc
++) - '0');
636 else if (*argc
== '&')
661 assert ("kind arg" == NULL
);
667 assert ((kind
== '1') || (kind
== '*'));
668 printf ("@code{CHARACTER");
670 printf ("*%d", length
);
678 printf ("@code{COMPLEX}");
681 case '1': case '2': case '3': case '4': case '5':
682 case '6': case '7': case '8': case '9':
683 printf ("@code{COMPLEX(KIND=%d)}", (kind
- '0'));
687 printf ("Same @samp{KIND=} value as for @var{%s}",
688 argument_name_string (imp
, 0));
692 assert ("Ca" == NULL
);
701 printf ("@code{INTEGER}");
704 case '1': case '2': case '3': case '4': case '5':
705 case '6': case '7': case '8': case '9':
706 printf ("@code{INTEGER(KIND=%d)}", (kind
- '0'));
710 printf ("@code{INTEGER} with same @samp{KIND=} value as for @var{%s}",
711 argument_name_string (imp
, 0));
715 printf ("@code{INTEGER} not wider than the default kind");
719 assert ("Ia" == NULL
);
728 printf ("@code{LOGICAL}");
731 case '1': case '2': case '3': case '4': case '5':
732 case '6': case '7': case '8': case '9':
733 printf ("@code{LOGICAL(KIND=%d)}", (kind
- '0'));
737 printf ("@code{LOGICAL} with same @samp{KIND=} value as for @var{%s}",
738 argument_name_string (imp
, 0));
742 printf ("@code{LOGICAL} not wider than the default kind");
746 assert ("La" == NULL
);
755 printf ("@code{REAL}");
758 case '1': case '2': case '3': case '4': case '5':
759 case '6': case '7': case '8': case '9':
760 printf ("@code{REAL(KIND=%d)}", (kind
- '0'));
764 printf ("@code{REAL} with same @samp{KIND=} value as for @var{%s}",
765 argument_name_string (imp
, 0));
769 assert ("Ra" == NULL
);
778 printf ("@code{INTEGER} or @code{LOGICAL}");
781 case '1': case '2': case '3': case '4': case '5':
782 case '6': case '7': case '8': case '9':
783 printf ("@code{INTEGER(KIND=%d)} or @code{LOGICAL(KIND=%d)}",
784 (kind
- '0'), (kind
- '0'));
788 printf ("Same type and @samp{KIND=} value as for @var{%s}",
789 argument_name_string (imp
, 0));
793 printf ("@code{INTEGER} or @code{LOGICAL} not wider than the default kind");
797 assert ("Ba" == NULL
);
806 printf ("@code{REAL} or @code{COMPLEX}");
809 case '1': case '2': case '3': case '4': case '5':
810 case '6': case '7': case '8': case '9':
811 printf ("@code{REAL(KIND=%d)} or @code{COMPLEX(KIND=%d)}",
812 (kind
- '0'), (kind
- '0'));
816 printf ("Same type as @var{%s}",
817 argument_name_string (imp
, 0));
821 assert ("Fa" == NULL
);
830 printf ("@code{INTEGER}, @code{REAL}, or @code{COMPLEX}");
833 case '1': case '2': case '3': case '4': case '5':
834 case '6': case '7': case '8': case '9':
835 printf ("@code{INTEGER(KIND=%d)}, @code{REAL(KIND=%d)}, or @code{COMPLEX(KIND=%d)}",
836 (kind
- '0'), (kind
- '0'), (kind
- '0'));
840 assert ("N1" == NULL
);
849 printf ("@code{INTEGER} or @code{REAL}");
852 case '1': case '2': case '3': case '4': case '5':
853 case '6': case '7': case '8': case '9':
854 printf ("@code{INTEGER(KIND=%d)} or @code{REAL(KIND=%d)}",
855 (kind
- '0'), (kind
- '0'));
859 printf ("@code{INTEGER} or @code{REAL} with same @samp{KIND=} value as for @var{%s}",
860 argument_name_string (imp
, 0));
864 assert ("Sa" == NULL
);
870 printf ("@samp{*@var{label}}, where @var{label} is the label\n\
871 of an executable statement");
875 printf ("Signal handler (@code{INTEGER FUNCTION} or @code{SUBROUTINE})\n\
876 or dummy/global @code{INTEGER(KIND=1)} scalar");
880 assert ("arg type?" == NULL
);
890 printf ("; OPTIONAL (must be omitted if @var{%s} is @code{COMPLEX})",
891 argument_name_string (imp
, argno
-1));
895 printf ("; OPTIONAL");
899 printf ("; OPTIONAL");
907 printf ("; at least two such arguments must be provided");
911 assert ("optionality!" == NULL
);
927 assert (extra
!= '\0');
928 printf ("; DIMENSION(%d)", elements
);
937 printf ("; INTENT(IN)");
944 printf ("; cannot be a constant or expression");
948 printf ("; INTENT(OUT)");
952 printf ("; INTENT(INOUT)");
961 Intrinsic groups: ");
964 case FFEINTRIN_familyF77
:
965 printf ("(standard FORTRAN 77).");
968 case FFEINTRIN_familyGNU
:
969 printf ("@code{gnu}.");
972 case FFEINTRIN_familyASC
:
973 printf ("@code{f2c}, @code{f90}.");
976 case FFEINTRIN_familyMIL
:
977 printf ("@code{mil}, @code{f90}, @code{vxt}.");
980 case FFEINTRIN_familyF90
:
981 printf ("@code{f90}.");
984 case FFEINTRIN_familyVXT
:
985 printf ("@code{vxt}.");
988 case FFEINTRIN_familyFVZ
:
989 printf ("@code{f2c}, @code{vxt}.");
992 case FFEINTRIN_familyF2C
:
993 printf ("@code{f2c}.");
996 case FFEINTRIN_familyF2U
:
997 printf ("@code{unix}.");
1000 case FFEINTRIN_familyBADU77
:
1001 printf ("@code{badu77}.");
1005 assert ("bad family" == NULL
);
1006 printf ("@code{???}.");
1011 if (descriptions
[imp
] != NULL
)
1013 const char *c
= descriptions
[imp
];
1020 while (c
[0] != '\0')
1022 if (c
[0] == '@' && ISDIGIT (c
[1]))
1024 int argno
= c
[1] - '0';
1027 while (ISDIGIT (c
[0]))
1029 argno
= 10 * argno
+ (c
[0] - '0');
1032 assert (c
[0] == '@');
1034 printf ("%s", name_uc
);
1036 printf ("%s", argument_name_string (imp
, argno
- 1));
1039 fputc (c
[0], stdout
);
1048 argument_info_ptr (ffeintrinImp imp
, int argno
)
1050 const char *c
= imps
[imp
].control
;
1051 static char arginfos
[8][32];
1052 static int argx
= 0;
1062 while ((c
[0] != ',') && (c
[0] != '\0'))
1072 for (; (c
[0] != '=') && (c
[0] != '\0'); ++c
)
1075 assert (c
[0] == '=');
1077 for (i
= 0, ++c
; (c
[0] != ',') && (c
[0] != '\0'); ++c
, ++i
)
1078 arginfos
[argx
][i
] = c
[0];
1080 arginfos
[argx
][i
] = '\0';
1082 c
= &arginfos
[argx
][0];
1084 if (((size_t) argx
) >= ARRAY_SIZE (arginfos
))
1091 argument_info_string (ffeintrinImp imp
, int argno
)
1095 p
= argument_info_ptr (imp
, argno
);
1101 argument_name_ptr (ffeintrinImp imp
, int argno
)
1103 const char *c
= imps
[imp
].control
;
1104 static char argnames
[8][32];
1105 static int argx
= 0;
1115 while ((c
[0] != ',') && (c
[0] != '\0'))
1125 for (i
= 0; (c
[0] != '=') && (c
[0] != '\0'); ++c
, ++i
)
1126 argnames
[argx
][i
] = c
[0];
1128 assert (c
[0] == '=');
1129 argnames
[argx
][i
] = '\0';
1131 c
= &argnames
[argx
][0];
1133 if (((size_t) argx
) >= ARRAY_SIZE (argnames
))
1140 argument_name_string (ffeintrinImp imp
, int argno
)
1144 p
= argument_name_ptr (imp
, argno
);
1150 print_type_string (const char *c
)
1158 assert ((kind
== '1') || (kind
== '='));
1160 printf ("@code{CHARACTER*1}");
1163 assert (c
[2] == '*');
1164 printf ("@code{CHARACTER*(*)}");
1172 printf ("@code{COMPLEX}");
1175 case '1': case '2': case '3': case '4': case '5':
1176 case '6': case '7': case '8': case '9':
1177 printf ("@code{COMPLEX(KIND=%d)}", (kind
- '0'));
1181 assert ("Ca" == NULL
);
1190 printf ("@code{INTEGER}");
1193 case '1': case '2': case '3': case '4': case '5':
1194 case '6': case '7': case '8': case '9':
1195 printf ("@code{INTEGER(KIND=%d)}", (kind
- '0'));
1199 assert ("Ia" == NULL
);
1208 printf ("@code{LOGICAL}");
1211 case '1': case '2': case '3': case '4': case '5':
1212 case '6': case '7': case '8': case '9':
1213 printf ("@code{LOGICAL(KIND=%d)}", (kind
- '0'));
1217 assert ("La" == NULL
);
1226 printf ("@code{REAL}");
1229 case '1': case '2': case '3': case '4': case '5':
1230 case '6': case '7': case '8': case '9':
1231 printf ("@code{REAL(KIND=%d)}", (kind
- '0'));
1235 printf ("@code{REAL}");
1239 assert ("Ra" == NULL
);
1248 printf ("@code{INTEGER} or @code{LOGICAL}");
1251 case '1': case '2': case '3': case '4': case '5':
1252 case '6': case '7': case '8': case '9':
1253 printf ("@code{INTEGER(KIND=%d)} or @code{LOGICAL(KIND=%d)}",
1254 (kind
- '0'), (kind
- '0'));
1258 assert ("Ba" == NULL
);
1267 printf ("@code{REAL} or @code{COMPLEX}");
1270 case '1': case '2': case '3': case '4': case '5':
1271 case '6': case '7': case '8': case '9':
1272 printf ("@code{REAL(KIND=%d)} or @code{COMPLEX(KIND=%d)}",
1273 (kind
- '0'), (kind
- '0'));
1277 assert ("Fa" == NULL
);
1286 printf ("@code{INTEGER}, @code{REAL}, or @code{COMPLEX}");
1289 case '1': case '2': case '3': case '4': case '5':
1290 case '6': case '7': case '8': case '9':
1291 printf ("@code{INTEGER(KIND=%d)}, @code{REAL(KIND=%d)}, or @code{COMPLEX(KIND=%d)}",
1292 (kind
- '0'), (kind
- '0'), (kind
- '0'));
1296 assert ("N1" == NULL
);
1305 printf ("@code{INTEGER} or @code{REAL}");
1308 case '1': case '2': case '3': case '4': case '5':
1309 case '6': case '7': case '8': case '9':
1310 printf ("@code{INTEGER(KIND=%d)} or @code{REAL(KIND=%d)}",
1311 (kind
- '0'), (kind
- '0'));
1315 assert ("Sa" == NULL
);
1321 assert ("type?" == NULL
);