summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/blowfish.c9
-rw-r--r--src/cindent.c8
-rw-r--r--src/crypt_zip.c3
-rw-r--r--src/diff.c3
-rw-r--r--src/digraph.c3
-rw-r--r--src/ex_cmds.c6
-rw-r--r--src/ex_cmds.h3
-rw-r--r--src/gui_beval.c3
-rw-r--r--src/gui_motif.c11
-rw-r--r--src/gui_photon.c3
-rw-r--r--src/gui_x11.c7
-rw-r--r--src/gui_xmebw.c22
-rw-r--r--src/if_cscope.c6
-rw-r--r--src/if_lua.c9
-rw-r--r--src/if_python3.c9
-rw-r--r--src/insexpand.c52
-rw-r--r--src/macros.h12
-rw-r--r--src/nbdebug.c27
-rw-r--r--src/nbdebug.h3
-rw-r--r--src/nv_cmds.h3
-rw-r--r--src/optiondefs.h3
-rw-r--r--src/os_amiga.c3
-rw-r--r--src/os_mac_conv.c6
-rw-r--r--src/os_vms.c105
-rw-r--r--src/quickfix.c5
-rw-r--r--src/regexp_bt.c6
-rw-r--r--src/regexp_nfa.c9
-rw-r--r--src/search.c4
-rw-r--r--src/termlib.c43
-rw-r--r--src/testdir/Make_all.mak2
-rw-r--r--src/testdir/test_codestyle.vim45
-rw-r--r--src/uninstall.c3
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h30
34 files changed, 319 insertions, 149 deletions
diff --git a/src/blowfish.c b/src/blowfish.c
index dc977db428..88d4bce9e8 100644
--- a/src/blowfish.c
+++ b/src/blowfish.c
@@ -517,7 +517,8 @@ bf_self_test(void)
// We can't simply use sizeof(UINT32_T), it would generate a compiler
// warning.
- if (ui != 0xffffffffUL || ui + 1 != 0) {
+ if (ui != 0xffffffffUL || ui + 1 != 0)
+ {
err++;
emsg(_(e_sizeof_uint32_isnot_four));
}
@@ -573,13 +574,15 @@ bf_cfb_init(
}
}
-#define BF_CFB_UPDATE(bfs, c) { \
+#define BF_CFB_UPDATE(bfs, c) \
+{ \
bfs->cfb_buffer[bfs->update_offset] ^= (char_u)c; \
if (++bfs->update_offset == bfs->cfb_len) \
bfs->update_offset = 0; \
}
-#define BF_RANBYTE(bfs, t) { \
+#define BF_RANBYTE(bfs, t) \
+{ \
if ((bfs->randbyte_offset & BF_BLOCK_MASK) == 0) \
bf_e_cblock(bfs, &(bfs->cfb_buffer[bfs->randbyte_offset])); \
t = bfs->cfb_buffer[bfs->randbyte_offset]; \
diff --git a/src/cindent.c b/src/cindent.c
index bc71cc092f..e8e255feb3 100644
--- a/src/cindent.c
+++ b/src/cindent.c
@@ -2641,7 +2641,7 @@ get_c_indent(void)
// It could have been something like
// case 1: if (asdf &&
- // ldfd) {
+ // condition) {
// }
if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label)
&& cin_iscase(skipwhite(ml_get_curline()), FALSE))
@@ -3275,7 +3275,7 @@ get_c_indent(void)
}
// Check if we are after an "if", "while", etc.
- // Also allow " } else".
+ // Also allow "} else".
if (cin_is_cinword(l) || cin_iselse(skipwhite(l)))
{
// Found an unterminated line after an if (), line up
@@ -3335,7 +3335,7 @@ get_c_indent(void)
{
// If we're looking at "} else", let's make sure we
// find the opening brace of the enclosing scope,
- // not the one from "if () {".
+ // not the one from "if (condition) {".
if (*l == '}')
curwin->w_cursor.col =
(colnr_T)(l - ml_get_curline()) + 1;
@@ -3680,7 +3680,7 @@ term_again:
// line needs to be indented as a function type spec.
// Don't do this if the current line looks like a comment or if the
// current line is terminated, ie. ends in ';', or if the current line
- // contains { or }: "void f() {\n if (1)"
+ // contains { or }: "void f(condition) {\n if (1)"
if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
&& !cin_nocode(theline)
&& vim_strchr(theline, '{') == NULL
diff --git a/src/crypt_zip.c b/src/crypt_zip.c
index b11d7a329f..91bbd7ba10 100644
--- a/src/crypt_zip.c
+++ b/src/crypt_zip.c
@@ -60,7 +60,8 @@ make_crc_tab(void)
/*
* Return the next byte in the pseudo-random sequence.
*/
-#define DECRYPT_BYTE_ZIP(keys, t) { \
+#define DECRYPT_BYTE_ZIP(keys, t) \
+{ \
short_u temp = (short_u)keys[2] | 2; \
t = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff); \
}
diff --git a/src/diff.c b/src/diff.c
index ec8c8f175d..a155c5eae4 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -1680,9 +1680,8 @@ diff_read(
{
if (dio->dio_internal)
{
- if (line_idx >= dout->dout_ga.ga_len) {
+ if (line_idx >= dout->dout_ga.ga_len)
break; // did last line
- }
hunk = ((diffhunk_T **)dout->dout_ga.ga_data)[line_idx++];
}
else
diff --git a/src/digraph.c b/src/digraph.c
index 97a72e1d55..ac51d50a79 100644
--- a/src/digraph.c
+++ b/src/digraph.c
@@ -2093,7 +2093,8 @@ f_digraph_get(typval_T *argvars, typval_T *rettv)
if (has_mbyte)
buf[(*mb_char2bytes)(code, buf)] = NUL;
- else {
+ else
+ {
buf[0] = code;
buf[1] = NUL;
}
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 32c72879cc..7fd095268a 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -722,7 +722,8 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest)
{
mark_adjust_nofold(line2 + 1, dest, -num_lines, 0L);
#ifdef FEAT_FOLDING
- FOR_ALL_TAB_WINDOWS(tp, win) {
+ FOR_ALL_TAB_WINDOWS(tp, win)
+ {
if (win->w_buffer == curbuf)
foldMoveRange(&win->w_folds, line1, line2, dest);
}
@@ -737,7 +738,8 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest)
{
mark_adjust_nofold(dest + 1, line1 - 1, num_lines, 0L);
#ifdef FEAT_FOLDING
- FOR_ALL_TAB_WINDOWS(tp, win) {
+ FOR_ALL_TAB_WINDOWS(tp, win)
+ {
if (win->w_buffer == curbuf)
foldMoveRange(&win->w_folds, dest + 1, line1 - 1, line2);
}
diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index 1c71bd31a3..8f8efe7cc8 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -98,7 +98,8 @@ typedef struct exarg exarg_T;
* Not supported commands are included to avoid ambiguities.
*/
#ifdef DO_DECLARE_EXCMD
-# define EXCMD(a, b, c, d, e) {(char_u *)b, c, (long_u)(d), e}
+# define EXCMD(a, b, c, d, e) \
+ {(char_u *)b, c, (long_u)(d), e}
typedef void (*ex_func_T) (exarg_T *eap);
diff --git a/src/gui_beval.c b/src/gui_beval.c
index daeac8f3b7..9d85d90e00 100644
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -645,7 +645,8 @@ pointerEvent(BalloonEval *beval, XEvent *event)
XtTranslateKeycode(gui.dpy, event->xkey.keycode,
event->xkey.state, &modifier, &keysym);
- if ((keysym == XK_Shift_L) || (keysym == XK_Shift_R)) {
+ if ((keysym == XK_Shift_L) || (keysym == XK_Shift_R))
+ {
beval->showState = ShS_UPDATE_PENDING;
(*beval->msgCB)(beval, 0);
}
diff --git a/src/gui_motif.c b/src/gui_motif.c
index 5e18f20c8e..b25b99186d 100644
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -167,16 +167,17 @@ tabline_scroller_clicked(
Dimension width, height;
tab_scroll_w = XtNameToWidget(tabLine, scroller_name);
- if (tab_scroll_w != (Widget)0) {
+ if (tab_scroll_w != (Widget)0)
+ {
XtVaGetValues(tab_scroll_w, XmNx, &pos_x, XmNy, &pos_y, XmNwidth,
&width, XmNheight, &height, NULL);
- if (pos_x >= 0) {
+ if (pos_x >= 0)
+ {
// Tab scroller (next) is visible
- if ((event->x >= pos_x) && (event->x <= pos_x + width) &&
- (event->y >= pos_y) && (event->y <= pos_y + height)) {
+ if (event->x >= pos_x && event->x <= pos_x + width
+ && event->y >= pos_y && event->y <= pos_y + height)
// Clicked on the scroller
return TRUE;
- }
}
}
return FALSE;
diff --git a/src/gui_photon.c b/src/gui_photon.c
index 5671890470..a17b4f5d03 100644
--- a/src/gui_photon.c
+++ b/src/gui_photon.c
@@ -361,7 +361,8 @@ gui_ph_handle_window_cb(PtWidget_t *widget, void *data, PtCallbackInfo_t *info)
PhWindowEvent_t *we = info->cbdata;
ushort_t *width, *height;
- switch (we->event_f) {
+ switch (we->event_f)
+ {
case Ph_WM_CLOSE:
gui_shell_closed();
break;
diff --git a/src/gui_x11.c b/src/gui_x11.c
index a239e0b547..540f143e2a 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -3095,10 +3095,13 @@ gui_mch_getmouse(int *x, int *y)
unsigned int mask;
if (gui.wid && XQueryPointer(gui.dpy, gui.wid, &root, &child,
- &rootx, &rooty, &winx, &winy, &mask)) {
+ &rootx, &rooty, &winx, &winy, &mask))
+ {
*x = winx;
*y = winy;
- } else {
+ }
+ else
+ {
*x = -1;
*y = -1;
}
diff --git a/src/gui_xmebw.c b/src/gui_xmebw.c
index 7ffa6f3fb4..3d9519eeb0 100644
--- a/src/gui_xmebw.c
+++ b/src/gui_xmebw.c
@@ -281,21 +281,21 @@ static char * blank_xpm[] =
// width height ncolors cpp [x_hot y_hot]
"12 12 4 1 0 0",
// colors
-" s iconColor1 m black c #000000",
+"# s iconColor1 m black c #000000",
". s none m none c none",
"X s topShadowColor m none c #DCDEE5",
"o s bottomShadowColor m black c #5D6069",
// pixels
-" ..",
-" XXXXXXXX ..",
-" X....... o.",
-" X....... o.",
-" X....... o.",
-" X....... o.",
-" X....... o.",
-" X....... o.",
-" X....... o.",
-" o.",
+"##########..",
+"#XXXXXXXX#..",
+"#X.......#o.",
+"#X.......#o.",
+"#X.......#o.",
+"#X.......#o.",
+"#X.......#o.",
+"#X.......#o.",
+"#X.......#o.",
+"##########o.",
"..ooooooooo.",
"............"};
diff --git a/src/if_cscope.c b/src/if_cscope.c
index ffb1784e1b..309bddcab6 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -1463,7 +1463,8 @@ cs_insert_filelist(
return -1;
}
(void)strcpy(csinfo[i].ppath, (const char *)ppath);
- } else
+ }
+ else
csinfo[i].ppath = NULL;
if (flags != NULL)
@@ -1475,7 +1476,8 @@ cs_insert_filelist(
return -1;
}
(void)strcpy(csinfo[i].flags, (const char *)flags);
- } else
+ }
+ else
csinfo[i].flags = NULL;
#if defined(UNIX)
diff --git a/src/if_lua.c b/src/if_lua.c
index 6941789b91..45f233fdec 100644
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -657,9 +657,11 @@ luaV_totypval(lua_State *L, int pos, typval_T *tv)
lua_pushvalue(L, pos);
lua_tableref = luaL_ref(L, LUA_REGISTRYINDEX);
- if (lua_getmetatable(L, pos)) {
+ if (lua_getmetatable(L, pos))
+ {
lua_getfield(L, -1, LUA___CALL);
- if (lua_isfunction(L, -1)) {
+ if (lua_isfunction(L, -1))
+ {
char_u *name;
int lua_funcref = luaL_ref(L, LUA_REGISTRYINDEX);
luaV_CFuncState *state = ALLOC_CLEAR_ONE(luaV_CFuncState);
@@ -827,7 +829,8 @@ luaV_msgfunc(lua_State *L, msgfunc_T mf)
luatyp *o = NULL; \
if (obj == NULL) \
lua_pushnil(L); \
- else { \
+ else \
+ { \
luaV_getudata(L, obj); \
if (lua_isnil(L, -1)) /* not interned? */ \
{ \
diff --git a/src/if_python3.c b/src/if_python3.c
index 270e1a9e25..240b88fac7 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -1505,7 +1505,8 @@ BufferSubscript(PyObject *self, PyObject* idx)
{
long _idx = PyLong_AsLong(idx);
return BufferItem((BufferObject *)(self), _idx);
- } else if (PySlice_Check(idx))
+ }
+ else if (PySlice_Check(idx))
{
Py_ssize_t start, stop, step, slicelen;
@@ -1539,7 +1540,8 @@ BufferAsSubscript(PyObject *self, PyObject* idx, PyObject* val)
return RBAsItem((BufferObject *)(self), n, val, 1,
(Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
NULL);
- } else if (PySlice_Check(idx))
+ }
+ else if (PySlice_Check(idx))
{
Py_ssize_t start, stop, step, slicelen;
@@ -1623,7 +1625,8 @@ RangeSubscript(PyObject *self, PyObject* idx)
{
long _idx = PyLong_AsLong(idx);
return RangeItem((RangeObject *)(self), _idx);
- } else if (PySlice_Check(idx))
+ }
+ else if (PySlice_Check(idx))
{
Py_ssize_t start, stop, step, slicelen;
diff --git a/src/insexpand.c b/src/insexpand.c
index c5d0bf286b..2351ac65c9 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -263,27 +263,39 @@ ins_ctrl_x(void)
/*
* Functions to check the current CTRL-X mode.
*/
-int ctrl_x_mode_none(void) { return ctrl_x_mode == 0; }
-int ctrl_x_mode_normal(void) { return ctrl_x_mode == CTRL_X_NORMAL; }
-int ctrl_x_mode_scroll(void) { return ctrl_x_mode == CTRL_X_SCROLL; }
-int ctrl_x_mode_whole_line(void) { return ctrl_x_mode == CTRL_X_WHOLE_LINE; }
-int ctrl_x_mode_files(void) { return ctrl_x_mode == CTRL_X_FILES; }
-int ctrl_x_mode_tags(void) { return ctrl_x_mode == CTRL_X_TAGS; }
-int ctrl_x_mode_path_patterns(void) {
- return ctrl_x_mode == CTRL_X_PATH_PATTERNS; }
-int ctrl_x_mode_path_defines(void) {
- return ctrl_x_mode == CTRL_X_PATH_DEFINES; }
-int ctrl_x_mode_dictionary(void) { return ctrl_x_mode == CTRL_X_DICTIONARY; }
-int ctrl_x_mode_thesaurus(void) { return ctrl_x_mode == CTRL_X_THESAURUS; }
-int ctrl_x_mode_cmdline(void) {
- return ctrl_x_mode == CTRL_X_CMDLINE
+int ctrl_x_mode_none(void)
+ { return ctrl_x_mode == 0; }
+int ctrl_x_mode_normal(void)
+ { return ctrl_x_mode == CTRL_X_NORMAL; }
+int ctrl_x_mode_scroll(void)
+ { return ctrl_x_mode == CTRL_X_SCROLL; }
+int ctrl_x_mode_whole_line(void)
+ { return ctrl_x_mode == CTRL_X_WHOLE_LINE; }
+int ctrl_x_mode_files(void)
+ { return ctrl_x_mode == CTRL_X_FILES; }
+int ctrl_x_mode_tags(void)
+ { return ctrl_x_mode == CTRL_X_TAGS; }
+int ctrl_x_mode_path_patterns(void)
+ { return ctrl_x_mode == CTRL_X_PATH_PATTERNS; }
+int ctrl_x_mode_path_defines(void)
+ { return ctrl_x_mode == CTRL_X_PATH_DEFINES; }
+int ctrl_x_mode_dictionary(void)
+ { return ctrl_x_mode == CTRL_X_DICTIONARY; }
+int ctrl_x_mode_thesaurus(void)
+ { return ctrl_x_mode == CTRL_X_THESAURUS; }
+int ctrl_x_mode_cmdline(void)
+ { return ctrl_x_mode == CTRL_X_CMDLINE
|| ctrl_x_mode == CTRL_X_CMDLINE_CTRL_X; }
-int ctrl_x_mode_function(void) { return ctrl_x_mode == CTRL_X_FUNCTION; }
-int ctrl_x_mode_omni(void) { return ctrl_x_mode == CTRL_X_OMNI; }
-int ctrl_x_mode_spell(void) { return ctrl_x_mode == CTRL_X_SPELL; }
-static int ctrl_x_mode_eval(void) { return ctrl_x_mode == CTRL_X_EVAL; }
-int ctrl_x_mode_line_or_eval(void) {
- return ctrl_x_mode == CTRL_X_WHOLE_LINE || ctrl_x_mode == CTRL_X_EVAL; }
+int ctrl_x_mode_function(void)
+ { return ctrl_x_mode == CTRL_X_FUNCTION; }
+int ctrl_x_mode_omni(void)
+ { return ctrl_x_mode == CTRL_X_OMNI; }
+int ctrl_x_mode_spell(void)
+ { return ctrl_x_mode == CTRL_X_SPELL; }
+static int ctrl_x_mode_eval(void)
+ { return ctrl_x_mode == CTRL_X_EVAL; }
+int ctrl_x_mode_line_or_eval(void)
+ { return ctrl_x_mode == CTRL_X_WHOLE_LINE || ctrl_x_mode == CTRL_X_EVAL; }
/*
* Whether other than default completion has been selected.
diff --git a/src/macros.h b/src/macros.h
index cb97d43833..4f3ad43f25 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -274,14 +274,17 @@
# ifdef MSWIN
# ifndef isnan
# define isnan(x) _isnan(x)
- static __inline int isinf(double x) { return !_finite(x) && !_isnan(x); }
+ static __inline int isinf(double x)
+ { return !_finite(x) && !_isnan(x); }
# endif
# else
# ifndef HAVE_ISNAN
- static inline int isnan(double x) { return x != x; }
+ static inline int isnan(double x)
+ { return x != x; }
# endif
# ifndef HAVE_ISINF
- static inline int isinf(double x) { return !isnan(x) && isnan(x - x); }
+ static inline int isinf(double x)
+ { return !isnan(x) && isnan(x - x); }
# endif
# endif
# if !defined(INFINITY)
@@ -335,7 +338,8 @@
*/
#define VIM_CLEAR(p) \
do { \
- if ((p) != NULL) { \
+ if ((p) != NULL) \
+ { \
vim_free(p); \
(p) = NULL; \
} \
diff --git a/src/nbdebug.c b/src/nbdebug.c
index c79081bea7..58fcad3ef8 100644
--- a/src/nbdebug.c
+++ b/src/nbdebug.c
@@ -59,13 +59,19 @@ nbdebug_wait(
#endif
// for debugging purposes only
- if (wait_flags & WT_ENV && wait_var && getenv(wait_var) != NULL) {
+ if (wait_flags & WT_ENV && wait_var && getenv(wait_var) != NULL)
+ {
sleep(atoi(getenv(wait_var)));
- } else if (wait_flags & WT_WAIT && lookup("~/.gvimwait")) {
+ }
+ else if (wait_flags & WT_WAIT && lookup("~/.gvimwait"))
+ {
sleep(wait_secs > 0 && wait_secs < 120 ? wait_secs : 20);
- } else if (wait_flags & WT_STOP && lookup("~/.gvimstop")) {
+ }
+ else if (wait_flags & WT_STOP && lookup("~/.gvimstop"))
+ {
int w = 1;
- while (w) {
+ while (w)
+ {
;
}
}
@@ -86,9 +92,12 @@ nbdebug_log_init(
nb_debug = fopen(file, "a");
time(&now);
fprintf(nb_debug, "%s", get_ctime(now, TRUE));
- if (level_var && (cp = getenv(level_var)) != NULL) {
+ if (level_var && (cp = getenv(level_var)) != NULL)
+ {
nb_dlevel = strtoul(cp, NULL, 0);
- } else {
+ }
+ else
+ {
nb_dlevel = NB_TRACE; // default level
}
#ifdef USE_NB_ERRORHANDLER
@@ -103,7 +112,8 @@ nbdbg(char *fmt, ...)
{
va_list ap;
- if (nb_debug != NULL && nb_dlevel & NB_TRACE) {
+ if (nb_debug != NULL && nb_dlevel & NB_TRACE)
+ {
va_start(ap, fmt);
vfprintf(nb_debug, fmt, ap);
va_end(ap);
@@ -144,7 +154,8 @@ errorHandler(
"XRequest", buf, "Unknown", msg, sizeof(msg));
nbdbg("\tMajor opcode of failed request: %d (%s)\n",
err->request_code, msg);
- if (err->request_code > 128) {
+ if (err->request_code > 128)
+ {
nbdbg("\tMinor opcode of failed request: %d\n",
err->minor_code);
}
diff --git a/src/nbdebug.h b/src/nbdebug.h
index 9a47c3a890..20bbb049e2 100644
--- a/src/nbdebug.h
+++ b/src/nbdebug.h
@@ -15,7 +15,8 @@
# ifndef ASSERT
# define ASSERT(c) \
- if (!(c)) { \
+ if (!(c)) \
+ { \
fprintf(stderr, "Assertion failed: line %d, file %s\n", \
__LINE__, __FILE__); \
fflush(stderr); \
diff --git a/src/nv_cmds.h b/src/nv_cmds.h
index d4b2c95c84..aa68b686b5 100644
--- a/src/nv_cmds.h
+++ b/src/nv_cmds.h
@@ -25,7 +25,8 @@
/*
* Used when building Vim.
*/
-# define NVCMD(a, b, c, d) {a, b, c, d}
+# define NVCMD(a, b, c, d) \
+ {a, b, c, d}
#ifdef FEAT_GUI
#define NV_VER_SCROLLBAR nv_ver_scrollbar
diff --git a/src/optiondefs.h b/src/optiondefs.h
index 4d12e25c62..7ec4847d01 100644
--- a/src/optiondefs.h
+++ b/src/optiondefs.h
@@ -2849,7 +2849,8 @@ static struct vimoption options[] =
{(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
// terminal output codes
-#define p_term(sss, vvv) {sss, NULL, P_STRING|P_VI_DEF|P_RALL|P_SECURE, \
+#define p_term(sss, vvv) \
+ {sss, NULL, P_STRING|P_VI_DEF|P_RALL|P_SECURE, \
(char_u *)&vvv, PV_NONE, \
{(char_u *)"", (char_u *)0L} SCTX_INIT},
diff --git a/src/os_amiga.c b/src/os_amiga.c
index 16a64afbb6..0e0fa77834 100644
--- a/src/os_amiga.c
+++ b/src/os_amiga.c
@@ -1250,7 +1250,8 @@ dos_packet(
// Allocate space for a packet, make it public and clear it
packet = (struct StandardPacket *)
AllocMem((long) sizeof(struct StandardPacket), MEMF_PUBLIC | MEMF_CLEAR);
- if (!packet) {
+ if (!packet)
+ {
DeletePort(replyport);
return (0);
}
diff --git a/src/os_mac_conv.c b/src/os_mac_conv.c
index 18e5547b48..3a93649b9d 100644
--- a/src/os_mac_conv.c
+++ b/src/os_mac_conv.c
@@ -107,7 +107,8 @@ mac_string_convert(
// Determine output buffer size
CFStringGetBytes(cfstr, convertRange, to, NULL, FALSE, NULL, 0, (CFIndex *)&buflen);
retval = (buflen > 0) ? alloc(buflen) : NULL;
- if (retval == NULL) {
+ if (retval == NULL)
+ {
CFRelease(cfstr);
return NULL;
}
@@ -543,7 +544,8 @@ mac_utf8_to_utf16(
utf8_str = CFStringCreateWithBytes(NULL, from, fromLen,
kCFStringEncodingUTF8, FALSE);
- if (utf8_str == NULL) {
+ if (utf8_str == NULL)
+ {
if (actualLen)
*actualLen = 0;
return NULL;
diff --git a/src/os_vms.c b/src/os_vms.c
index afecc3593e..23854dd3f0 100644
--- a/src/os_vms.c
+++ b/src/os_vms.c
@@ -118,7 +118,8 @@ mch_settmode(tmode_T tmode)
if ( tmode == TMODE_RAW )
set_tty(0, 0);
- else{
+ else
+ {
switch (orgmode.width)
{
case 132: OUT_STR_NF((char_u *)"\033[?3h\033>"); break;
@@ -379,16 +380,19 @@ vms_wproc(char *name, int val)
return 1;
// accept all DECC$K_FILE and DECC$K_DIRECTORY
- if (vms_match_num == 0) {
+ if (vms_match_num == 0)
+ {
// first time through, setup some things
- if (NULL == vms_fmatch) {
+ if (NULL == vms_fmatch)
+ {
vms_fmatch = ALLOC_MULT(char_u *, EXPL_ALLOC_INC);
if (!vms_fmatch)
return 0;
vms_match_alloced = EXPL_ALLOC_INC;
vms_match_free = EXPL_ALLOC_INC;
}
- else {
+ else
+ {
// re-use existing space
vms_match_free = vms_match_alloced;
}
@@ -399,11 +403,13 @@ vms_wproc(char *name, int val)
name=vms_tolower(name);
// if name already exists, don't add it
- for (i = 0; i<vms_match_num; i++) {
+ for (i = 0; i<vms_match_num; i++)
+ {
if (0 == STRCMP((char_u *)name,vms_fmatch[i]))
return 1;
}
- if (--vms_match_free == 0) {
+ if (--vms_match_free == 0)
+ {
char_u **old_vms_fmatch = vms_fmatch;
// add more space to store matches
@@ -464,9 +470,12 @@ mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***file, i
vms_match_num = 0; // reset collection counter
result = decc$translate_vms(vms_fixfilename(buf));
- if ( (int) result == 0 || (int) result == -1 ) {
+ if ( (int) result == 0 || (int) result == -1 )
+ {
cnt = 0;
- } else {
+ }
+ else
+ {
cnt = decc$to_vms(result, vms_wproc, 1 /*allow wild*/ , (flags & EW_DIR ? 0:1 ) /*allow directory*/) ;
}
if (cnt > 0)
@@ -524,9 +533,12 @@ mch_expandpath(garray_T *gap, char_u *path, int flags)
// the result from the decc$translate_vms needs to be handled
// otherwise it might create ACCVIO error in decc$to_vms
result = decc$translate_vms(vms_fixfilename(path));
- if ( (int) result == 0 || (int) result == -1 ) {
+ if ( (int) result == 0 || (int) result == -1 )
+ {
cnt = 0;
- } else {
+ }
+ else
+ {
cnt = decc$to_vms(result, vms_wproc, 1 /*allow_wild*/, (flags & EW_DIR ? 0:1 ) /*allow directory*/);
}
if (cnt > 0)
@@ -554,7 +566,8 @@ vms_unix_mixed_filespec(char *in, char *out)
// copy vms filename portion up to last colon
// (node and/or disk)
lastcolon = strrchr(in, ':'); // find last colon
- if (lastcolon != NULL) {
+ if (lastcolon != NULL)
+ {
len = lastcolon - in + 1;
strncpy(out, in, len);
out += len;
@@ -565,25 +578,34 @@ vms_unix_mixed_filespec(char *in, char *out)
// start of directory portion
ch = *in;
- if ((ch == '[') || (ch == '/') || (ch == '<')) { // start of directory(s) ?
+ if ((ch == '[') || (ch == '/') || (ch == '<')) // start of directory(s) ?
+ {
ch = '[';
SKIP_FOLLOWING_SLASHES(in);
- } else if (EQN(in, "../", 3)) { // Unix parent directory?
+ }
+ else if (EQN(in, "../", 3)) // Unix parent directory?
+ {
*out++ = '[';
*out++ = '-';
end_of_dir = out;
ch = '.';
in += 2;
SKIP_FOLLOWING_SLASHES(in);
- } else { // not a special character
- while (EQN(in, "./", 2)) { // Ignore Unix "current dir"
+ }
+ else
+ { // not a special character
+ while (EQN(in, "./", 2)) // Ignore Unix "current dir"
+ {
in += 2;
SKIP_FOLLOWING_SLASHES(in);
}
- if (strchr(in, '/') == NULL) { // any more Unix directories ?
+ if (strchr(in, '/') == NULL) // any more Unix directories ?
+ {
strcpy(out, in); // No - get rest of the spec
return;
- } else {
+ }
+ else
+ {
*out++ = '['; // Yes, denote a Vms subdirectory
ch = '.';
--in;
@@ -596,26 +618,31 @@ vms_unix_mixed_filespec(char *in, char *out)
*out++ = ch;
++in;
- while (*in != '\0') {
+ while (*in != '\0')
+ {
ch = *in;
- if ((ch == ']') || (ch == '/') || (ch == '>') ) { // end of (sub)directory ?
+ if ((ch == ']') || (ch == '/') || (ch == '>') ) // end of (sub)directory ?
+ {
end_of_dir = out;
ch = '.';
SKIP_FOLLOWING_SLASHES(in);
}
- else if (EQN(in, "../", 3)) { // Unix parent directory?
+ else if (EQN(in, "../", 3)) // Unix parent directory?
+ {
*out++ = '-';
end_of_dir = out;
ch = '.';
in += 2;
SKIP_FOLLOWING_SLASHES(in);
}
- else {
- while (EQN(in, "./", 2)) { // Ignore Unix "current dir"
- end_of_dir = out;
- in += 2;
- SKIP_FOLLOWING_SLASHES(in);
- ch = *in;
+ else
+ {
+ while (EQN(in, "./", 2)) // Ignore Unix "current dir"
+ {
+ end_of_dir = out;
+ in += 2;
+ SKIP_FOLLOWING_SLASHES(in);
+ ch = *in;
}
}
@@ -709,9 +736,12 @@ vms_remove_version(void * fname)
*cp = '\0';
else if ((cp = vim_strrchr( fname, '.')) != NULL )
{
- if ((fp = vim_strrchr( fname, ']')) != NULL ) {;}
- else if ((fp = vim_strrchr( fname, '>')) != NULL ) {;}
- else fp = fname;
+ if ((fp = vim_strrchr( fname, ']')) != NULL )
+ {;}
+ else if ((fp = vim_strrchr( fname, '>')) != NULL )
+ {;}
+ else
+ fp = fname;
while ( *fp != '\0' && fp < cp )
if ( *fp++ == '.' )
@@ -750,7 +780,8 @@ RealWaitForChar(
if (!iochan)
get_tty();
- if (sec > 0) {
+ if (sec > 0)
+ {
// time-out specified; convert it to absolute time
// sec>0 requirement of lib$cvtf_to_internal_time()
@@ -780,7 +811,8 @@ RealWaitForChar(
return 0; // error
}
- while (TRUE) {
+ while (TRUE)
+ {
// select()
status = sys$qiow(0, iochan, IO$_SENSEMODE | IO$M_TYPEAHDCNT, iosb,
0, 0, &typeahead, 8, 0, 0, 0, 0);
@@ -791,13 +823,18 @@ RealWaitForChar(
return 1; // ready to read
// there's nothing to read; what now?
- if (msec == 0) {
+ if (msec == 0)
+ {
// immediate time-out; return impatiently
return 0;
- } else if (msec < 0) {
+ }
+ else if (msec < 0)
+ {
// no time-out; wait on indefinitely
return 1; // fakeout to force a wait in vms_read()
- } else {
+ }
+ else
+ {
// time-out needs to be checked
status = sys$gettim(&time_curr);
if (status != SS$_NORMAL)
diff --git a/src/quickfix.c b/src/quickfix.c
index 1454280ee7..e6989ae14e 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -283,7 +283,7 @@ static struct fmtpattern
{'m', ".\\+"}, // 7
#define FMT_PATTERN_R 8
{'r', ".*"}, // 8
- {'p', "[- .]*"}, // 9
+ {'p', "[- .]*"}, // 9
{'v', "\\d\\+"}, // 10
{'s', ".\\+"}, // 11
{'o', ".\\+"} // 12
@@ -3623,7 +3623,8 @@ qf_list_entry(qfline_T *qfp, int qf_idx, int cursel)