This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gfortran] Make functions static.


Attached patch makes some local functions in libgfortran static.

Tested on i686-linux.
Applied to tree-ssa branch.

Paul

2004-01-01  Paul Brook  <paul@codesourcery.com>

	* io/list_read.c (find_nml_node): Make static.
	(match_namelist_name): Ditto.
	* io/read.c (convert_precision_real): Make static, fix spelling.
	* io/transfer.c (extract_real): Remove unused prototype.
	(st_set_nml_var): Make static.
	* io/write.c (extract_real): Make static.
Index: libgfortran/io/list_read.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/io/Attic/list_read.c,v
retrieving revision 1.1.2.5
diff -u -p -r1.1.2.5 list_read.c
--- libgfortran/io/list_read.c	30 Oct 2003 21:57:22 -0000	1.1.2.5
+++ libgfortran/io/list_read.c	1 Jan 2004 13:39:30 -0000
@@ -1353,7 +1353,7 @@ finish_list_read (void)
   while (c != '\n');
 }
 
-namelist_info *
+static namelist_info *
 find_nml_node (char * var_name)
 {
    namelist_info * t = ionml;
@@ -1369,7 +1369,7 @@ find_nml_node (char * var_name)
   return NULL;
 }
 
-void
+static void
 match_namelist_name (char *name, int len)
 {
   int name_len;
Index: libgfortran/io/read.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/io/Attic/read.c,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 read.c
--- libgfortran/io/read.c	19 Sep 2003 19:11:12 -0000	1.1.2.4
+++ libgfortran/io/read.c	1 Jan 2004 13:39:30 -0000
@@ -120,8 +120,8 @@ convert_real (void *dest, const char *bu
   return 0;
 }
 
-int
-convert_precsion_real (void *dest, int sign,
+static int
+convert_precision_real (void *dest, int sign,
                        char *buffer, int length, int exponent)
 {
   int w, new_dp_pos, i, slen, k, dp;
@@ -766,7 +766,7 @@ done:
    * The only thing that can go wrong at this point is overflow or
    * underflow. */
 
-  convert_precsion_real (dest, val_sign, buffer, length, exponent);
+  convert_precision_real (dest, val_sign, buffer, length, exponent);
 
   if (buffer != scratch)
      free_mem (buffer);
Index: libgfortran/io/transfer.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/io/Attic/transfer.c,v
retrieving revision 1.1.2.5
diff -u -p -r1.1.2.5 transfer.c
--- libgfortran/io/transfer.c	5 Dec 2003 13:14:21 -0000	1.1.2.5
+++ libgfortran/io/transfer.c	1 Jan 2004 13:39:30 -0000
@@ -274,8 +274,6 @@ unformatted_read (bt type, void *dest, i
     }
 }
 
-extern double extract_real(void * source, int length);
-
 static void
 unformatted_write (bt type, void *source, int length)
 {
@@ -1408,7 +1406,7 @@ st_write_done (void)
 }
 
 
-void
+static void
 st_set_nml_var (void * var_addr, char * var_name, int var_name_len,
                 int kind, bt type)
 {
Index: libgfortran/io/write.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/io/Attic/write.c,v
retrieving revision 1.1.2.6
diff -u -p -r1.1.2.6 write.c
--- libgfortran/io/write.c	19 Sep 2003 19:11:12 -0000	1.1.2.6
+++ libgfortran/io/write.c	1 Jan 2004 13:39:30 -0000
@@ -96,7 +96,7 @@ extract_int (const void *p, int len)
   return i;
 }
 
-double
+static double
 extract_real (const void *p, int len)
 {
   double i = 0.0;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]