aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Schmidt <john.schmidt.h@gmail.com>2014-04-20 23:57:12 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-22 08:06:06 -0300
commitb10341ce5b6e0f5b1c151828416ea72991007b16 (patch)
tree862fedf0556a90400bc917c4ef7ff9a8fe022cc5
parent0072ba93612bb66e1c9411b6c497961c38b2f0e4 (diff)
downloadrneovim-b10341ce5b6e0f5b1c151828416ea72991007b16.tar.gz
rneovim-b10341ce5b6e0f5b1c151828416ea72991007b16.tar.bz2
rneovim-b10341ce5b6e0f5b1c151828416ea72991007b16.zip
Remove sizeof(int) < 4 related code
-rw-r--r--src/eval_defs.h4
-rw-r--r--src/fileio.c15
-rw-r--r--src/message.c4
-rw-r--r--src/spell.c4
-rw-r--r--src/vim.h20
5 files changed, 1 insertions, 46 deletions
diff --git a/src/eval_defs.h b/src/eval_defs.h
index c925514597..aa086c3278 100644
--- a/src/eval_defs.h
+++ b/src/eval_defs.h
@@ -3,11 +3,7 @@
#include "hashtab.h"
-#if SIZEOF_INT <= 3 /* use long if int is smaller than 32 bits */
-typedef long varnumber_T;
-#else
typedef int varnumber_T;
-#endif
typedef double float_T;
typedef struct listvar_S list_T;
diff --git a/src/fileio.c b/src/fileio.c
index 6d7ea37f9a..767969f9c8 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -983,24 +983,9 @@ retry:
* The amount is limited by the fact that read() only can read
* upto max_unsigned characters (and other things).
*/
-#if SIZEOF_INT <= 2
- if (linerest >= 0x7ff0) {
- ++split;
- *ptr = NL; /* split line by inserting a NL */
- size = 1;
- } else
-#endif
{
if (!skip_read) {
-#if SIZEOF_INT > 2
-# if defined(SSIZE_MAX) && (SSIZE_MAX < 0x10000L)
- size = SSIZE_MAX; /* use max I/O size, 52K */
-# else
size = 0x10000L; /* use buffer >= 64K */
-# endif
-#else
- size = 0x7ff0L - linerest; /* limit buffer to 32K */
-#endif
for (; size >= 10; size = (long)((long_u)size >> 1)) {
if ((new_buffer = lalloc((long_u)(size + linerest + 1),
diff --git a/src/message.c b/src/message.c
index 5bb278832a..b0b13dfd4a 100644
--- a/src/message.c
+++ b/src/message.c
@@ -3351,14 +3351,10 @@ int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs)
else {
/* Don't put the #if inside memchr(), it can be a
* macro. */
-#if SIZEOF_INT <= 2
- char *q = memchr(str_arg, '\0', precision);
-#else
/* memchr on HP does not like n > 2^31 !!! */
char *q = memchr(str_arg, '\0',
precision <= (size_t)0x7fffffffL ? precision
: (size_t)0x7fffffffL);
-#endif
str_arg_l = (q == NULL) ? precision
: (size_t)(q - str_arg);
}
diff --git a/src/spell.c b/src/spell.c
index ec8d3db296..78b7e581bd 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -341,11 +341,7 @@
/* Type used for indexes in the word tree need to be at least 4 bytes. If int
* is 8 bytes we could use something smaller, but what? */
-#if SIZEOF_INT > 3
typedef int idx_T;
-#else
-typedef long idx_T;
-#endif
# define SPL_FNAME_TMPL "%s.%s.spl"
# define SPL_FNAME_ADD ".add."
diff --git a/src/vim.h b/src/vim.h
index 3f12048533..150cd8465c 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1076,25 +1076,7 @@ typedef int colnr_T; /* column number type */
typedef unsigned short disptick_T; /* display tick type */
#define MAXLNUM (0x7fffffffL) /* maximum (invalid) line number */
-
-/*
- * Well, you won't believe it, but some S/390 machines ("host", now also known
- * as zServer) use 31 bit pointers. There are also some newer machines, that
- * use 64 bit pointers. I don't know how to distinguish between 31 and 64 bit
- * machines, so the best way is to assume 31 bits whenever we detect OS/390
- * Unix.
- * With this we restrict the maximum line length to 1073741823. I guess this is
- * not a real problem. BTW: Longer lines are split.
- */
-#if SIZEOF_INT >= 4
-# ifdef __MVS__
-# define MAXCOL (0x3fffffffL) /* maximum column number, 30 bits */
-# else
-# define MAXCOL (0x7fffffffL) /* maximum column number, 31 bits */
-# endif
-#else
-# define MAXCOL (0x7fff) /* maximum column number, 15 bits */
-#endif
+#define MAXCOL (0x7fffffffL) /* maximum column number, 31 bits */
#define SHOWCMD_COLS 10 /* columns needed by shown command */
#define STL_MAX_ITEM 80 /* max nr of %<flag> in statusline */