Warning fixes:

* bad.c (_ffebad_message_, ffebad_string_, ffebad_message_,
        ffebad_bufputs_, ffebad_bufputs_, ffebad_start_, ffebad_string,
        ffebad_finish): Const-ify a char*.
        * bld.c (ffebld_op_string_, ffebld_op_string): Likewise.
        * bld.h (ffebld_op_string): Likewise.
        * com.c (ffecom_arglist_expr_, ffecom_build_f2c_string_,
        ffecom_debug_kludge_, ffecom_f2c_make_type_,
        ffecom_get_appended_identifier_, ffecom_get_identifier_,
        ffecom_gfrt_args_): Likewise.
        (ffecom_convert_narrow_, ffecom_convert_widen_): Add prototype.
        (builtin_function, ffecom_gfrt_name_, ffecom_gfrt_argstring_,
        ffecom_arglist_expr_, ffecom_build_f2c_string_,
        ffecom_debug_kludge_, ffecom_f2c_make_type_,
        ffecom_get_appended_identifier_, ffecom_get_external_identifier_,
        ffecom_get_identifier_, ffecom_decl_field,
        ffecom_get_invented_identifier, lang_print_error_function,
        skip_redundant_dir_prefix, read_name_map, print_containing_files):
        Const-ify a char*.
        (savestring): Remove, use `xstrdup' instead.
        * com.h (ffecom_decl_field, ffecom_get_invented_identifier):
        Const-ify a char*.
        * data.c (ffebld, ffedata_gather_): Make explicitly static.
        * expr.c (ffeexpr_isdigits_, ffeexpr_percent_,
        ffeexpr_reduced_concatenate_, ffeexpr_nil_real_,
        ffeexpr_nil_number_, ffeexpr_nil_number_period_,
        ffeexpr_nil_number_real_, ffeexpr_token_real_,
        ffeexpr_token_number_, ffeexpr_token_number_period_,
        ffeexpr_token_number_real_): Const-ify a char*.
        * fini.c (xspaces): Likewise.
        * global.c (ffeglobal_type_string_): Likewise.
        (ffeglobal_drive): Protoize.
        (ffeglobal_proc_def_arg): Const-ify a char*.
        * global.h (ffeglobal_drive): Protoize.
        (ffeglobal_proc_def_arg): Const-ify a char*.
        * implic.c (ffeimplic_none, ffeimplic_peek_symbol_type):
        Likewise.
        * implic.h (ffeimplic_peek_symbol_type): Likewise.
        * info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_,
        ffeinfo_kind_string_, ffeinfo_kindtype_string_,
        ffeinfo_where_string_, ffeinfo_basictype_string,
        ffeinfo_kind_message, ffeinfo_kind_string,
        ffeinfo_kindtype_string, ffeinfo_where_string): Likewise.
        * info.h (ffeinfo_basictype_string, ffeinfo_kind_message,
        ffeinfo_kind_string, ffeinfo_kindtype_string,
        ffeinfo_where_string): Likewise.
        * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
        _ffeintrin_imp_, ffeintrin_check_, ffeintrin_cmp_name_,
        ffeintrin_fulfill_specific, ffeintrin_init_0,
        ffeintrin_is_actualarg, ffeintrin_is_intrinsic,
        ffeintrin_name_generic, ffeintrin_name_implementation,
        ffeintrin_name_specific): Likewise.
        * intrin.h (ffeintrin_is_intrinsic, ffeintrin_name_generic,
        ffeintrin_name_implementation, ffeintrin_name_specific): Likewise.
        * lex.c (ffelex_type_string_, ffelex_token_new_character,
        ffelex_token_new_name, ffelex_token_new_names,
        ffelex_token_new_number): Likewise.
        * lex.h (ffelex_token_new_character, ffelex_token_new_name,
        ffelex_token_new_names, ffelex_token_new_number): Likewise.
        * malloc.c (malloc_types_, malloc_pool_new, malloc_new_inpool_,
        malloc_new_zinpool_): Likewise.
        * malloc.h (malloc_new_inpool_, malloc_new_zinpool_,
        malloc_pool_new): Likewise.
        * name.c (ffename_space_drive_global, ffename_space_drive_symbol):
        Protoize.
        * name.h (ffename_space_drive_global, ffename_space_drive_symbol):
        Likewise.
        * symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_,
        ffesymbol_attrs_string): Const-ify a char*.
        (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
        (ffesymbol_state_string): Const-ify a char*.
        * symbol.h (ffesymbol_attrs_string): Likewise.
        (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
        (ffesymbol_state_string): Const-ify a char*.
        * target.c (ffetarget_layout): Likewise.
        * target.h (ffetarget_layout): Likewise.

From-SVN: r26013
This commit is contained in:
Kaveh R. Ghazi 1999-03-27 10:24:06 +00:00 committed by Kaveh Ghazi
parent 90e734a853
commit 26f096f9e5
28 changed files with 262 additions and 166 deletions

View File

@ -1,3 +1,106 @@
Sat Mar 27 13:00:43 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* bad.c (_ffebad_message_, ffebad_string_, ffebad_message_,
ffebad_bufputs_, ffebad_bufputs_, ffebad_start_, ffebad_string,
ffebad_finish): Const-ify a char*.
* bld.c (ffebld_op_string_, ffebld_op_string): Likewise.
* bld.h (ffebld_op_string): Likewise.
* com.c (ffecom_arglist_expr_, ffecom_build_f2c_string_,
ffecom_debug_kludge_, ffecom_f2c_make_type_,
ffecom_get_appended_identifier_, ffecom_get_identifier_,
ffecom_gfrt_args_): Likewise.
(ffecom_convert_narrow_, ffecom_convert_widen_): Add prototype.
(builtin_function, ffecom_gfrt_name_, ffecom_gfrt_argstring_,
ffecom_arglist_expr_, ffecom_build_f2c_string_,
ffecom_debug_kludge_, ffecom_f2c_make_type_,
ffecom_get_appended_identifier_, ffecom_get_external_identifier_,
ffecom_get_identifier_, ffecom_decl_field,
ffecom_get_invented_identifier, lang_print_error_function,
skip_redundant_dir_prefix, read_name_map, print_containing_files):
Const-ify a char*.
(savestring): Remove, use `xstrdup' instead.
* com.h (ffecom_decl_field, ffecom_get_invented_identifier):
Const-ify a char*.
* data.c (ffebld, ffedata_gather_): Make explicitly static.
* expr.c (ffeexpr_isdigits_, ffeexpr_percent_,
ffeexpr_reduced_concatenate_, ffeexpr_nil_real_,
ffeexpr_nil_number_, ffeexpr_nil_number_period_,
ffeexpr_nil_number_real_, ffeexpr_token_real_,
ffeexpr_token_number_, ffeexpr_token_number_period_,
ffeexpr_token_number_real_): Const-ify a char*.
* fini.c (xspaces): Likewise.
* global.c (ffeglobal_type_string_): Likewise.
(ffeglobal_drive): Protoize.
(ffeglobal_proc_def_arg): Const-ify a char*.
* global.h (ffeglobal_drive): Protoize.
(ffeglobal_proc_def_arg): Const-ify a char*.
* implic.c (ffeimplic_none, ffeimplic_peek_symbol_type):
Likewise.
* implic.h (ffeimplic_peek_symbol_type): Likewise.
* info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_,
ffeinfo_kind_string_, ffeinfo_kindtype_string_,
ffeinfo_where_string_, ffeinfo_basictype_string,
ffeinfo_kind_message, ffeinfo_kind_string,
ffeinfo_kindtype_string, ffeinfo_where_string): Likewise.
* info.h (ffeinfo_basictype_string, ffeinfo_kind_message,
ffeinfo_kind_string, ffeinfo_kindtype_string,
ffeinfo_where_string): Likewise.
* intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
_ffeintrin_imp_, ffeintrin_check_, ffeintrin_cmp_name_,
ffeintrin_fulfill_specific, ffeintrin_init_0,
ffeintrin_is_actualarg, ffeintrin_is_intrinsic,
ffeintrin_name_generic, ffeintrin_name_implementation,
ffeintrin_name_specific): Likewise.
* intrin.h (ffeintrin_is_intrinsic, ffeintrin_name_generic,
ffeintrin_name_implementation, ffeintrin_name_specific): Likewise.
* lex.c (ffelex_type_string_, ffelex_token_new_character,
ffelex_token_new_name, ffelex_token_new_names,
ffelex_token_new_number): Likewise.
* lex.h (ffelex_token_new_character, ffelex_token_new_name,
ffelex_token_new_names, ffelex_token_new_number): Likewise.
* malloc.c (malloc_types_, malloc_pool_new, malloc_new_inpool_,
malloc_new_zinpool_): Likewise.
* malloc.h (malloc_new_inpool_, malloc_new_zinpool_,
malloc_pool_new): Likewise.
* name.c (ffename_space_drive_global, ffename_space_drive_symbol):
Protoize.
* name.h (ffename_space_drive_global, ffename_space_drive_symbol):
Likewise.
* symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_,
ffesymbol_attrs_string): Const-ify a char*.
(ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
(ffesymbol_state_string): Const-ify a char*.
* symbol.h (ffesymbol_attrs_string): Likewise.
(ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
(ffesymbol_state_string): Const-ify a char*.
* target.c (ffetarget_layout): Likewise.
* target.h (ffetarget_layout): Likewise.
1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
* Make-lang.in: Remove all references to g77.o/g77.c.

View File

@ -62,7 +62,7 @@ bool ffebad_is_inhibited_ = FALSE;
struct _ffebad_message_
{
ffebadSeverity severity;
char *message;
const char *message;
};
/* Static objects accessed by functions in this module. */
@ -89,11 +89,11 @@ static struct
}
ffebad_here_[FFEBAD_MAX_];
static char *ffebad_string_[FFEBAD_MAX_];
static const char *ffebad_string_[FFEBAD_MAX_];
static ffebadIndex ffebad_order_[FFEBAD_MAX_];
static ffebad ffebad_errnum_;
static ffebadSeverity ffebad_severity_;
static char *ffebad_message_;
static const char *ffebad_message_;
static unsigned char ffebad_index_;
static ffebadIndex ffebad_places_;
static bool ffebad_is_temp_inhibited_; /* Effective setting of
@ -102,7 +102,7 @@ static bool ffebad_is_temp_inhibited_; /* Effective setting of
/* Static functions (internal). */
static int ffebad_bufputs_ (char buf[], int bufi, char *s);
static int ffebad_bufputs_ (char buf[], int bufi, const char *s);
/* Internal macros. */
@ -115,7 +115,7 @@ static int ffebad_bufputs_ (char buf[], int bufi, char *s);
static int
ffebad_bufputs_ (char buf[], int bufi, char *s)
ffebad_bufputs_ (char buf[], int bufi, const char *s)
{
for (; *s != '\0'; ++s)
bufi = ffebad_bufputc_ (buf, bufi, *s);
@ -161,7 +161,7 @@ ffebad_severity (ffebad errnum)
bool
ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev,
char *message)
const char *message)
{
unsigned char i;
@ -321,7 +321,7 @@ ffebad_here (ffebadIndex index, ffewhereLine line, ffewhereColumn col)
/* Establish string for next index (always in order) of message
ffebad_string(char *string);
ffebad_string(const char *string);
Call ffebad_start to establish the message, ffebad_here and ffebad_string
to send run-time data to it as necessary, then ffebad_finish when through
@ -330,7 +330,7 @@ ffebad_here (ffebadIndex index, ffewhereLine line, ffewhereColumn col)
the argument passed in until then. */
void
ffebad_string (char *string)
ffebad_string (const char *string)
{
if (ffebad_is_temp_inhibited_)
return;
@ -351,7 +351,7 @@ void
ffebad_finish ()
{
#define MAX_SPACES 132
static char *spaces
static const char *spaces
= "...>\
\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\
\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\
@ -373,8 +373,8 @@ ffebad_finish ()
unsigned short i;
char pointer;
unsigned char c;
unsigned char *s;
char *fn;
unsigned const char *s;
const char *fn;
static char buf[1024];
int bufi;
int index;

View File

@ -82,8 +82,8 @@ void ffebad_init_0 (void);
bool ffebad_is_fatal (ffebad errnum);
ffebadSeverity ffebad_severity (ffebad errnum);
bool ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev,
char *message);
void ffebad_string (char *string);
const char *message);
void ffebad_string (const char *string);
/* Define macros. */

View File

@ -203,7 +203,7 @@ static ffebldConstant ffebld_constant_hollerith_;
static ffebldConstant ffebld_constant_typeless_[FFEBLD_constTYPELESS_LAST
- FFEBLD_constTYPELESS_FIRST + 1];
static char *ffebld_op_string_[]
static const char *ffebld_op_string_[]
=
{
#define FFEBLD_OP(KWD,NAME,ARITY) NAME,
@ -5745,7 +5745,7 @@ ffebld_pool_push (mallocPool pool)
Returns a short string (uppercase) containing the name of the op. */
char *
const char *
ffebld_op_string (ffebldOp o)
{
if (o >= ARRAY_SIZE (ffebld_op_string_))

View File

@ -726,7 +726,7 @@ ffebld ffebld_new_symter (ffesymbol s, ffeintrinGen gen, ffeintrinSpec spec,
ffeintrinImp imp);
ffebld ffebld_new_one (ffebldOp o, ffebld left);
ffebld ffebld_new_two (ffebldOp o, ffebld left, ffebld right);
char *ffebld_op_string (ffebldOp o);
const char *ffebld_op_string (ffebldOp o);
void ffebld_pool_pop (void);
void ffebld_pool_push (mallocPool pool);
ffetargetCharacterSize ffebld_size_max (ffebld b);

View File

@ -403,7 +403,7 @@ struct _ffecom_temp_
/* Static functions (internal). */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree ffecom_arglist_expr_ (char *argstring, ffebld args);
static tree ffecom_arglist_expr_ (const char *argstring, ffebld args);
static tree ffecom_widest_expr_type_ (ffebld list);
static bool ffecom_overlap_ (tree dest_decl, tree dest_offset,
tree dest_size, tree source_tree,
@ -411,7 +411,7 @@ static bool ffecom_overlap_ (tree dest_decl, tree dest_offset,
static bool ffecom_args_overlapping_ (tree dest_tree, ffebld dest,
tree args, tree callee_commons,
bool scalar_args);
static tree ffecom_build_f2c_string_ (int i, char *s);
static tree ffecom_build_f2c_string_ (int i, const char *s);
static tree ffecom_call_ (tree fn, ffeinfoKindtype kt,
bool is_f2c_complex, tree type,
tree args, tree dest_tree,
@ -434,8 +434,9 @@ static ffecomConcatList_
static void ffecom_concat_list_kill_ (ffecomConcatList_ catlist);
static ffecomConcatList_ ffecom_concat_list_new_ (ffebld expr,
ffetargetCharacterSize max);
static void ffecom_debug_kludge_ (tree aggr, char *aggr_type, ffesymbol member,
tree member_type, ffetargetOffset offset);
static void ffecom_debug_kludge_ (tree aggr, const char *aggr_type,
ffesymbol member, tree member_type,
ffetargetOffset offset);
static void ffecom_do_entry_ (ffesymbol fn, int entrynum);
static tree ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
bool *dest_used, bool assignp, bool widenp);
@ -443,18 +444,18 @@ static tree ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
ffebld dest, bool *dest_used);
static tree ffecom_expr_power_integer_ (ffebld left, ffebld right);
static void ffecom_expr_transform_ (ffebld expr);
static void ffecom_f2c_make_type_ (tree *type, int tcode, char *name);
static void ffecom_f2c_make_type_ (tree *type, int tcode, const char *name);
static void ffecom_f2c_set_lio_code_ (ffeinfoBasictype bt, int size,
int code);
static ffeglobal ffecom_finish_global_ (ffeglobal global);
static ffesymbol ffecom_finish_symbol_transform_ (ffesymbol s);
static tree ffecom_get_appended_identifier_ (char us, char *text);
static tree ffecom_get_appended_identifier_ (char us, const char *text);
static tree ffecom_get_external_identifier_ (ffesymbol s);
static tree ffecom_get_identifier_ (char *text);
static tree ffecom_get_identifier_ (const char *text);
static tree ffecom_gen_sfuncdef_ (ffesymbol s,
ffeinfoBasictype bt,
ffeinfoKindtype kt);
static char *ffecom_gfrt_args_ (ffecomGfrt ix);
static const char *ffecom_gfrt_args_ (ffecomGfrt ix);
static tree ffecom_gfrt_tree_ (ffecomGfrt ix);
static tree ffecom_init_zero_ (tree decl);
static tree ffecom_intrinsic_ichar_ (tree tree_type, ffebld arg,
@ -495,6 +496,8 @@ static tree ffecom_type_vardesc_ (void);
static tree ffecom_vardesc_ (ffebld expr);
static tree ffecom_vardesc_array_ (ffesymbol s);
static tree ffecom_vardesc_dims_ (ffesymbol s);
static tree ffecom_convert_narrow_ (tree type, tree expr);
static tree ffecom_convert_widen_ (tree type, tree expr);
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
/* These are static functions that parallel those found in the C front
@ -503,9 +506,9 @@ static tree ffecom_vardesc_dims_ (ffesymbol s);
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static void bison_rule_compstmt_ (void);
static void bison_rule_pushlevel_ (void);
static tree builtin_function (char *name, tree type,
static tree builtin_function (const char *name, tree type,
enum built_in_function function_code,
char *library_name);
const char *library_name);
static int duplicate_decls (tree newdecl, tree olddecl);
static void finish_decl (tree decl, tree init, bool is_top_level);
static void finish_function (int nested);
@ -577,7 +580,7 @@ static tree ffecom_gfrt_[FFECOM_gfrt]
/* Holds the external names of the functions. */
static char *ffecom_gfrt_name_[FFECOM_gfrt]
static const char *ffecom_gfrt_name_[FFECOM_gfrt]
=
{
#define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) NAME,
@ -617,7 +620,7 @@ static ffecomRttype_ ffecom_gfrt_type_[FFECOM_gfrt]
/* String of codes for the function's arguments. */
static char *ffecom_gfrt_argstring_[FFECOM_gfrt]
static const char *ffecom_gfrt_argstring_[FFECOM_gfrt]
=
{
#define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) ARGS,
@ -1097,7 +1100,7 @@ ffecom_build_complex_constant_ (tree type, tree realpart, tree imagpart)
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
ffecom_arglist_expr_ (char *c, ffebld expr)
ffecom_arglist_expr_ (const char *c, ffebld expr)
{
tree list;
tree *plist = &list;
@ -1519,14 +1522,14 @@ ffecom_args_overlapping_ (tree dest_tree, ffebld dest UNUSED,
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
ffecom_build_f2c_string_ (int i, char *s)
ffecom_build_f2c_string_ (int i, const char *s)
{
if (!ffe_is_f2c_library ())
return build_string (i, s);
{
char *tmp;
char *p;
const char *p;
char *q;
char space[34];
tree t;
@ -2268,7 +2271,7 @@ ffecom_concat_list_new_ (ffebld expr, ffetargetCharacterSize max)
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static void
ffecom_debug_kludge_ (tree aggr, char *aggr_type, ffesymbol member,
ffecom_debug_kludge_ (tree aggr, const char *aggr_type, ffesymbol member,
tree member_type UNUSED, ffetargetOffset offset)
{
tree value;
@ -6562,7 +6565,7 @@ tail_recurse: /* :::::::::::::::::::: */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static void
ffecom_f2c_make_type_ (tree *type, int tcode, char *name)
ffecom_f2c_make_type_ (tree *type, int tcode, const char *name)
{
switch (tcode)
{
@ -6762,7 +6765,7 @@ ffecom_finish_symbol_transform_ (ffesymbol s)
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
ffecom_get_appended_identifier_ (char us, char *name)
ffecom_get_appended_identifier_ (char us, const char *name)
{
int i;
char *newname;
@ -6791,7 +6794,7 @@ static tree
ffecom_get_external_identifier_ (ffesymbol s)
{
char us;
char *name = ffesymbol_text (s);
const char *name = ffesymbol_text (s);
/* If name is a built-in name, just return it as is. */
@ -6830,7 +6833,7 @@ ffecom_get_external_identifier_ (ffesymbol s)
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree
ffecom_get_identifier_ (char *name)
ffecom_get_identifier_ (const char *name)
{
/* If name does not contain an underscore, just return it as is. */
@ -6991,7 +6994,7 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt)
#endif
#if FFECOM_targetCURRENT == FFECOM_targetGCC
static char *
static const char *
ffecom_gfrt_args_ (ffecomGfrt ix)
{
return ffecom_gfrt_argstring_[ix];
@ -11478,7 +11481,7 @@ ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt,
#if FFECOM_targetCURRENT == FFECOM_targetGCC
tree
ffecom_decl_field (tree context, tree prevfield,
char *name, tree type)
const char *name, tree type)
{
tree field;
@ -11788,7 +11791,7 @@ ffecom_finish_progunit ()
#if FFECOM_targetCURRENT == FFECOM_targetGCC
tree
ffecom_get_invented_identifier (char *pattern, char *text, int number)
ffecom_get_invented_identifier (const char *pattern, const char *text, int number)
{
tree decl;
char *nam;
@ -13813,8 +13816,9 @@ bison_rule_pushlevel_ ()
the name to be called if we can't opencode the function. */
static tree
builtin_function (char *name, tree type,
enum built_in_function function_code, char *library_name)
builtin_function (const char *name, tree type,
enum built_in_function function_code,
const char *library_name)
{
tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
DECL_EXTERNAL (decl) = 1;
@ -14418,7 +14422,7 @@ lang_print_error_function (file)
static ffesymbol last_s = NULL;
ffeglobal g;
ffesymbol s;
char *kind;
const char *kind;
if ((ffecom_primary_entry_ == NULL)
|| (ffesymbol_global (ffecom_primary_entry_) == NULL))
@ -14472,7 +14476,7 @@ lang_print_error_function (file)
fprintf (stderr, "Outside of any program unit:\n");
else
{
char *name = ffesymbol_text (s);
const char *name = ffesymbol_text (s);
fprintf (stderr, "In %s `%s':\n", kind, name);
}
@ -15824,8 +15828,8 @@ unsigned_type (type)
/* Skip leading "./" from a directory name.
This may yield the empty string, which represents the current directory. */
static char *
skip_redundant_dir_prefix (char *dir)
static const char *
skip_redundant_dir_prefix (const char *dir)
{
while (dir[0] == '.' && dir[1] == '/')
for (dir += 2; *dir == '/'; dir++)
@ -15923,10 +15927,9 @@ static void append_include_chain (struct file_name_list *first,
static FILE *open_include_file (char *filename,
struct file_name_list *searchptr);
static void print_containing_files (ffebadSeverity sev);
static char *skip_redundant_dir_prefix (char *);
static const char *skip_redundant_dir_prefix (const char *);
static char *read_filename_string (int ch, FILE *f);
static struct file_name_map *read_name_map (char *dirname);
static char *savestring (char *input);
static struct file_name_map *read_name_map (const char *dirname);
/* Append a chain of `struct file_name_list's
to the end of the main include chain.
@ -16048,8 +16051,8 @@ print_containing_files (ffebadSeverity sev)
FILE_BUF *ip = NULL;
int i;
int first = 1;
char *str1;
char *str2;
const char *str1;
const char *str2;
/* If stack of files hasn't changed since we last printed
this info, don't repeat it. */
@ -16134,7 +16137,7 @@ read_filename_string (ch, f)
static struct file_name_map *
read_name_map (dirname)
char *dirname;
const char *dirname;
{
/* This structure holds a linked list of file name maps, one per
directory. */
@ -16160,7 +16163,7 @@ read_name_map (dirname)
map_list_ptr = ((struct file_name_map_list *)
xmalloc (sizeof (struct file_name_map_list)));
map_list_ptr->map_list_name = savestring (dirname);
map_list_ptr->map_list_name = xstrdup (dirname);
map_list_ptr->map_list_map = NULL;
dirlen = strlen (dirname);
@ -16221,16 +16224,6 @@ read_name_map (dirname)
return map_list_ptr->map_list_map;
}
static char *
savestring (input)
char *input;
{
unsigned size = strlen (input);
char *output = xmalloc (size + 1);
strcpy (output, input);
return output;
}
static void
ffecom_file_ (char *name)
{

View File

@ -283,7 +283,7 @@ tree ffecom_arg_ptr_to_expr (ffebld expr, tree *length);
tree ffecom_call_gfrt (ffecomGfrt ix, tree args);
tree ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt,
ffeinfoKindtype kt, tree tree_type);
tree ffecom_decl_field (tree context, tree prevfield, char *name,
tree ffecom_decl_field (tree context, tree prevfield, const char *name,
tree type);
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
void ffecom_close_include (FILE *f);
@ -299,7 +299,7 @@ tree ffecom_expr_rw (ffebld expr);
void ffecom_finish_compile (void);
void ffecom_finish_decl (tree decl, tree init, bool is_top_level);
void ffecom_finish_progunit (void);
tree ffecom_get_invented_identifier (char *pattern, char *text,
tree ffecom_get_invented_identifier (const char *pattern, const char *text,
int number);
ffeinfoKindtype ffecom_gfrt_basictype (ffecomGfrt ix);
ffeinfoKindtype ffecom_gfrt_kindtype (ffecomGfrt ix);

View File

@ -668,7 +668,7 @@ tail_recurse: /* :::::::::::::::::::: */
expression doesn't already exist in the cache) and then puts the result
in the cache. */
ffebld
static ffebld
ffedata_convert_ (ffebld source, ffelexToken source_token,
ffelexToken dest_token, ffeinfoBasictype bt,
ffeinfoKindtype kt, ffeinfoRank rk,
@ -1119,7 +1119,7 @@ ffedata_eval_substr_end_ (ffebld expr, ffetargetCharacterSize min,
If st has any initialization info, transfer that info into mst and
clear st's info. */
void
static void
ffedata_gather_ (ffestorag mst, ffestorag st)
{
ffesymbol s;

View File

@ -268,7 +268,7 @@ static void ffeexpr_update_impdo_sym_ (ffebld expr, ffesymbol dovar);
static ffeexprContext ffeexpr_context_outer_ (ffeexprStack_ s);
static ffeexprExpr_ ffeexpr_expr_new_ (void);
static void ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t);
static bool ffeexpr_isdigits_ (char *p);
static bool ffeexpr_isdigits_ (const char *p);
static ffelexHandler ffeexpr_token_first_lhs_ (ffelexToken t);
static ffelexHandler ffeexpr_token_first_lhs_1_ (ffelexToken t);
static ffelexHandler ffeexpr_token_first_rhs_ (ffelexToken t);
@ -8584,7 +8584,7 @@ ffeexpr_context_outer_ (ffeexprStack_ s)
static ffeexprPercent_
ffeexpr_percent_ (ffelexToken t)
{
char *p;
const char *p;
switch (ffelex_token_length (t))
{
@ -9537,7 +9537,7 @@ ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t)
/* Check whether rest of string is all decimal digits. */
static bool
ffeexpr_isdigits_ (char *p)
ffeexpr_isdigits_ (const char *p)
{
for (; *p != '\0'; ++p)
if (! ISDIGIT (*p))
@ -10378,7 +10378,7 @@ ffeexpr_reduced_concatenate_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op,
if ((lkd != FFEINFO_kindANY)
&& ffebad_start (FFEBAD_CONCAT_ARG_KIND))
{
char *what;
const char *what;
if (lrk != 0)
what = "an array";
@ -10394,7 +10394,7 @@ ffeexpr_reduced_concatenate_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op,
{
if (ffebad_start (FFEBAD_CONCAT_ARG_KIND))
{
char *what;
const char *what;
if (rrk != 0)
what = "an array";
@ -11666,7 +11666,7 @@ static ffelexHandler
ffeexpr_nil_real_ (ffelexToken t)
{
char d;
char *p;
const char *p;
if (((ffelex_token_type (t) != FFELEX_typeNAME)
&& (ffelex_token_type (t) != FFELEX_typeNAMES))
@ -11704,7 +11704,7 @@ static ffelexHandler
ffeexpr_nil_number_ (ffelexToken t)
{
char d;
char *p;
const char *p;
if (ffeexpr_hollerith_count_ > 0)
ffelex_set_expecting_hollerith (0, '\0',
@ -11779,7 +11779,7 @@ ffeexpr_nil_number_period_ (ffelexToken t)
{
ffelexHandler nexthandler;
char d;
char *p;
const char *p;
switch (ffelex_token_type (t))
{
@ -11836,7 +11836,7 @@ static ffelexHandler
ffeexpr_nil_number_real_ (ffelexToken t)
{
char d;
char *p;
const char *p;
if (((ffelex_token_type (t) != FFELEX_typeNAME)
&& (ffelex_token_type (t) != FFELEX_typeNAMES))
@ -13652,7 +13652,7 @@ static ffelexHandler
ffeexpr_token_real_ (ffelexToken t)
{
char d;
char *p;
const char *p;
if (((ffelex_token_type (t) != FFELEX_typeNAME)
&& (ffelex_token_type (t) != FFELEX_typeNAMES))
@ -13809,7 +13809,7 @@ ffeexpr_token_number_ (ffelexToken t)
ffeexprExpr_ e;
ffeinfo ni;
char d;
char *p;
const char *p;
if (ffeexpr_hollerith_count_ > 0)
ffelex_set_expecting_hollerith (0, '\0',
@ -13965,7 +13965,7 @@ ffeexpr_token_number_period_ (ffelexToken t)
{
ffeexprExpr_ e;
ffelexHandler nexthandler;
char *p;
const char *p;
char d;
switch (ffelex_token_type (t))
@ -14083,7 +14083,7 @@ static ffelexHandler
ffeexpr_token_number_real_ (ffelexToken t)
{
char d;
char *p;
const char *p;
if (((ffelex_token_type (t) != FFELEX_typeNAME)
&& (ffelex_token_type (t) != FFELEX_typeNAMES))

View File

@ -62,7 +62,7 @@ static FILE *out;
static char prefix[32];
static char postfix[32];
static char storage[32];
static char *xspaces[]
static const char *xspaces[]
=
{
"", /* 0 */

View File

@ -60,7 +60,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#if FFEGLOBAL_ENABLED
static ffenameSpace ffeglobal_filewide_ = NULL;
static char *ffeglobal_type_string_[] =
static const char *ffeglobal_type_string_[] =
{
[FFEGLOBAL_typeNONE] "??",
[FFEGLOBAL_typeMAIN] "main program",
@ -86,7 +86,7 @@ static char *ffeglobal_type_string_[] =
#if FFEGLOBAL_ENABLED
void
ffeglobal_drive (ffeglobal (*fn) ())
ffeglobal_drive (ffeglobal (*fn) (ffeglobal))
{
if (ffeglobal_filewide_ != NULL)
ffename_space_drive_global (ffeglobal_filewide_, fn);
@ -514,7 +514,7 @@ ffeglobal_pad_common (ffesymbol s, ffetargetAlign pad, ffewhereLine wl,
/* Collect info for a global's argument. */
void
ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary as,
ffeglobal_proc_def_arg (ffesymbol s, int argno, const char *name, ffeglobalArgSummary as,
ffeinfoBasictype bt, ffeinfoKindtype kt,
bool array)
{
@ -538,8 +538,8 @@ ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary
if ((ai->t != NULL)
&& ffe_is_warn_globals ())
{
char *refwhy = NULL;
char *defwhy = NULL;
const char *refwhy = NULL;
const char *defwhy = NULL;
bool warn = FALSE;
switch (as)
@ -816,8 +816,8 @@ ffeglobal_proc_ref_arg (ffesymbol s, int argno, ffeglobalArgSummary as,
if (ai->t != NULL)
{
char *refwhy = NULL;
char *defwhy = NULL;
const char *refwhy = NULL;
const char *defwhy = NULL;
bool fail = FALSE;
bool warn = FALSE;

View File

@ -128,14 +128,14 @@ struct _ffeglobal_
/* Declare functions with prototypes. */
void ffeglobal_drive (ffeglobal (*fn) ());
void ffeglobal_drive (ffeglobal (*fn) (ffeglobal));
void ffeglobal_init_1 (void);
void ffeglobal_init_common (ffesymbol s, ffelexToken t);
void ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type);
void ffeglobal_new_common (ffesymbol s, ffelexToken t, bool blank);
void ffeglobal_pad_common (ffesymbol s, ffetargetAlign pad, ffewhereLine wl,
ffewhereColumn wc);
void ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary as,
void ffeglobal_proc_def_arg (ffesymbol s, int argno, const char *name, ffeglobalArgSummary as,
ffeinfoBasictype bt, ffeinfoKindtype kt,
bool array);
void ffeglobal_proc_def_nargs (ffesymbol s, int n_args);

View File

@ -331,7 +331,7 @@ ffeimplic_none ()
/* ffeimplic_peek_symbol_type -- Determine implicit type of a symbol
ffesymbol s;
char *name; // name for s in case it is NULL, or NULL if s never NULL
const char *name; // name for s in case it is NULL, or NULL if s never NULL
if (ffeimplic_peek_symbol_type(s,name) == FFEINFO_basictypeCHARACTER)
// is or will be a CHARACTER-typed name
@ -348,7 +348,7 @@ ffeimplic_none ()
needed anyway (as when ffecom calls it). */
ffeinfoBasictype
ffeimplic_peek_symbol_type (ffesymbol s, char *name)
ffeimplic_peek_symbol_type (ffesymbol s, const char *name)
{
char c;
ffeimplic_ imp;

View File

@ -55,7 +55,7 @@ bool ffeimplic_establish_initial (char c, ffeinfoBasictype basic_type,
bool ffeimplic_establish_symbol (ffesymbol s);
void ffeimplic_init_2 (void);
void ffeimplic_none (void);
ffeinfoBasictype ffeimplic_peek_symbol_type (ffesymbol s, char *name);
ffeinfoBasictype ffeimplic_peek_symbol_type (ffesymbol s, const char *name);
void ffeimplic_terminate_2 (void);
/* Define macros. */

View File

@ -55,21 +55,21 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Static objects accessed by functions in this module. */
static char *ffeinfo_basictype_string_[]
static const char *ffeinfo_basictype_string_[]
=
{
#define FFEINFO_BASICTYPE(KWD,LNAM,SNAM) SNAM,
#include "info-b.def"
#undef FFEINFO_BASICTYPE
};
static char *ffeinfo_kind_message_[]
static const char *ffeinfo_kind_message_[]
=
{
#define FFEINFO_KIND(KWD,LNAM,SNAM) LNAM,
#include "info-k.def"
#undef FFEINFO_KIND
};
static char *ffeinfo_kind_string_[]
static const char *ffeinfo_kind_string_[]
=
{
#define FFEINFO_KIND(KWD,LNAM,SNAM) SNAM,
@ -77,7 +77,7 @@ static char *ffeinfo_kind_string_[]
#undef FFEINFO_KIND
};
static ffeinfoBasictype ffeinfo_combine_[FFEINFO_basictype][FFEINFO_basictype];
static char *ffeinfo_kindtype_string_[]
static const char *ffeinfo_kindtype_string_[]
=
{
"",
@ -91,7 +91,7 @@ static char *ffeinfo_kindtype_string_[]
"8",
"*",
};
static char *ffeinfo_where_string_[]
static const char *ffeinfo_where_string_[]
=
{
#define FFEINFO_WHERE(KWD,LNAM,SNAM) SNAM,
@ -129,7 +129,7 @@ ffeinfo_basictype_combine (ffeinfoBasictype l, ffeinfoBasictype r)
Returns the string based on the basic type. */
char *
const char *
ffeinfo_basictype_string (ffeinfoBasictype basictype)
{
if (basictype >= ARRAY_SIZE (ffeinfo_basictype_string_))
@ -186,7 +186,7 @@ ffeinfo_init_0 ()
Returns the string based on the kind. */
char *
const char *
ffeinfo_kind_message (ffeinfoKind kind)
{
if (kind >= ARRAY_SIZE (ffeinfo_kind_message_))
@ -201,7 +201,7 @@ ffeinfo_kind_message (ffeinfoKind kind)
Returns the string based on the kind. */
char *
const char *
ffeinfo_kind_string (ffeinfoKind kind)
{
if (kind >= ARRAY_SIZE (ffeinfo_kind_string_))
@ -232,7 +232,7 @@ ffeinfo_kindtype_max(ffeinfoBasictype bt,
Returns the string based on the kind type. */
char *
const char *
ffeinfo_kindtype_string (ffeinfoKindtype kind_type)
{
if (kind_type >= ARRAY_SIZE (ffeinfo_kindtype_string_))
@ -267,7 +267,7 @@ ffeinfo_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype)
Returns the string based on the where. */
char *
const char *
ffeinfo_where_string (ffeinfoWhere where)
{
if (where >= ARRAY_SIZE (ffeinfo_where_string_))

View File

@ -127,15 +127,15 @@ struct _ffeinfo_
ffeinfoBasictype ffeinfo_basictype_combine (ffeinfoBasictype l,
ffeinfoBasictype r);
char *ffeinfo_basictype_string (ffeinfoBasictype basictype);
const char *ffeinfo_basictype_string (ffeinfoBasictype basictype);
void ffeinfo_init_0 (void);
char *ffeinfo_kind_message (ffeinfoKind kind);
char *ffeinfo_kind_string (ffeinfoKind kind);
const char *ffeinfo_kind_message (ffeinfoKind kind);
const char *ffeinfo_kind_string (ffeinfoKind kind);
ffeinfoKindtype ffeinfo_kindtype_max(ffeinfoBasictype bt,
ffeinfoKindtype k1,
ffeinfoKindtype k2);
char *ffeinfo_kindtype_string (ffeinfoKindtype kind_type);
char *ffeinfo_where_string (ffeinfoWhere where);
const char *ffeinfo_kindtype_string (ffeinfoKindtype kind_type);
const char *ffeinfo_where_string (ffeinfoWhere where);
ffeinfo ffeinfo_new (ffeinfoBasictype basictype, ffeinfoKindtype kindtype,
ffeinfoRank rank, ffeinfoKind kind, ffeinfoWhere where,
ffetargetCharacterSize size);

View File

@ -32,22 +32,22 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
struct _ffeintrin_name_
{
char *name_uc;
char *name_lc;
char *name_ic;
const char *name_uc;
const char *name_lc;
const char *name_ic;
ffeintrinGen generic;
ffeintrinSpec specific;
};
struct _ffeintrin_gen_
{
char *name; /* Name as seen in program. */
const char *name; /* Name as seen in program. */
ffeintrinSpec specs[2];
};
struct _ffeintrin_spec_
{
char *name; /* Uppercase name as seen in source code,
const char *name; /* Uppercase name as seen in source code,
lowercase if no source name, "none" if no
name at all (NONE case). */
bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */
@ -57,13 +57,13 @@ struct _ffeintrin_spec_
struct _ffeintrin_imp_
{
char *name; /* Name of implementation. */
const char *name; /* Name of implementation. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
ffecomGfrt gfrt_direct; /* library routine, direct-callable form. */
ffecomGfrt gfrt_f2c; /* library routine, f2c-callable form. */
ffecomGfrt gfrt_gnu; /* library routine, gnu-callable form. */
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
char *control;
const char *control;
char y2kbad;
};
@ -166,9 +166,9 @@ ffeintrin_check_ (ffeintrinImp imp, ffebldOp op,
ffelexToken t,
bool commit)
{
char *c = ffeintrin_imps_[imp].control;
const char *c = ffeintrin_imps_[imp].control;
bool subr = (c[0] == '-');
char *argc;
const char *argc;
ffebld arg;
ffeinfoBasictype bt;
ffeinfoKindtype kt;
@ -1165,9 +1165,9 @@ ffeintrin_check_any_ (ffebld arglist)
static int
ffeintrin_cmp_name_ (const void *name, const void *intrinsic)
{
char *uc = (char *) ((struct _ffeintrin_name_ *) intrinsic)->name_uc;
char *lc = (char *) ((struct _ffeintrin_name_ *) intrinsic)->name_lc;
char *ic = (char *) ((struct _ffeintrin_name_ *) intrinsic)->name_ic;
const char *uc = ((struct _ffeintrin_name_ *) intrinsic)->name_uc;
const char *lc = ((struct _ffeintrin_name_ *) intrinsic)->name_lc;
const char *ic = ((struct _ffeintrin_name_ *) intrinsic)->name_ic;
return ffesrc_strcmp_2c (ffe_case_intrin (), name, uc, lc, ic);
}
@ -1429,7 +1429,7 @@ ffeintrin_fulfill_specific (ffebld *expr, ffeinfo *info,
ffeIntrinsicState state;
ffebad error;
bool any = FALSE;
char *name;
const char *name;
op = ffebld_op (*expr);
assert ((op == FFEBLD_opFUNCREF) || (op == FFEBLD_opSUBRREF));
@ -1551,9 +1551,9 @@ void
ffeintrin_init_0 ()
{
int i;
char *p1;
char *p2;
char *p3;
const char *p1;
const char *p2;
const char *p3;
int colon;
if (!ffe_is_do_internal_checks ())
@ -1597,7 +1597,7 @@ ffeintrin_init_0 ()
for (i = 0; ((size_t) i) < ARRAY_SIZE (ffeintrin_imps_); ++i)
{
char *c = ffeintrin_imps_[i].control;
const char *c = ffeintrin_imps_[i].control;
if (c[0] == '\0')
continue;
@ -1775,7 +1775,7 @@ ffeintrin_is_actualarg (ffeintrinSpec spec)
/* Determine if name is intrinsic, return info.
char *name; // C-string name of possible intrinsic.
const char *name; // C-string name of possible intrinsic.
ffelexToken t; // NULL if no diagnostic to be given.
bool explicit; // TRUE if INTRINSIC name.
ffeintrinGen gen; // (TRUE only) Generic id of intrinsic.
@ -1787,7 +1787,7 @@ ffeintrin_is_actualarg (ffeintrinSpec spec)
// kind accordingly. */
bool
ffeintrin_is_intrinsic (char *name, ffelexToken t, bool explicit,
ffeintrin_is_intrinsic (const char *name, ffelexToken t, bool explicit,
ffeintrinGen *xgen, ffeintrinSpec *xspec,
ffeintrinImp *ximp)
{
@ -1998,7 +1998,7 @@ ffeintrin_kindtype (ffeintrinSpec spec)
/* Return name of generic intrinsic. */
char *
const char *
ffeintrin_name_generic (ffeintrinGen gen)
{
assert (gen < FFEINTRIN_gen);
@ -2007,7 +2007,7 @@ ffeintrin_name_generic (ffeintrinGen gen)
/* Return name of intrinsic implementation. */
char *
const char *
ffeintrin_name_implementation (ffeintrinImp imp)
{
assert (imp < FFEINTRIN_imp);
@ -2016,7 +2016,7 @@ ffeintrin_name_implementation (ffeintrinImp imp)
/* Return external/internal name of specific intrinsic. */
char *
const char *
ffeintrin_name_specific (ffeintrinSpec spec)
{
assert (spec < FFEINTRIN_spec);

View File

@ -115,14 +115,14 @@ void ffeintrin_init_0 (void);
#define ffeintrin_init_3()
#define ffeintrin_init_4()
bool ffeintrin_is_actualarg (ffeintrinSpec spec);
bool ffeintrin_is_intrinsic (char *name, ffelexToken t, bool explicit,
bool ffeintrin_is_intrinsic (const char *name, ffelexToken t, bool explicit,
ffeintrinGen *gen, ffeintrinSpec *spec,
ffeintrinImp *imp);
bool ffeintrin_is_standard (ffeintrinGen gen, ffeintrinSpec spec);
ffeinfoKindtype ffeintrin_kindtype (ffeintrinSpec spec);
char *ffeintrin_name_generic (ffeintrinGen gen);
char *ffeintrin_name_implementation (ffeintrinImp imp);
char *ffeintrin_name_specific (ffeintrinSpec spec);
const char *ffeintrin_name_generic (ffeintrinGen gen);
const char *ffeintrin_name_implementation (ffeintrinImp imp);
const char *ffeintrin_name_specific (ffeintrinSpec spec);
ffeIntrinsicState ffeintrin_state_family (ffeintrinFamily family);
#define ffeintrin_terminate_0()
#define ffeintrin_terminate_1()

View File

@ -1751,10 +1751,10 @@ ffelex_token_new_ ()
return t;
}
static char *
static const char *
ffelex_type_string_ (ffelexType type)
{
static char *types[] = {
static const char *types[] = {
"FFELEX_typeNONE",
"FFELEX_typeCOMMENT",
"FFELEX_typeEOS",
@ -4546,7 +4546,7 @@ ffelex_token_names_from_names (ffelexToken t, ffeTokenLength start,
/* Make a new CHARACTER token. */
ffelexToken
ffelex_token_new_character (char *s, ffewhereLine l, ffewhereColumn c)
ffelex_token_new_character (const char *s, ffewhereLine l, ffewhereColumn c)
{
ffelexToken t;
@ -4581,7 +4581,7 @@ ffelex_token_new_eof ()
/* Make a new NAME token. */
ffelexToken
ffelex_token_new_name (char *s, ffewhereLine l, ffewhereColumn c)
ffelex_token_new_name (const char *s, ffewhereLine l, ffewhereColumn c)
{
ffelexToken t;
@ -4602,7 +4602,7 @@ ffelex_token_new_name (char *s, ffewhereLine l, ffewhereColumn c)
/* Make a new NAMES token. */
ffelexToken
ffelex_token_new_names (char *s, ffewhereLine l, ffewhereColumn c)
ffelex_token_new_names (const char *s, ffewhereLine l, ffewhereColumn c)
{
ffelexToken t;
@ -4631,7 +4631,7 @@ ffelex_token_new_names (char *s, ffewhereLine l, ffewhereColumn c)
in the original string. */
ffelexToken
ffelex_token_new_number (char *s, ffewhereLine l, ffewhereColumn c)
ffelex_token_new_number (const char *s, ffewhereLine l, ffewhereColumn c)
{
ffelexToken t;
ffeTokenLength len;

View File

@ -148,14 +148,14 @@ ffelexToken ffelex_token_names_from_names (ffelexToken t,
ffeTokenLength start,
ffeTokenLength len);
ffelexToken ffelex_token_new (void);
ffelexToken ffelex_token_new_character (char *s, ffewhereLine l,
ffelexToken ffelex_token_new_character (const char *s, ffewhereLine l,
ffewhereColumn c);
ffelexToken ffelex_token_new_eof (void);
ffelexToken ffelex_token_new_name (char *s, ffewhereLine l,
ffelexToken ffelex_token_new_name (const char *s, ffewhereLine l,
ffewhereColumn c);
ffelexToken ffelex_token_new_names (char *s, ffewhereLine l,
ffelexToken ffelex_token_new_names (const char *s, ffewhereLine l,
ffewhereColumn c);
ffelexToken ffelex_token_new_number (char *s, ffewhereLine l,
ffelexToken ffelex_token_new_number (const char *s, ffewhereLine l,
ffewhereColumn c);
ffelexToken ffelex_token_new_simple_ (ffelexType type, ffewhereLine l,
ffewhereColumn c);

View File

@ -70,7 +70,7 @@ struct _malloc_root_ malloc_root_
static void *malloc_reserve_ = NULL; /* For crashes. */
#if MALLOC_DEBUG
static char *malloc_types_[] =
static const char *malloc_types_[] =
{"KS", "KSR", "NF", "NFR", "US", "USR"};
#endif
@ -234,7 +234,7 @@ malloc_pool_kill (mallocPool p)
Makes a new pool with the given name and default new-chunk allocation. */
mallocPool
malloc_pool_new (char *name, mallocPool parent,
malloc_pool_new (const char *name, mallocPool parent,
unsigned long chunks UNUSED)
{
mallocPool p;
@ -384,7 +384,7 @@ malloc_new_ (mallocSize s)
add it to the list of mallocArea_s for the pool. */
void *
malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s)
malloc_new_inpool_ (mallocPool pool, mallocType_ type, const char *name, mallocSize s)
{
void *ptr;
mallocArea_ a;
@ -437,7 +437,7 @@ malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s)
you pass it a 0). */
void *
malloc_new_zinpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s,
malloc_new_zinpool_ (mallocPool pool, mallocType_ type, const char *name, mallocSize s,
int z)
{
void *ptr;

View File

@ -109,14 +109,14 @@ void malloc_init (void);
void malloc_kill_inpool_ (mallocPool pool, mallocType_ type, void *ptr,
mallocSize size);
void *malloc_new_ (mallocSize size);
void *malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name,
void *malloc_new_inpool_ (mallocPool pool, mallocType_ type, const char *name,
mallocSize size);
void *malloc_new_zinpool_ (mallocPool pool, mallocType_ type, char *name,
void *malloc_new_zinpool_ (mallocPool pool, mallocType_ type, const char *name,
mallocSize size, int z);
void malloc_pool_display (mallocPool p);
char malloc_pool_find_ (mallocPool p, mallocPool parent);
void malloc_pool_kill (mallocPool p);
mallocPool malloc_pool_new (char *name, mallocPool parent, unsigned long chunks);
mallocPool malloc_pool_new (const char *name, mallocPool parent, unsigned long chunks);
mallocPool malloc_pool_use (mallocPool p);
void *malloc_resize_ (void *ptr, mallocSize new_size);
void *malloc_resize_inpool_ (mallocPool pool, mallocType_ type, void *ptr,

View File

@ -167,7 +167,7 @@ ffename_lookup (ffenameSpace ns, ffelexToken t)
ffename_space_drive_global(ns,fn); */
void
ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ())
ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) (ffeglobal))
{
ffename n;
@ -188,7 +188,7 @@ ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ())
ffename_space_drive_symbol(ns,fn); */
void
ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) ())
ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) (ffesymbol))
{
ffename n;

View File

@ -75,8 +75,8 @@ struct _ffename_space_
ffename ffename_find (ffenameSpace ns, ffelexToken t);
void ffename_kill (ffenameSpace ns, ffename n);
ffename ffename_lookup (ffenameSpace ns, ffelexToken t);
void ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ());
void ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) ());
void ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) (ffeglobal));
void ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) (ffesymbol));
void ffename_space_kill (ffenameSpace ns);
ffenameSpace ffename_space_new (mallocPool pool);

View File

@ -117,7 +117,7 @@ static ffesymbolRetract_ *ffesymbol_retract_list_;
/* List of state names. */
static char *ffesymbol_state_name_[] =
static const char *ffesymbol_state_name_[] =
{
"?",
"@",
@ -127,7 +127,7 @@ static char *ffesymbol_state_name_[] =
/* List of attribute names. */
static char *ffesymbol_attr_name_[] =
static const char *ffesymbol_attr_name_[] =
{
#define DEFATTR(ATTR,ATTRS,NAME) NAME,
#include "symbol.def"
@ -316,7 +316,7 @@ ffesymbol_whine_state_ (ffebad bad, ffelexToken t, char c)
/* Returns a string representing the attributes set. */
char *
const char *
ffesymbol_attrs_string (ffesymbolAttrs attrs)
{
static char string[FFESYMBOL_attr * 12 + 20];
@ -773,7 +773,7 @@ ffesymbol_declare_subrunit (ffelexToken t)
ffesymbol_drive (fn); */
void
ffesymbol_drive (ffesymbol (*fn) ())
ffesymbol_drive (ffesymbol (*fn) (ffesymbol))
{
assert (ffesymbol_sfunc_ == NULL); /* Might be ok, but not for current
uses. */
@ -787,7 +787,7 @@ ffesymbol_drive (ffesymbol (*fn) ())
ffesymbol_drive_sfnames (fn); */
void
ffesymbol_drive_sfnames (ffesymbol (*fn) ())
ffesymbol_drive_sfnames (ffesymbol (*fn) (ffesymbol))
{
ffename_space_drive_symbol (ffesymbol_sfunc_, fn);
}
@ -1348,7 +1348,7 @@ ffesymbol_signal_change (ffesymbol s)
/* Returns the string based on the state. */
char *
const char *
ffesymbol_state_string (ffesymbolState state)
{
if (state >= ARRAY_SIZE (ffesymbol_state_name_))

View File

@ -158,7 +158,7 @@ struct _ffesymbol_
#define ffesymbol_arraysize(s) ((s)->array_size)
#define ffesymbol_attr(s,a) ((s)->attrs & ((ffesymbolAttrs) 1 << (a)))
#define ffesymbol_attrs(s) ((s)->attrs)
char *ffesymbol_attrs_string (ffesymbolAttrs attrs);
const char *ffesymbol_attrs_string (ffesymbolAttrs attrs);
#define ffesymbol_basictype(s) ffeinfo_basictype((s)->info)
void ffesymbol_check (ffesymbol s, ffelexToken t, bool maybe_intrin);
#define ffesymbol_common(s) ((s)->common)
@ -177,8 +177,8 @@ ffesymbol ffesymbol_declare_sfdummy (ffelexToken t);
ffesymbol ffesymbol_declare_subrunit (ffelexToken t);
#define ffesymbol_dims(s) ((s)->dims)
#define ffesymbol_dim_syms(s) ((s)->dim_syms)
void ffesymbol_drive (ffesymbol (*fn) ());
void ffesymbol_drive_sfnames (ffesymbol (*fn) ());
void ffesymbol_drive (ffesymbol (*fn) (ffesymbol));
void ffesymbol_drive_sfnames (ffesymbol (*fn) (ffesymbol));
#define ffesymbol_dummyargs(s) ((s)->dummy_args)
#if FFECOM_targetCURRENT == FFECOM_targetFFE
void ffesymbol_dump (ffesymbol s);
@ -269,7 +269,7 @@ void ffesymbol_signal_change (ffesymbol s);
#define ffesymbol_specific(s) ((s)->specific)
#define ffesymbol_state(s) ((s)->state)
#define ffesymbol_state_is_specable(s) ((s) <= FFESYMBOL_stateSEEN)
char *ffesymbol_state_string (ffesymbolState state);
const char *ffesymbol_state_string (ffesymbolState state);
#define ffesymbol_storage(s) ((s)->storage)
void ffesymbol_terminate_0 (void);
void ffesymbol_terminate_1 (void);

View File

@ -469,7 +469,7 @@ ffetarget_iszero_hollerith (ffetargetHollerith constant)
data type info and the number of elements an array (1 for a scalar). */
void
ffetarget_layout (char *error_text UNUSED, ffetargetAlign *alignment,
ffetarget_layout (const char *error_text UNUSED, ffetargetAlign *alignment,
ffetargetAlign *modulo, ffetargetOffset *size,
ffeinfoBasictype bt, ffeinfoKindtype kt,
ffetargetCharacterSize charsize,

View File

@ -732,7 +732,7 @@ void ffetarget_integer_bad_magical_precedence_binary (ffelexToken integer,
bool ffetarget_iszero_character1 (ffetargetCharacter1 constant);
#endif
bool ffetarget_iszero_hollerith (ffetargetHollerith constant);
void ffetarget_layout (char *error_text, ffetargetAlign *alignment,
void ffetarget_layout (const char *error_text, ffetargetAlign *alignment,
ffetargetAlign *modulo, ffetargetOffset *size,
ffeinfoBasictype bt, ffeinfoKindtype kt,
ffetargetCharacterSize charsize,