summaryrefslogtreecommitdiff
path: root/gnu/lib/libf2c/libU77/symlnk_.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/lib/libf2c/libU77/symlnk_.c')
-rw-r--r--gnu/lib/libf2c/libU77/symlnk_.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/gnu/lib/libf2c/libU77/symlnk_.c b/gnu/lib/libf2c/libU77/symlnk_.c
index 4b0bf24541d..92ec605a423 100644
--- a/gnu/lib/libf2c/libU77/symlnk_.c
+++ b/gnu/lib/libf2c/libU77/symlnk_.c
@@ -33,32 +33,29 @@ Boston, MA 02111-1307, USA. */
#endif
#include "f2c.h"
-#ifdef KR_headers
-void g_char ();
+void g_char (const char *a, ftnlen alen, char *b);
-integer G77_symlnk_0 (path1, path2, Lpath1, Lpath2)
- char *path1, *path2; ftnlen Lpath1, Lpath2;
-#else
-void g_char(const char *a, ftnlen alen, char *b);
-
-integer G77_symlnk_0 (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2)
-#endif
+integer
+G77_symlnk_0 (const char *path1, const char *path2, const ftnlen Lpath1,
+ const ftnlen Lpath2)
{
#if HAVE_SYMLINK
char *buff1, *buff2;
- char *bp, *blast;
int i;
- buff1 = (char *) malloc (Lpath1+1);
- if (buff1 == NULL) return -1;
+ buff1 = (char *) malloc (Lpath1 + 1);
+ if (buff1 == NULL)
+ return -1;
g_char (path1, Lpath1, buff1);
- buff2 = (char *) malloc (Lpath2+1);
- if (buff2 == NULL) return -1;
+ buff2 = (char *) malloc (Lpath2 + 1);
+ if (buff2 == NULL)
+ return -1;
g_char (path2, Lpath2, buff2);
i = symlink (buff1, buff2);
- free (buff1); free (buff2);
+ free (buff1);
+ free (buff2);
return i ? errno : 0;
-#else /* !HAVE_SYMLINK */
+#else /* !HAVE_SYMLINK */
return errno = ENOSYS;
-#endif /* !HAVE_SYMLINK */
+#endif /* !HAVE_SYMLINK */
}