Commit d7177ab2 by Tobias Schlüter Committed by Tobias Schlüter

trans-decl.c, [...]: Replace all occurences of 'gfc_strlen_type_node' by 'gfc_charlen_type_node'.

fortran/
* trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
all occurences of 'gfc_strlen_type_node' by
'gfc_charlen_type_node'.
* trans-types.h: Same. Also update comment accordingly.

libgfortran/
* libgfortran.h: Replace 'gfc_strlen_type' by
'gfc_charlen_type'. Update comment accordingly.
* intrinsics/args.c, intrinsics/env.c, io/io.h, io/transfer.c:
Replace all occurences of 'gfc_strlen_type' by 'gfc_charlen_type'.

From-SVN: r86828
parent f36327db
2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
all occurences of 'gfc_strlen_type_node' by
'gfc_charlen_type_node'.
* trans-types.h: Same. Also update comment accordingly.
2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* primary.c: Update copyright boilerplate to say GCC. * primary.c: Update copyright boilerplate to say GCC.
* f95-lang.c: Change initial comment to say gfortran. * f95-lang.c: Change initial comment to say gfortran.
......
...@@ -1072,7 +1072,7 @@ get_array_ctor_strlen (gfc_constructor * c, tree * len) ...@@ -1072,7 +1072,7 @@ get_array_ctor_strlen (gfc_constructor * c, tree * len)
{ {
case EXPR_CONSTANT: case EXPR_CONSTANT:
if (!(*len && INTEGER_CST_P (*len))) if (!(*len && INTEGER_CST_P (*len)))
*len = build_int_cstu (gfc_strlen_type_node, *len = build_int_cstu (gfc_charlen_type_node,
c->expr->value.character.length); c->expr->value.character.length);
break; break;
......
...@@ -85,7 +85,7 @@ gfc_build_string_const (int length, const char *s) ...@@ -85,7 +85,7 @@ gfc_build_string_const (int length, const char *s)
len = build_int_cst (NULL_TREE, length); len = build_int_cst (NULL_TREE, length);
TREE_TYPE (str) = TREE_TYPE (str) =
build_array_type (gfc_character1_type_node, build_array_type (gfc_character1_type_node,
build_range_type (gfc_strlen_type_node, build_range_type (gfc_charlen_type_node,
integer_one_node, len)); integer_one_node, len));
return str; return str;
} }
......
...@@ -670,7 +670,7 @@ gfc_create_string_length (gfc_symbol * sym) ...@@ -670,7 +670,7 @@ gfc_create_string_length (gfc_symbol * sym)
strcpy (&name[1], sym->name); strcpy (&name[1], sym->name);
name[0] = '.'; name[0] = '.';
length = build_decl (VAR_DECL, get_identifier (name), length = build_decl (VAR_DECL, get_identifier (name),
gfc_strlen_type_node); gfc_charlen_type_node);
DECL_ARTIFICIAL (length) = 1; DECL_ARTIFICIAL (length) = 1;
TREE_USED (length) = 1; TREE_USED (length) = 1;
gfc_defer_symbol_init (sym); gfc_defer_symbol_init (sym);
...@@ -781,7 +781,7 @@ gfc_get_symbol_decl (gfc_symbol * sym) ...@@ -781,7 +781,7 @@ gfc_get_symbol_decl (gfc_symbol * sym)
{ {
gfc_allocate_lang_decl (decl); gfc_allocate_lang_decl (decl);
GFC_DECL_ASSIGN (decl) = 1; GFC_DECL_ASSIGN (decl) = 1;
length = gfc_create_var (gfc_strlen_type_node, sym->name); length = gfc_create_var (gfc_charlen_type_node, sym->name);
GFC_DECL_STRING_LEN (decl) = length; GFC_DECL_STRING_LEN (decl) = length;
GFC_DECL_ASSIGN_ADDR (decl) = gfc_create_var (pvoid_type_node, sym->name); GFC_DECL_ASSIGN_ADDR (decl) = gfc_create_var (pvoid_type_node, sym->name);
/* TODO: Need to check we don't change TREE_STATIC (decl) later. */ /* TODO: Need to check we don't change TREE_STATIC (decl) later. */
...@@ -1130,7 +1130,7 @@ create_function_arglist (gfc_symbol * sym) ...@@ -1130,7 +1130,7 @@ create_function_arglist (gfc_symbol * sym)
/* Length of character result. */ /* Length of character result. */
type = TREE_VALUE (typelist); type = TREE_VALUE (typelist);
assert (type == gfc_strlen_type_node); assert (type == gfc_charlen_type_node);
length = build_decl (PARM_DECL, length = build_decl (PARM_DECL,
get_identifier (".__result"), get_identifier (".__result"),
...@@ -1192,7 +1192,7 @@ create_function_arglist (gfc_symbol * sym) ...@@ -1192,7 +1192,7 @@ create_function_arglist (gfc_symbol * sym)
parm = f->sym->backend_decl; parm = f->sym->backend_decl;
type = TREE_VALUE (typelist); type = TREE_VALUE (typelist);
assert (type == gfc_strlen_type_node); assert (type == gfc_charlen_type_node);
strcpy (&name[1], f->sym->name); strcpy (&name[1], f->sym->name);
name[0] = '_'; name[0] = '_';
...@@ -1383,7 +1383,7 @@ build_entry_thunks (gfc_namespace * ns) ...@@ -1383,7 +1383,7 @@ build_entry_thunks (gfc_namespace * ns)
args = tree_cons (NULL_TREE, null_pointer_node, args); args = tree_cons (NULL_TREE, null_pointer_node, args);
if (formal->sym->ts.type == BT_CHARACTER) if (formal->sym->ts.type == BT_CHARACTER)
{ {
tmp = convert (gfc_strlen_type_node, integer_zero_node); tmp = convert (gfc_charlen_type_node, integer_zero_node);
string_args = tree_cons (NULL_TREE, tmp, string_args); string_args = tree_cons (NULL_TREE, tmp, string_args);
} }
} }
...@@ -1572,58 +1572,58 @@ gfc_build_intrinsic_function_decls (void) ...@@ -1572,58 +1572,58 @@ gfc_build_intrinsic_function_decls (void)
gfc_build_library_function_decl (get_identifier (PREFIX("copy_string")), gfc_build_library_function_decl (get_identifier (PREFIX("copy_string")),
void_type_node, void_type_node,
4, 4,
gfc_strlen_type_node, pchar_type_node, gfc_charlen_type_node, pchar_type_node,
gfc_strlen_type_node, pchar_type_node); gfc_charlen_type_node, pchar_type_node);
gfor_fndecl_compare_string = gfor_fndecl_compare_string =
gfc_build_library_function_decl (get_identifier (PREFIX("compare_string")), gfc_build_library_function_decl (get_identifier (PREFIX("compare_string")),
gfc_int4_type_node, gfc_int4_type_node,
4, 4,
gfc_strlen_type_node, pchar_type_node, gfc_charlen_type_node, pchar_type_node,
gfc_strlen_type_node, pchar_type_node); gfc_charlen_type_node, pchar_type_node);
gfor_fndecl_concat_string = gfor_fndecl_concat_string =
gfc_build_library_function_decl (get_identifier (PREFIX("concat_string")), gfc_build_library_function_decl (get_identifier (PREFIX("concat_string")),
void_type_node, void_type_node,
6, 6,
gfc_strlen_type_node, pchar_type_node, gfc_charlen_type_node, pchar_type_node,
gfc_strlen_type_node, pchar_type_node, gfc_charlen_type_node, pchar_type_node,
gfc_strlen_type_node, pchar_type_node); gfc_charlen_type_node, pchar_type_node);
gfor_fndecl_string_len_trim = gfor_fndecl_string_len_trim =
gfc_build_library_function_decl (get_identifier (PREFIX("string_len_trim")), gfc_build_library_function_decl (get_identifier (PREFIX("string_len_trim")),
gfc_int4_type_node, gfc_int4_type_node,
2, gfc_strlen_type_node, 2, gfc_charlen_type_node,
pchar_type_node); pchar_type_node);
gfor_fndecl_string_index = gfor_fndecl_string_index =
gfc_build_library_function_decl (get_identifier (PREFIX("string_index")), gfc_build_library_function_decl (get_identifier (PREFIX("string_index")),
gfc_int4_type_node, gfc_int4_type_node,
5, gfc_strlen_type_node, pchar_type_node, 5, gfc_charlen_type_node, pchar_type_node,
gfc_strlen_type_node, pchar_type_node, gfc_charlen_type_node, pchar_type_node,
gfc_logical4_type_node); gfc_logical4_type_node);
gfor_fndecl_string_scan = gfor_fndecl_string_scan =
gfc_build_library_function_decl (get_identifier (PREFIX("string_scan")), gfc_build_library_function_decl (get_identifier (PREFIX("string_scan")),
gfc_int4_type_node, gfc_int4_type_node,
5, gfc_strlen_type_node, pchar_type_node, 5, gfc_charlen_type_node, pchar_type_node,
gfc_strlen_type_node, pchar_type_node, gfc_charlen_type_node, pchar_type_node,
gfc_logical4_type_node); gfc_logical4_type_node);
gfor_fndecl_string_verify = gfor_fndecl_string_verify =
gfc_build_library_function_decl (get_identifier (PREFIX("string_verify")), gfc_build_library_function_decl (get_identifier (PREFIX("string_verify")),
gfc_int4_type_node, gfc_int4_type_node,
5, gfc_strlen_type_node, pchar_type_node, 5, gfc_charlen_type_node, pchar_type_node,
gfc_strlen_type_node, pchar_type_node, gfc_charlen_type_node, pchar_type_node,
gfc_logical4_type_node); gfc_logical4_type_node);
gfor_fndecl_string_trim = gfor_fndecl_string_trim =
gfc_build_library_function_decl (get_identifier (PREFIX("string_trim")), gfc_build_library_function_decl (get_identifier (PREFIX("string_trim")),
void_type_node, void_type_node,
4, 4,
build_pointer_type (gfc_strlen_type_node), build_pointer_type (gfc_charlen_type_node),
ppvoid_type_node, ppvoid_type_node,
gfc_strlen_type_node, gfc_charlen_type_node,
pchar_type_node); pchar_type_node);
gfor_fndecl_string_repeat = gfor_fndecl_string_repeat =
...@@ -1631,7 +1631,7 @@ gfc_build_intrinsic_function_decls (void) ...@@ -1631,7 +1631,7 @@ gfc_build_intrinsic_function_decls (void)
void_type_node, void_type_node,
4, 4,
pchar_type_node, pchar_type_node,
gfc_strlen_type_node, gfc_charlen_type_node,
pchar_type_node, pchar_type_node,
gfc_int4_type_node); gfc_int4_type_node);
...@@ -1640,14 +1640,14 @@ gfc_build_intrinsic_function_decls (void) ...@@ -1640,14 +1640,14 @@ gfc_build_intrinsic_function_decls (void)
void_type_node, void_type_node,
3, 3,
pchar_type_node, pchar_type_node,
gfc_strlen_type_node, pchar_type_node); gfc_charlen_type_node, pchar_type_node);
gfor_fndecl_adjustr = gfor_fndecl_adjustr =
gfc_build_library_function_decl (get_identifier (PREFIX("adjustr")), gfc_build_library_function_decl (get_identifier (PREFIX("adjustr")),
void_type_node, void_type_node,
3, 3,
pchar_type_node, pchar_type_node,
gfc_strlen_type_node, pchar_type_node); gfc_charlen_type_node, pchar_type_node);
gfor_fndecl_si_kind = gfor_fndecl_si_kind =
gfc_build_library_function_decl (get_identifier ("selected_int_kind"), gfc_build_library_function_decl (get_identifier ("selected_int_kind"),
......
...@@ -151,7 +151,7 @@ gfc_trans_init_string_length (gfc_charlen * cl, stmtblock_t * pblock) ...@@ -151,7 +151,7 @@ gfc_trans_init_string_length (gfc_charlen * cl, stmtblock_t * pblock)
tree tmp; tree tmp;
gfc_init_se (&se, NULL); gfc_init_se (&se, NULL);
gfc_conv_expr_type (&se, cl->length, gfc_strlen_type_node); gfc_conv_expr_type (&se, cl->length, gfc_charlen_type_node);
gfc_add_block_to_block (pblock, &se.pre); gfc_add_block_to_block (pblock, &se.pre);
tmp = cl->backend_decl; tmp = cl->backend_decl;
...@@ -173,7 +173,7 @@ gfc_conv_substring (gfc_se * se, gfc_ref * ref, int kind) ...@@ -173,7 +173,7 @@ gfc_conv_substring (gfc_se * se, gfc_ref * ref, int kind)
var = NULL_TREE; var = NULL_TREE;
gfc_init_se (&start, se); gfc_init_se (&start, se);
gfc_conv_expr_type (&start, ref->u.ss.start, gfc_strlen_type_node); gfc_conv_expr_type (&start, ref->u.ss.start, gfc_charlen_type_node);
gfc_add_block_to_block (&se->pre, &start.pre); gfc_add_block_to_block (&se->pre, &start.pre);
if (integer_onep (start.expr)) if (integer_onep (start.expr))
...@@ -195,14 +195,14 @@ gfc_conv_substring (gfc_se * se, gfc_ref * ref, int kind) ...@@ -195,14 +195,14 @@ gfc_conv_substring (gfc_se * se, gfc_ref * ref, int kind)
end.expr = se->string_length; end.expr = se->string_length;
else else
{ {
gfc_conv_expr_type (&end, ref->u.ss.end, gfc_strlen_type_node); gfc_conv_expr_type (&end, ref->u.ss.end, gfc_charlen_type_node);
gfc_add_block_to_block (&se->pre, &end.pre); gfc_add_block_to_block (&se->pre, &end.pre);
} }
tmp = tmp =
build2 (MINUS_EXPR, gfc_strlen_type_node, build2 (MINUS_EXPR, gfc_charlen_type_node,
fold_convert (gfc_strlen_type_node, integer_one_node), fold_convert (gfc_charlen_type_node, integer_one_node),
start.expr); start.expr);
tmp = build2 (PLUS_EXPR, gfc_strlen_type_node, end.expr, tmp); tmp = build2 (PLUS_EXPR, gfc_charlen_type_node, end.expr, tmp);
se->string_length = fold (tmp); se->string_length = fold (tmp);
} }
...@@ -688,14 +688,14 @@ gfc_conv_string_tmp (gfc_se * se, tree type, tree len) ...@@ -688,14 +688,14 @@ gfc_conv_string_tmp (gfc_se * se, tree type, tree len)
tree tmp; tree tmp;
tree args; tree args;
if (TREE_TYPE (len) != gfc_strlen_type_node) if (TREE_TYPE (len) != gfc_charlen_type_node)
abort (); abort ();
if (gfc_can_put_var_on_stack (len)) if (gfc_can_put_var_on_stack (len))
{ {
/* Create a temporary variable to hold the result. */ /* Create a temporary variable to hold the result. */
tmp = fold (build2 (MINUS_EXPR, gfc_strlen_type_node, len, tmp = fold (build2 (MINUS_EXPR, gfc_charlen_type_node, len,
convert (gfc_strlen_type_node, convert (gfc_charlen_type_node,
integer_one_node))); integer_one_node)));
tmp = build_range_type (gfc_array_index_type, gfc_index_zero_node, tmp); tmp = build_range_type (gfc_array_index_type, gfc_index_zero_node, tmp);
tmp = build_array_type (gfc_character1_type_node, tmp); tmp = build_array_type (gfc_character1_type_node, tmp);
...@@ -1067,8 +1067,8 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, ...@@ -1067,8 +1067,8 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
var = gfc_conv_string_tmp (se, type, len); var = gfc_conv_string_tmp (se, type, len);
arglist = gfc_chainon_list (arglist, var); arglist = gfc_chainon_list (arglist, var);
arglist = gfc_chainon_list (arglist, convert (gfc_strlen_type_node, arglist = gfc_chainon_list (arglist,
len)); convert (gfc_charlen_type_node, len));
} }
else /* TODO: derived type function return values. */ else /* TODO: derived type function return values. */
abort (); abort ();
...@@ -1101,7 +1101,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, ...@@ -1101,7 +1101,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
{ {
stringargs = stringargs =
gfc_chainon_list (stringargs, gfc_chainon_list (stringargs,
convert (gfc_strlen_type_node, convert (gfc_charlen_type_node,
integer_zero_node)); integer_zero_node));
} }
} }
......
...@@ -333,7 +333,7 @@ gfc_build_io_library_fndecls (void) ...@@ -333,7 +333,7 @@ gfc_build_io_library_fndecls (void)
void_type_node, 5, void_type_node, 5,
pvoid_type_node, pvoid_type_node, pvoid_type_node, pvoid_type_node,
gfc_int4_type_node, gfc_int4_type_node, gfc_int4_type_node, gfc_int4_type_node,
gfc_strlen_type_node); gfc_charlen_type_node);
iocall_set_nml_val_complex = iocall_set_nml_val_complex =
gfc_build_library_function_decl (get_identifier (PREFIX("st_set_nml_var_complex")), gfc_build_library_function_decl (get_identifier (PREFIX("st_set_nml_var_complex")),
void_type_node, 4, void_type_node, 4,
......
...@@ -55,7 +55,7 @@ tree pvoid_type_node; ...@@ -55,7 +55,7 @@ tree pvoid_type_node;
tree ppvoid_type_node; tree ppvoid_type_node;
tree pchar_type_node; tree pchar_type_node;
tree gfc_character1_type_node; tree gfc_character1_type_node;
tree gfc_strlen_type_node; tree gfc_charlen_type_node;
static GTY(()) tree gfc_desc_dim_type; static GTY(()) tree gfc_desc_dim_type;
static GTY(()) tree gfc_max_array_element_size; static GTY(()) tree gfc_max_array_element_size;
...@@ -541,7 +541,7 @@ gfc_init_types (void) ...@@ -541,7 +541,7 @@ gfc_init_types (void)
boolean_false_node = build_int_cst (boolean_type_node, 0); boolean_false_node = build_int_cst (boolean_type_node, 0);
/* ??? Shouldn't this be based on gfc_index_integer_kind or so? */ /* ??? Shouldn't this be based on gfc_index_integer_kind or so? */
gfc_strlen_type_node = gfc_get_int_type (4); gfc_charlen_type_node = gfc_get_int_type (4);
} }
/* Get the type node for the given type and kind. */ /* Get the type node for the given type and kind. */
...@@ -1502,7 +1502,7 @@ gfc_get_function_type (gfc_symbol * sym) ...@@ -1502,7 +1502,7 @@ gfc_get_function_type (gfc_symbol * sym)
typelist = gfc_chainon_list (typelist, type); typelist = gfc_chainon_list (typelist, type);
if (arg->ts.type == BT_CHARACTER) if (arg->ts.type == BT_CHARACTER)
typelist = gfc_chainon_list (typelist, gfc_strlen_type_node); typelist = gfc_chainon_list (typelist, gfc_charlen_type_node);
} }
/* Build the argument types for the function. */ /* Build the argument types for the function. */
...@@ -1551,7 +1551,7 @@ gfc_get_function_type (gfc_symbol * sym) ...@@ -1551,7 +1551,7 @@ gfc_get_function_type (gfc_symbol * sym)
/* Add hidden string length parameters. */ /* Add hidden string length parameters. */
while (nstr--) while (nstr--)
typelist = gfc_chainon_list (typelist, gfc_strlen_type_node); typelist = gfc_chainon_list (typelist, gfc_charlen_type_node);
typelist = gfc_chainon_list (typelist, void_type_node); typelist = gfc_chainon_list (typelist, void_type_node);
......
...@@ -45,12 +45,11 @@ extern GTY(()) tree gfc_character1_type_node; ...@@ -45,12 +45,11 @@ extern GTY(()) tree gfc_character1_type_node;
extern GTY(()) tree ppvoid_type_node; extern GTY(()) tree ppvoid_type_node;
extern GTY(()) tree pvoid_type_node; extern GTY(()) tree pvoid_type_node;
extern GTY(()) tree pchar_type_node; extern GTY(()) tree pchar_type_node;
/* This is the type used to hold string lengths. It has nothing to do with /* This is the type used to hold the lengths of character variables.
the C strlen(3) function. It must be the same as the corresponding It must be the same as the corresponding definition in gfortran.h. */
definition in gfortran.h. */
/* TODO: This is still hardcoded as kind=4 in some bits of the compiler /* TODO: This is still hardcoded as kind=4 in some bits of the compiler
and runtime library. */ and runtime library. */
extern GTY(()) tree gfc_strlen_type_node; extern GTY(()) tree gfc_charlen_type_node;
/* be-function.c */ /* be-function.c */
void gfc_convert_function_code (gfc_namespace *); void gfc_convert_function_code (gfc_namespace *);
......
2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* libgfortran.h: Replace 'gfc_strlen_type' by
'gfc_charlen_type'. Update comment accordingly.
* intrinsics/args.c, intrinsics/env.c, io/io.h, io/transfer.c:
Replace all occurences of 'gfc_strlen_type' by 'gfc_charlen_type'.
2004-08-31 Paul Brook <paul@codesourcery.com> 2004-08-31 Paul Brook <paul@codesourcery.com>
* libgfortran.h: Add comments. * libgfortran.h: Add comments.
......
...@@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA. */
/* Get a commandline argument. */ /* Get a commandline argument. */
void void
prefix(getarg_i4) (GFC_INTEGER_4 *pos, char *val, gfc_strlen_type val_len) prefix(getarg_i4) (GFC_INTEGER_4 *pos, char *val, gfc_charlen_type val_len)
{ {
int argc; int argc;
int arglen; int arglen;
...@@ -55,7 +55,7 @@ prefix(getarg_i4) (GFC_INTEGER_4 *pos, char *val, gfc_strlen_type val_len) ...@@ -55,7 +55,7 @@ prefix(getarg_i4) (GFC_INTEGER_4 *pos, char *val, gfc_strlen_type val_len)
/* INTEGER*8 wrapper of getarg. */ /* INTEGER*8 wrapper of getarg. */
void void
prefix(getarg_i8) (GFC_INTEGER_8 *pos, char *val, gfc_strlen_type val_len) prefix(getarg_i8) (GFC_INTEGER_8 *pos, char *val, gfc_charlen_type val_len)
{ {
GFC_INTEGER_4 pos4; GFC_INTEGER_4 pos4;
...@@ -103,7 +103,7 @@ prefix(get_command_argument_i4) (GFC_INTEGER_4 *number, ...@@ -103,7 +103,7 @@ prefix(get_command_argument_i4) (GFC_INTEGER_4 *number,
char *value, char *value,
GFC_INTEGER_4 *length, GFC_INTEGER_4 *length,
GFC_INTEGER_4 *status, GFC_INTEGER_4 *status,
gfc_strlen_type value_len) gfc_charlen_type value_len)
{ {
int argc, arglen = 0, stat_flag = GFC_GC_SUCCESS; int argc, arglen = 0, stat_flag = GFC_GC_SUCCESS;
char **argv; char **argv;
...@@ -155,7 +155,7 @@ prefix(get_command_argument_i8) (GFC_INTEGER_8 *number, ...@@ -155,7 +155,7 @@ prefix(get_command_argument_i8) (GFC_INTEGER_8 *number,
char *value, char *value,
GFC_INTEGER_8 *length, GFC_INTEGER_8 *length,
GFC_INTEGER_8 *status, GFC_INTEGER_8 *status,
gfc_strlen_type value_len) gfc_charlen_type value_len)
{ {
GFC_INTEGER_4 number4; GFC_INTEGER_4 number4;
GFC_INTEGER_4 length4; GFC_INTEGER_4 length4;
...@@ -177,7 +177,7 @@ void ...@@ -177,7 +177,7 @@ void
prefix(get_command_i4) (char *command, prefix(get_command_i4) (char *command,
GFC_INTEGER_4 *length, GFC_INTEGER_4 *length,
GFC_INTEGER_4 *status, GFC_INTEGER_4 *status,
gfc_strlen_type command_len) gfc_charlen_type command_len)
{ {
int i, argc, arglen, thisarg; int i, argc, arglen, thisarg;
int stat_flag = GFC_GC_SUCCESS; int stat_flag = GFC_GC_SUCCESS;
...@@ -237,7 +237,7 @@ void ...@@ -237,7 +237,7 @@ void
prefix(get_command_i8) (char *command, prefix(get_command_i8) (char *command,
GFC_INTEGER_8 *length, GFC_INTEGER_8 *length,
GFC_INTEGER_8 *status, GFC_INTEGER_8 *status,
gfc_strlen_type command_len) gfc_charlen_type command_len)
{ {
GFC_INTEGER_4 length4; GFC_INTEGER_4 length4;
GFC_INTEGER_4 status4; GFC_INTEGER_4 status4;
......
...@@ -34,8 +34,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -34,8 +34,8 @@ Boston, MA 02111-1307, USA. */
void void
prefix(getenv) (char * name, prefix(getenv) (char * name,
char * value, char * value,
gfc_strlen_type name_len, gfc_charlen_type name_len,
gfc_strlen_type value_len) gfc_charlen_type value_len)
{ {
/* Make a null-terminated copy of the name string so that c library /* Make a null-terminated copy of the name string so that c library
...@@ -99,8 +99,8 @@ prefix(get_environment_variable_i4) ...@@ -99,8 +99,8 @@ prefix(get_environment_variable_i4)
GFC_INTEGER_4 *length, GFC_INTEGER_4 *length,
GFC_INTEGER_4 *status, GFC_INTEGER_4 *status,
GFC_LOGICAL_4 *trim_name, GFC_LOGICAL_4 *trim_name,
gfc_strlen_type name_len, gfc_charlen_type name_len,
gfc_strlen_type value_len) gfc_charlen_type value_len)
{ {
int stat = GFC_SUCCESS, res_len = 0; int stat = GFC_SUCCESS, res_len = 0;
char name_nt[name_len+1], *res; char name_nt[name_len+1], *res;
...@@ -164,8 +164,8 @@ prefix(get_environment_variable_i8) ...@@ -164,8 +164,8 @@ prefix(get_environment_variable_i8)
GFC_INTEGER_8 *length, GFC_INTEGER_8 *length,
GFC_INTEGER_8 *status, GFC_INTEGER_8 *status,
GFC_LOGICAL_8 *trim_name, GFC_LOGICAL_8 *trim_name,
gfc_strlen_type name_len, gfc_charlen_type name_len,
gfc_strlen_type value_len) gfc_charlen_type value_len)
{ {
GFC_INTEGER_4 length4, status4; GFC_INTEGER_4 length4, status4;
GFC_LOGICAL_4 trim_name4; GFC_LOGICAL_4 trim_name4;
......
...@@ -549,7 +549,7 @@ void st_set_nml_var_int (void * , char * , int , int ); ...@@ -549,7 +549,7 @@ void st_set_nml_var_int (void * , char * , int , int );
void st_set_nml_var_float (void * , char * , int , int ); void st_set_nml_var_float (void * , char * , int , int );
#define st_set_nml_var_char prefix(st_set_nml_var_char) #define st_set_nml_var_char prefix(st_set_nml_var_char)
void st_set_nml_var_char (void * , char * , int , int, gfc_strlen_type); void st_set_nml_var_char (void * , char * , int , int, gfc_charlen_type);
#define st_set_nml_var_complex prefix(st_set_nml_var_complex) #define st_set_nml_var_complex prefix(st_set_nml_var_complex)
void st_set_nml_var_complex (void * , char * , int , int ); void st_set_nml_var_complex (void * , char * , int , int );
......
...@@ -1578,7 +1578,7 @@ st_set_nml_var_float (void * var_addr, char * var_name, int var_name_len, ...@@ -1578,7 +1578,7 @@ st_set_nml_var_float (void * var_addr, char * var_name, int var_name_len,
void void
st_set_nml_var_char (void * var_addr, char * var_name, int var_name_len, st_set_nml_var_char (void * var_addr, char * var_name, int var_name_len,
int kind, gfc_strlen_type string_length) int kind, gfc_charlen_type string_length)
{ {
st_set_nml_var (var_addr, var_name, var_name_len, kind, BT_CHARACTER, st_set_nml_var (var_addr, var_name, var_name_len, kind, BT_CHARACTER,
......
...@@ -91,8 +91,8 @@ typedef complex double GFC_COMPLEX_8; ...@@ -91,8 +91,8 @@ typedef complex double GFC_COMPLEX_8;
by the compiler. */ by the compiler. */
/* The type used of array indices, amongst other things. */ /* The type used of array indices, amongst other things. */
typedef size_t index_type; typedef size_t index_type;
/* The type used for string lengths. Nothing to do with strlen(3). */ /* The type used for the lengths of character variables. */
typedef GFC_INTEGER_4 gfc_strlen_type; typedef GFC_INTEGER_4 gfc_charlen_type;
/* This will be 0 on little-endian machines and one on big-endian machines. */ /* This will be 0 on little-endian machines and one on big-endian machines. */
#define l8_to_l4_offset prefix(l8_to_l4_offset) #define l8_to_l4_offset prefix(l8_to_l4_offset)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment