Mercurial > vim
annotate src/osdef1.h.in @ 10763:ae0bbbbe2a38 v8.0.0271
patch 8.0.0271: may get ml_get error when :tcldo deletes lines
commit https://github.com/vim/vim/commit/a4c906a4a111cbe59cf5f1e8354a36ba83e0a444
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 29 23:26:37 2017 +0100
patch 8.0.0271: may get ml_get error when :tcldo deletes lines
Problem: May get ml_get error when :tcldo deletes lines or switches to
another buffer. (Nikolai Pavlov, closes https://github.com/vim/vim/issues/1421)
Solution: Check the buffer and line every time.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 29 Jan 2017 23:30:04 +0100 |
parents | 37a441352da2 |
children | 937c80935bc0 |
rev | line source |
---|---|
7 | 1 /* autoconf cannot fiddle out declarations. Use our homebrewn tools. (jw) */ |
2 /* | |
3 * Declarations that may cause conflicts belong here so that osdef.sh | |
4 * can clean out the forest. Everything else belongs in os_unix.h | |
5 * | |
6 * How this works: | |
7 * - This file contains all unix prototypes that Vim might need. | |
8 * - The shell script osdef.sh is executed at compile time to remove all the | |
9 * prototypes that are in an include file. This results in osdef.h. | |
10 * - osdef.h is included in vim.h. | |
11 * | |
12 * sed cannot always handle so many commands, this is file 1 of 2 | |
13 */ | |
14 | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
15 extern int printf(char *, ...); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
16 extern int fprintf(FILE *, char *, ...); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
17 extern int sprintf(char *, char *, ...); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
18 extern int sscanf(char *, char *, ...); |
7 | 19 #ifndef fopen /* could be redefined to fopen64() */ |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
20 extern FILE *fopen(const char *, const char *); |
7 | 21 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
22 extern int fclose(FILE *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
23 extern int fseek(FILE *, long, int); |
7 | 24 #ifdef HAVE_FSEEKO |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
25 extern int fseeko(FILE *, off_t, int); |
7 | 26 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
27 extern long ftell(FILE *); |
2087
3112fcc89238
updated for version 7.2.371
Bram Moolenaar <bram@zimbu.org>
parents:
1076
diff
changeset
|
28 #ifdef HAVE_FSEEKO |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
29 extern off_t ftello(FILE *); |
7 | 30 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
31 extern void rewind(FILE *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
32 extern int fread(char *, int, int, FILE *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
33 extern int fwrite(char *, int, int, FILE *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
34 extern int fputs(char *, FILE *); |
7 | 35 #ifndef ferror /* let me say it again: "macros should never have prototypes" */ |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
36 extern int ferror(FILE *); |
7 | 37 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
38 extern int fflush(FILE *); |
7 | 39 #if defined(sun) || defined(_SEQUENT_) |
40 /* used inside of stdio macros getc(), puts(), putchar()... */ | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
41 extern int _flsbuf(int, FILE *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
42 extern int _filbuf(FILE *); |
7 | 43 #endif |
44 | |
45 #if !defined(HAVE_SELECT) | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
46 struct pollfd; /* for poll() */ |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
47 extern int poll(struct pollfd *, long, int); |
7 | 48 #endif |
49 | |
50 #ifdef HAVE_MEMSET | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
51 extern void *memset(void *, int, size_t); |
7 | 52 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
53 extern int memcmp(const void *, const void *, size_t); |
7 | 54 #ifdef HAVE_STRPBRK |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
55 extern char *strpbrk(const char *, const char *); |
7 | 56 #endif |
57 #ifdef USEBCOPY | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
58 extern void bcopy(char *, char *, int); |
7 | 59 #else |
60 # ifdef USEMEMCPY | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
61 extern void memcpy(char *, char *, int); |
7 | 62 # else |
63 # ifdef USEMEMMOVE | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
64 extern void memmove(char *, char *, int); |
7 | 65 # endif |
66 # endif | |
67 #endif | |
68 /* used inside of FD_ZERO macro: */ | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
69 extern void bzero(void *, size_t); |
7 | 70 #ifdef HAVE_SETSID |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
71 extern pid_t setsid(void); |
7 | 72 #endif |
73 #ifdef HAVE_SETPGID | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
74 extern int setpgid(pid_t, pid_t); |
7 | 75 #endif |
76 #ifdef HAVE_STRTOL | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
77 extern int strtol(char *, char **, int); |
7 | 78 #endif |
79 #ifdef HAVE_STRFTIME | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
80 extern size_t strftime(char *, size_t, char *, struct tm *); |
7 | 81 #endif |
82 #ifdef HAVE_STRCASECMP | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
83 extern int strcasecmp(char *, char *); |
7 | 84 #endif |
85 #ifdef HAVE_STRNCASECMP | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
86 extern int strncasecmp(char *, char *, size_t); |
7 | 87 #endif |
88 #ifndef strdup | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
89 extern char *strdup(const char *); |
7 | 90 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
91 extern int atoi(char *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
92 extern int atol(char *); |
7 | 93 |
94 #ifndef USE_SYSTEM | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
95 extern int fork(void); |
1076 | 96 # ifndef __TANDEM |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
97 extern int execvp(const char *, const char **); |
1076 | 98 # endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
99 extern int wait(int *); /* will this break things ...? */ |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
100 extern int waitpid(pid_t, int *, int); |
7 | 101 #endif |
102 | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
103 extern int toupper(int); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
104 extern int tolower(int); |
7 | 105 |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
106 extern RETSIGTYPE (*signal(int, RETSIGTYPE (*func) SIGPROTOARG)) SIGPROTOARG; |
7 | 107 #ifdef HAVE_SIGSET |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
108 extern RETSIGTYPE (*sigset(int, RETSIGTYPE (*func) SIGPROTOARG)) SIGPROTOARG; |
7 | 109 #endif |
110 | |
111 #if defined(HAVE_SETJMP_H) | |
112 # ifdef HAVE_SIGSETJMP | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
113 extern int sigsetjmp(sigjmp_buf, int); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
114 extern void siglongjmp(sigjmp_buf, int); |
7 | 115 # else |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
116 extern int setjmp(jmp_buf); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
117 extern void longjmp(jmp_buf, int); |
7 | 118 # endif |
119 #endif | |
120 | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
121 extern int kill(int, int); |
7 | 122 |
1076 | 123 #ifndef __TANDEM |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
124 extern int access(char *, int); |
1076 | 125 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
126 extern int fsync(int); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
127 extern int fchown(int, int, int); |
1076 | 128 #if defined(HAVE_GETCWD) && !defined(sun) && !defined(__TANDEM) |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
129 extern char *getcwd(char *, int); |
7 | 130 #else |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
131 extern char *getwd(char *); |
7 | 132 #endif |
133 #ifndef __alpha /* suggested by Campbell */ | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
134 extern int ioctl(int, int, ...); |
7 | 135 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
2087
diff
changeset
|
136 extern int chmod(const char *, mode_t); |