summaryrefslogtreecommitdiffstats
path: root/contrib/ncurses/ncurses/tinfo/write_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/ncurses/tinfo/write_entry.c')
-rw-r--r--contrib/ncurses/ncurses/tinfo/write_entry.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/contrib/ncurses/ncurses/tinfo/write_entry.c b/contrib/ncurses/ncurses/tinfo/write_entry.c
index ffcf402..9750dff 100644
--- a/contrib/ncurses/ncurses/tinfo/write_entry.c
+++ b/contrib/ncurses/ncurses/tinfo/write_entry.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -52,7 +52,7 @@
#define TRACE_OUT(p) /*nothing */
#endif
-MODULE_ID("$Id: write_entry.c,v 1.56 2000/12/10 02:55:08 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.58 2002/04/21 20:35:08 tom Exp $")
static int total_written;
@@ -214,6 +214,10 @@ _nc_write_entry(TERMTYPE * const tp)
char linkname[PATH_MAX];
#if USE_SYMLINKS
char symlinkname[PATH_MAX];
+#if !HAVE_LINK
+#undef HAVE_LINK
+#define HAVE_LINK 1
+#endif
#endif /* USE_SYMLINKS */
static int call_count;
static time_t start_time; /* time at start of writes */
@@ -361,10 +365,10 @@ _nc_write_entry(TERMTYPE * const tp)
#define WRITE_STRING(str) (fwrite(str, sizeof(char), strlen(str) + 1, fp) == strlen(str) + 1)
static int
-compute_offsets(char **Strings, int strmax, short *offsets)
+compute_offsets(char **Strings, unsigned strmax, short *offsets)
{
size_t nextfree = 0;
- int i;
+ unsigned i;
for (i = 0; i < strmax; i++) {
if (Strings[i] == ABSENT_STRING) {
@@ -381,9 +385,9 @@ compute_offsets(char **Strings, int strmax, short *offsets)
}
static void
-convert_shorts(unsigned char *buf, short *Numbers, int count)
+convert_shorts(unsigned char *buf, short *Numbers, unsigned count)
{
- int i;
+ unsigned i;
for (i = 0; i < count; i++) {
if (Numbers[i] == ABSENT_NUMERIC) { /* HI/LO won't work */
buf[2 * i] = buf[2 * i + 1] = 0377;
OpenPOWER on IntegriCloud