Compare commits

...

4 Commits

Author SHA1 Message Date
Bram Moolenaar
33c4fb68bf updated for version 7.0-205 2007-02-27 22:03:05 +00:00
Bram Moolenaar
f2a4e33ffb updated for version 7.0-204 2007-02-27 17:08:16 +00:00
Bram Moolenaar
7f6ca07606 updated for version 7.0-203 2007-02-27 16:21:38 +00:00
Bram Moolenaar
311d982b6f updated for version 7.0-202 2007-02-27 15:48:28 +00:00
13 changed files with 87 additions and 29 deletions

View File

@@ -201,6 +201,7 @@
#SunOS 4.1.x +X11 -GUI 5.1b (J) Bram Moolenaar
#SunOS 4.1.3_U1 (sun4c) gcc +X11 +GUI Athena 5.0w (J) Darren Hiebert
#SUPER-UX 6.2 (NEC SX-4) cc +X11R6 Motif,Athena4.6b (P) Lennart Schultz
#Tandem/NSK (c) Matthew Woehlke
#Unisys 6035 cc +X11 Motif 5.3 (8) Glauber Ribeiro
#ESIX V4.2 cc +X11 6.0 (a) Reinhard Wobst
#Mac OS X 10.[23] gcc Carbon 6.2 (x) Bram Moolenaar
@@ -251,6 +252,7 @@
# (a) See line with EXTRA_LIBS below.
# (b) When using gcc with the Solaris linker, make sure you don't use GNU
# strip, otherwise the binary may not run: "Cannot find ELF".
# (c) Add -lfloss to EXTRA_LIBS, see below.
# (x) When you get warnings for precompiled header files, run
# "sudo fixPrecomps". Also see CONF_OPT_DARWIN below.
# }}}
@@ -794,6 +796,9 @@ LINT_OPTIONS = -beprxzF
### (a) ESIX V4.2 (Reinhard Wobst)
#EXTRA_LIBS = -lnsl -lsocket -lgen -lXIM -lXmu -lXext
### (c) Tandem/NSK (Matthew Woehlke)
#EXTRA_LIBS = -lfloss
### If you want to use ncurses library instead of the automatically found one
### after changing this, you need to do "make reconfig".
#CONF_TERM_LIB = --with-tlib=ncurses

View File

@@ -1772,7 +1772,8 @@ write_viminfo(file, forceit)
*/
st_old.st_dev = st_old.st_ino = 0;
st_old.st_mode = 0600;
if (mch_stat((char *)fname, &st_old) == 0 && getuid()
if (mch_stat((char *)fname, &st_old) == 0
&& getuid() != ROOT_UID
&& !(st_old.st_uid == getuid()
? (st_old.st_mode & 0200)
: (st_old.st_gid == getgid()

View File

@@ -1122,7 +1122,7 @@ retry:
if (!skip_read)
{
#if SIZEOF_INT > 2
# ifdef __TANDEM
# if defined(SSIZE_MAX) && (SSIZE_MAX < 0x10000L)
size = SSIZE_MAX; /* use max I/O size, 52K */
# else
size = 0x10000L; /* use buffer >= 64K */

View File

@@ -4401,7 +4401,6 @@ eval_map_expr(str)
}
#endif
#if defined(FEAT_EVAL) || defined(PROTO)
/*
* Copy "p" to allocated memory, escaping K_SPECIAL and CSI so that the result
* can be put in the typeahead buffer.
@@ -4440,7 +4439,6 @@ vim_strsave_escape_csi(p)
}
return res;
}
#endif
/*
* Write map commands for the current mappings to an .exrc file.

View File

@@ -1932,14 +1932,8 @@ cs_print_tags_priv(matches, cntxts, num_matches)
if ((fname = strtok(NULL, (const char *)"\t")) == NULL)
continue;
if ((lno = strtok(NULL, (const char *)"\t")) == NULL)
{
/* if NULL, then no "extra", although in cscope's case, there
* should always be "extra".
*/
extra = NULL;
}
extra = lno + strlen(lno) + 1;
continue;
extra = strtok(NULL, (const char *)"\t");
lno[strlen(lno)-2] = '\0'; /* ignore ;" at the end */

View File

@@ -3280,7 +3280,7 @@ prepare_server(parmp)
# ifdef FEAT_GUI
(gui.in_use
# ifdef UNIX
&& getuid() != 0
&& getuid() != ROOT_UID
# endif
) ||
# endif

View File

@@ -96,7 +96,8 @@ static void block_insert __ARGS((oparg_T *oap, char_u *s, int b_insert, struct b
#endif
static int stuff_yank __ARGS((int, char_u *));
static void put_reedit_in_typebuf __ARGS((int silent));
static int put_in_typebuf __ARGS((char_u *s, int colon, int silent));
static int put_in_typebuf __ARGS((char_u *s, int esc, int colon,
int silent));
static void stuffescaped __ARGS((char_u *arg, int literally));
#ifdef FEAT_MBYTE
static void mb_adjust_opend __ARGS((oparg_T *oap));
@@ -1174,9 +1175,9 @@ do_execreg(regname, colon, addcr, silent)
/* When in Visual mode "'<,'>" will be prepended to the command.
* Remove it when it's already there. */
if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0)
retval = put_in_typebuf(p + 5, TRUE, silent);
retval = put_in_typebuf(p + 5, TRUE, TRUE, silent);
else
retval = put_in_typebuf(p, TRUE, silent);
retval = put_in_typebuf(p, TRUE, TRUE, silent);
}
vim_free(p);
}
@@ -1187,7 +1188,7 @@ do_execreg(regname, colon, addcr, silent)
p = get_expr_line();
if (p == NULL)
return FAIL;
retval = put_in_typebuf(p, colon, silent);
retval = put_in_typebuf(p, TRUE, colon, silent);
vim_free(p);
}
#endif
@@ -1199,7 +1200,7 @@ do_execreg(regname, colon, addcr, silent)
EMSG(_(e_noinstext));
return FAIL;
}
retval = put_in_typebuf(p, colon, silent);
retval = put_in_typebuf(p, FALSE, colon, silent);
vim_free(p);
}
else
@@ -1217,6 +1218,8 @@ do_execreg(regname, colon, addcr, silent)
put_reedit_in_typebuf(silent);
for (i = y_current->y_size; --i >= 0; )
{
char_u *escaped;
/* insert NL between lines and after last line if type is MLINE */
if (y_current->y_type == MLINE || i < y_current->y_size - 1
|| addcr)
@@ -1224,8 +1227,12 @@ do_execreg(regname, colon, addcr, silent)
if (ins_typebuf((char_u *)"\n", remap, 0, TRUE, silent) == FAIL)
return FAIL;
}
if (ins_typebuf(y_current->y_array[i], remap, 0, TRUE, silent)
== FAIL)
escaped = vim_strsave_escape_csi(y_current->y_array[i]);
if (escaped == NULL)
return FAIL;
retval = ins_typebuf(escaped, remap, 0, TRUE, silent);
vim_free(escaped);
if (retval == FAIL)
return FAIL;
if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, silent)
== FAIL)
@@ -1265,8 +1272,9 @@ put_reedit_in_typebuf(silent)
}
static int
put_in_typebuf(s, colon, silent)
put_in_typebuf(s, esc, colon, silent)
char_u *s;
int esc; /* Escape CSI characters */
int colon; /* add ':' before the line */
int silent;
{
@@ -1276,7 +1284,20 @@ put_in_typebuf(s, colon, silent)
if (colon)
retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent);
if (retval == OK)
retval = ins_typebuf(s, REMAP_YES, 0, TRUE, silent);
{
char_u *p;
if (esc)
p = vim_strsave_escape_csi(s);
else
p = s;
if (p == NULL)
retval = FAIL;
else
retval = ins_typebuf(p, REMAP_YES, 0, TRUE, silent);
if (esc)
vim_free(p);
}
if (colon && retval == OK)
retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, silent);
return retval;

View File

@@ -25,7 +25,7 @@
* Don't use it for the Mac, it causes a warning for precompiled headers.
* TODO: use a configure check for precompiled headers?
*/
#ifndef __APPLE__
#if !defined(__APPLE__) && !defined(__TANDEM)
# define select select_declared_wrong
#endif
@@ -48,9 +48,11 @@
/*
* Use this prototype for select, some include files have a wrong prototype
*/
#undef select
#ifdef __BEOS__
# define select beos_select
#ifndef __TANDEM
# undef select
# ifdef __BEOS__
# define select beos_select
# endif
#endif
#if defined(HAVE_SELECT)
@@ -4770,6 +4772,14 @@ RealWaitForChar(fd, msec, check_for_gpm)
# else
ret = select(maxfd + 1, &rfds, NULL, &efds, tvp);
# endif
# ifdef __TANDEM
if (ret == -1 && errno == ENOTSUP)
{
FD_ZERO(&rfds);
FD_ZERO(&efds);
ret = 0;
}
#endif
# ifdef FEAT_MZSCHEME
if (ret == 0 && mzquantum_used)
/* loop if MzThreads must be scheduled and timeout occured */

View File

@@ -98,7 +98,9 @@ extern int atol __ARGS((char *));
#ifndef USE_SYSTEM
extern int fork __ARGS((void));
# ifndef __TANDEM
extern int execvp __ARGS((const char *, const char **));
# endif
extern int wait __ARGS((int *)); /* will this break things ...? */
extern int waitpid __ARGS((pid_t, int *, int));
#endif
@@ -123,10 +125,12 @@ extern void longjmp __ARGS((jmp_buf, int));
extern int kill __ARGS((int, int));
#ifndef __TANDEM
extern int access __ARGS((char *, int));
#endif
extern int fsync __ARGS((int));
extern int fchown __ARGS((int, int, int));
#if defined(HAVE_GETCWD) && !defined(sun)
#if defined(HAVE_GETCWD) && !defined(sun) && !defined(__TANDEM)
extern char *getcwd __ARGS((char *, int));
#else
extern char *getwd __ARGS((char *));

View File

@@ -11,13 +11,19 @@ extern char *getenv __ARGS((char *));
extern int setenv __ARGS((char *, char *, int));
extern int putenv __ARGS((const char *));
#ifndef __TANDEM
extern int gethostname __ARGS((char *, int));
#endif
extern void perror __ARGS((char *));
#ifndef __TANDEM
extern int sleep __ARGS((int));
#endif
extern int usleep __ARGS((unsigned int));
extern unsigned int alarm __ARGS((unsigned int));
#ifndef __TANDEM
extern int chdir __ARGS((char *));
#endif
extern int fchdir __ARGS((int));
#ifndef stat /* could be redefined to stat64() */
extern int stat __ARGS((const char *, struct stat *));
@@ -28,8 +34,10 @@ extern int lstat __ARGS((const char *, struct stat *));
extern int fstat __ARGS((int, struct stat *));
extern int open __ARGS((const char *, int, ...));
extern int close __ARGS((int));
#ifndef __TANDEM
extern int read __ARGS((int, char *, size_t));
extern int write __ARGS((int, char *, size_t));
#endif
extern int pipe __ARGS((int *));
extern off_t lseek __ARGS((int, off_t, int));
extern void sync __ARGS((void));

View File

@@ -330,7 +330,7 @@ OpenPTY(ttyn)
if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0)
return -1;
strncpy(TtyName, ttyname(f), sizeof(TtyName));
if (geteuid() && mch_access(TtyName, R_OK | W_OK))
if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK))
{
close(f);
return -1;
@@ -394,7 +394,7 @@ OpenPTY(ttyn)
q[0] = *l;
q[1] = *d;
#ifndef MACOS
if (geteuid() && mch_access(TtyName, R_OK | W_OK))
if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK))
{
close(f);
continue;

View File

@@ -666,6 +666,14 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
205,
/**/
204,
/**/
203,
/**/
202,
/**/
201,
/**/

View File

@@ -50,6 +50,15 @@
# endif
#endif
/* user ID of root is usually zero, but not for everybody */
#ifdef __TANDEM
# define _TANDEM_SOURCE
# include <floss.h>
# define ROOT_UID 65535
#else
# define ROOT_UID 0
#endif
#ifdef __EMX__ /* hand-edited config.h for OS/2 with EMX */
# include "os_os2_cfg.h"
#endif