summaryrefslogtreecommitdiff
path: root/gcc/prefix.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/prefix.c')
-rw-r--r--gcc/prefix.c37
1 files changed, 13 insertions, 24 deletions
diff --git a/gcc/prefix.c b/gcc/prefix.c
index a7b97401269..ef9d9b8da92 100644
--- a/gcc/prefix.c
+++ b/gcc/prefix.c
@@ -1,5 +1,5 @@
/* Utility to update paths from internal to external forms.
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GCC.
@@ -76,21 +76,20 @@ Boston, MA 02111-1307, USA. */
static const char *std_prefix = PREFIX;
-static const char *get_key_value PARAMS ((char *));
-static char *translate_name PARAMS ((char *));
-static char *save_string PARAMS ((const char *, int));
-static void tr PARAMS ((char *, int, int));
+static const char *get_key_value (char *);
+static char *translate_name (char *);
+static char *save_string (const char *, int);
+static void tr (char *, int, int);
#if defined(_WIN32) && defined(ENABLE_WIN32_REGISTRY)
-static char *lookup_key PARAMS ((char *));
+static char *lookup_key (char *);
static HKEY reg_key = (HKEY) INVALID_HANDLE_VALUE;
#endif
/* Given KEY, as above, return its value. */
static const char *
-get_key_value (key)
- char *key;
+get_key_value (char *key)
{
const char *prefix = 0;
char *temp = 0;
@@ -114,9 +113,7 @@ get_key_value (key)
/* Return a copy of a string that has been placed in the heap. */
static char *
-save_string (s, len)
- const char *s;
- int len;
+save_string (const char *s, int len)
{
char *result = xmalloc (len + 1);
@@ -130,8 +127,7 @@ save_string (s, len)
/* Look up "key" in the registry, as above. */
static char *
-lookup_key (key)
- char *key;
+lookup_key (char *key)
{
char *dst;
DWORD size;
@@ -183,8 +179,7 @@ lookup_key (key)
Otherwise, return the given name. */
static char *
-translate_name (name)
- char *name;
+translate_name (char *name)
{
char code;
char *key, *old_name;
@@ -233,9 +228,7 @@ translate_name (name)
/* In a NUL-terminated STRING, replace character C1 with C2 in-place. */
static void
-tr (string, c1, c2)
- char *string;
- int c1, c2;
+tr (char *string, int c1, int c2)
{
do
{
@@ -250,9 +243,7 @@ tr (string, c1, c2)
freeing it. */
char *
-update_path (path, key)
- const char *path;
- const char *key;
+update_path (const char *path, const char *key)
{
char *result, *p;
@@ -352,9 +343,7 @@ update_path (path, key)
/* Reset the standard prefix. */
void
-set_std_prefix (prefix, len)
- const char *prefix;
- int len;
+set_std_prefix (const char *prefix, int len)
{
std_prefix = save_string (prefix, len);
}