diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-12 15:11:11 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-12 15:11:11 +0000 |
commit | 59b9dcbd70f2ebbecda8f10bc0b7ffd853a13cd0 (patch) | |
tree | 72011c46efd76d2283de727ac46c303a3a63e36b /libgfortran/intrinsics/string_intrinsics.c | |
parent | a363d42390ce7000490301be147a36b38434c529 (diff) | |
download | ppe42-gcc-59b9dcbd70f2ebbecda8f10bc0b7ffd853a13cd0.tar.gz ppe42-gcc-59b9dcbd70f2ebbecda8f10bc0b7ffd853a13cd0.zip |
PR fortran/28163
* trans-expr.c (gfc_trans_string_copy): Generate inline code
to perform string copying instead of calling a library function.
* trans-decl.c (gfc_build_intrinsic_function_decls): Don't build
decl for copy_string.
* trans.h (gfor_fndecl_copy_string): Remove prototype.
* intrinsics/string_intrinsics.c (copy_string): Remove function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115372 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/intrinsics/string_intrinsics.c')
-rw-r--r-- | libgfortran/intrinsics/string_intrinsics.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/libgfortran/intrinsics/string_intrinsics.c b/libgfortran/intrinsics/string_intrinsics.c index 1bc4ff22012..fdaddef3327 100644 --- a/libgfortran/intrinsics/string_intrinsics.c +++ b/libgfortran/intrinsics/string_intrinsics.c @@ -44,9 +44,6 @@ Boston, MA 02110-1301, USA. */ /* String functions. */ -extern void copy_string (GFC_INTEGER_4, char *, GFC_INTEGER_4, const char *); -export_proto(copy_string); - extern void concat_string (GFC_INTEGER_4, char *, GFC_INTEGER_4, const char *, GFC_INTEGER_4, const char *); @@ -79,26 +76,6 @@ export_proto(string_trim); extern void string_repeat (char *, GFC_INTEGER_4, const char *, GFC_INTEGER_4); export_proto(string_repeat); -/* The two areas may overlap so we use memmove. */ - -void -copy_string (GFC_INTEGER_4 destlen, char * dest, - GFC_INTEGER_4 srclen, const char * src) -{ - if (srclen >= destlen) - { - /* This will truncate if too long. */ - memmove (dest, src, destlen); - } - else - { - memmove (dest, src, srclen); - /* Pad with spaces. */ - memset (&dest[srclen], ' ', destlen - srclen); - } -} - - /* Strings of unequal length are extended with pad characters. */ GFC_INTEGER_4 |