summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/syntax.txt14
-rw-r--r--runtime/doc/todo.txt2
-rw-r--r--src/buffer.c6
-rw-r--r--src/dosinst.c36
-rw-r--r--src/edit.c36
-rw-r--r--src/ex_getln.c7
-rw-r--r--src/getchar.c17
-rw-r--r--src/gui.c7
-rw-r--r--src/gui_athena.c15
-rw-r--r--src/gui_gtk_x11.c46
-rw-r--r--src/gui_motif.c18
-rw-r--r--src/gui_w32.c62
-rw-r--r--src/gui_x11.c11
-rw-r--r--src/hashtab.c15
-rw-r--r--src/if_py_both.h2
-rw-r--r--src/if_tcl.c7
-rw-r--r--src/integration.c112
-rw-r--r--src/integration.h9
-rw-r--r--src/main.c4
-rw-r--r--src/memline.c20
-rw-r--r--src/misc1.c18
-rw-r--r--src/misc2.c21
-rw-r--r--src/move.c47
-rw-r--r--src/netbeans.c25
-rw-r--r--src/os_unix.c6
-rw-r--r--src/popupmnu.c11
-rw-r--r--src/screen.c11
-rw-r--r--src/syntax.c7
-rw-r--r--src/ui.c58
-rw-r--r--src/uninstal.c24
-rw-r--r--src/workshop.c55
31 files changed, 15 insertions, 714 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index c34b10c2cf..9a65d814dc 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.3e. Last change: 2010 Aug 04
+*syntax.txt* For Vim version 7.3e. Last change: 2010 Aug 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -92,12 +92,12 @@ highlighting, include the ":gui" command in the |gvimrc|: >
NOTE: Using ":gui" in the |gvimrc| means that "gvim -f" won't start in the
foreground! Use ":gui -f" then.
-
-You can toggle the syntax on/off with this command >
- :if exists("syntax_on") | syntax off | else | syntax enable | endif
+ *g:syntax_on*
+You can toggle the syntax on/off with this command: >
+ :if exists("g:syntax_on") | syntax off | else | syntax enable | endif
To put this into a mapping, you can use: >
- :map <F7> :if exists("syntax_on") <Bar>
+ :map <F7> :if exists("g:syntax_on") <Bar>
\ syntax off <Bar>
\ else <Bar>
\ syntax enable <Bar>
@@ -925,7 +925,7 @@ Example: >
or >
// vim:syntax=c.doxygen
-It can also be done automatically for c, cpp and idl files by setting the
+It can also be done automatically for C, C++, C# and IDL files by setting the
global or buffer-local variable load_doxygen_syntax. This is done by adding
the following to your .vimrc. >
:let g:load_doxygen_syntax=1
@@ -3168,7 +3168,7 @@ and may be mixed with patterns.
Not all commands accept all arguments. This table shows which arguments
can not be used for all commands:
- *E395* *E396*
+ *E395*
contains oneline fold display extend concealends~
:syntax keyword - - - - - -
:syntax match yes - yes yes yes -
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index e4bdbc5134..f10ee6943a 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -33,8 +33,6 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
Before release 7.3:
- Rename vim73 branch to default (hints: Xavier de Gaye, 2010 May 23)
-Should readfile() ignore BOM when not in binary mode?
-
Bug: searching for tags file uses 'suffixesadd', should not happen. (Dominique
Pelle, 2010 June 28)
diff --git a/src/buffer.c b/src/buffer.c
index 0b3742b309..ad484b452e 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -398,13 +398,7 @@ close_buffer(win, buf, action)
/* Return when a window is displaying the buffer or when it's not
* unloaded. */
if (buf->b_nwindows > 0 || !unload_buf)
- {
-#if 0 /* why was this here? */
- if (buf == curbuf)
- u_sync(); /* sync undo before going to another buffer */
-#endif
return;
- }
/* Always remove the buffer when there is no file name. */
if (buf->b_ffname == NULL)
diff --git a/src/dosinst.c b/src/dosinst.c
index 84d171baf9..0ff8e69b69 100644
--- a/src/dosinst.c
+++ b/src/dosinst.c
@@ -32,9 +32,6 @@ char *default_bat_dir = NULL; /* when not NULL, use this as the default
directory to write .bat files in */
char *default_vim_dir = NULL; /* when not NULL, use this as the default
install dir for NSIS */
-#if 0
-char homedir[BUFSIZE]; /* home directory or "" */
-#endif
/*
* Structure used for each choice the user can make.
@@ -720,39 +717,6 @@ inspect_system(void)
fclose(fd);
else
*oldvimrc = NUL;
-
-#if 0 /* currently not used */
- /*
- * Get default home directory.
- * Prefer $HOME if it's set. For Win NT use $HOMEDRIVE and $HOMEPATH.
- * Otherwise, if there is a "c:" drive use that.
- */
- p = getenv("HOME");
- if (p != NULL && *p != NUL && strlen(p) < BUFSIZE)
- strcpy(homedir, p);
- else
- {
- p = getenv("HOMEDRIVE");
- if (p != NULL && *p != NUL && strlen(p) + 2 < BUFSIZE)
- {
- strcpy(homedir, p);
- p = getenv("HOMEPATH");
- if (p != NULL && *p != NUL && strlen(homedir) + strlen(p) < BUFSIZE)
- strcat(homedir, p);
- else
- strcat(homedir, "\\");
- }
- else
- {
- struct stat st;
-
- if (stat("c:\\", &st) == 0)
- strcpy(homedir, "c:\\");
- else
- *homedir = NUL;
- }
- }
-#endif
}
/*
diff --git a/src/edit.c b/src/edit.c
index ed5b79859f..04a17ebf77 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -192,9 +192,6 @@ static int spell_bad_len = 0; /* length of located bad word */
#endif
static void stop_insert __ARGS((pos_T *end_insert_pos, int esc));
static int echeck_abbr __ARGS((int));
-#if 0
-static void replace_push_off __ARGS((int c));
-#endif
static int replace_pop __ARGS((void));
static void replace_join __ARGS((int off));
static void replace_pop_ins __ARGS((void));
@@ -3352,19 +3349,6 @@ ins_compl_new_leader()
compl_restarting = FALSE;
}
-#if 0 /* disabled, made CTRL-L, BS and typing char jump to original text. */
- if (!compl_used_match)
- {
- /* Go to the original text, since none of the matches is inserted. */
- if (compl_first_match->cp_prev != NULL
- && (compl_first_match->cp_prev->cp_flags & ORIGINAL_TEXT))
- compl_shown_match = compl_first_match->cp_prev;
- else
- compl_shown_match = compl_first_match;
- compl_curr_match = compl_shown_match;
- compl_shows_dir = compl_direction;
- }
-#endif
compl_enter_selects = !compl_used_match;
/* Show the popup menu with a different set of matches. */
@@ -7152,26 +7136,6 @@ replace_push_mb(p)
}
#endif
-#if 0
-/*
- * call replace_push(c) with replace_offset set to the first NUL.
- */
- static void
-replace_push_off(c)
- int c;
-{
- char_u *p;
-
- p = replace_stack + replace_stack_nr;
- for (replace_offset = 1; replace_offset < replace_stack_nr;
- ++replace_offset)
- if (*--p == NUL)
- break;
- replace_push(c);
- replace_offset = 0;
-}
-#endif
-
/*
* Pop one item from the replace stack.
* return -1 if stack empty
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 8a18a4cce7..2475bb9c12 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -640,13 +640,6 @@ getcmdline(firstc, count, indent)
c = p_wc;
}
}
-#if 0 /* If enabled <Down> on a file takes you _completely_ out of wildmenu */
- if (p_wmnu
- && (xpc.xp_context == EXPAND_FILES
- || xpc.xp_context == EXPAND_MENUNAMES)
- && (c == K_UP || c == K_DOWN))
- xpc.xp_context = EXPAND_NOTHING;
-#endif
#endif /* FEAT_WILDMENU */
diff --git a/src/getchar.c b/src/getchar.c
index f1a4dda06d..c892b46454 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -5087,13 +5087,6 @@ static struct initmap
#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
/* Use the Windows (CUA) keybindings. */
# ifdef FEAT_GUI
-# if 0 /* These are now used to move tab pages */
- {(char_u *)"<C-PageUp> H", NORMAL+VIS_SEL},
- {(char_u *)"<C-PageUp> <C-O>H",INSERT},
- {(char_u *)"<C-PageDown> L$", NORMAL+VIS_SEL},
- {(char_u *)"<C-PageDown> <C-O>L<C-O>$", INSERT},
-# endif
-
/* paste, copy and cut */
{(char_u *)"<S-Insert> \"*P", NORMAL},
{(char_u *)"<S-Insert> \"-d\"*P", VIS_SEL},
@@ -5104,12 +5097,6 @@ static struct initmap
{(char_u *)"<C-X> \"*d", VIS_SEL},
/* Missing: CTRL-C (cancel) and CTRL-V (block selection) */
# else
-# if 0 /* These are now used to move tab pages */
- {(char_u *)"\316\204 H", NORMAL+VIS_SEL}, /* CTRL-PageUp is "H" */
- {(char_u *)"\316\204 \017H",INSERT}, /* CTRL-PageUp is "^OH"*/
- {(char_u *)"\316v L$", NORMAL+VIS_SEL}, /* CTRL-PageDown is "L$" */
- {(char_u *)"\316v \017L\017$", INSERT}, /* CTRL-PageDown ="^OL^O$"*/
-# endif
{(char_u *)"\316w <C-Home>", NORMAL+VIS_SEL},
{(char_u *)"\316w <C-Home>", INSERT+CMDLINE},
{(char_u *)"\316u <C-End>", NORMAL+VIS_SEL},
@@ -5119,7 +5106,7 @@ static struct initmap
# ifdef FEAT_CLIPBOARD
# ifdef DJGPP
{(char_u *)"\316\122 \"*P", NORMAL}, /* SHIFT-Insert is "*P */
- {(char_u *)"\316\122 \"-d\"*P", VIS_SEL}, /* SHIFT-Insert is "-d"*P */
+ {(char_u *)"\316\122 \"-d\"*P", VIS_SEL}, /* SHIFT-Insert is "-d"*P */
{(char_u *)"\316\122 \022\017*", INSERT}, /* SHIFT-Insert is ^R^O* */
{(char_u *)"\316\222 \"*y", VIS_SEL}, /* CTRL-Insert is "*y */
# if 0 /* Shift-Del produces the same code as Del */
@@ -5129,7 +5116,7 @@ static struct initmap
{(char_u *)"\030 \"-d", VIS_SEL}, /* CTRL-X is "-d */
# else
{(char_u *)"\316\324 \"*P", NORMAL}, /* SHIFT-Insert is "*P */
- {(char_u *)"\316\324 \"-d\"*P", VIS_SEL}, /* SHIFT-Insert is "-d"*P */
+ {(char_u *)"\316\324 \"-d\"*P", VIS_SEL}, /* SHIFT-Insert is "-d"*P */
{(char_u *)"\316\324 \022\017*", INSERT}, /* SHIFT-Insert is ^R^O* */
{(char_u *)"\316\325 \"*y", VIS_SEL}, /* CTRL-Insert is "*y */
{(char_u *)"\316\327 \"*d", VIS_SEL}, /* SHIFT-Del is "*d */
diff --git a/src/gui.c b/src/gui.c
index 90209bedcf..87930c6b73 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -1571,14 +1571,7 @@ gui_write(s, len)
{
char_u *p;
int arg1 = 0, arg2 = 0;
- /* this doesn't make sense, disabled until someone can explain why it
- * would be needed */
-#if 0 && (defined(RISCOS) || defined(WIN16))
- int force_cursor = TRUE; /* JK230798, stop Vim being smart or
- our redraw speed will suffer */
-#else
int force_cursor = FALSE; /* force cursor update */
-#endif
int force_scrollbar = FALSE;
static win_T *old_curwin = NULL;
diff --git a/src/gui_athena.c b/src/gui_athena.c
index ffb65ae2f0..7cd08c6e36 100644
--- a/src/gui_athena.c
+++ b/src/gui_athena.c
@@ -236,21 +236,6 @@ gui_x11_create_widgets()
*/
gui.border_offset = gui.border_width;
-#if 0 /* not needed? */
- XtInitializeWidgetClass(formWidgetClass);
- XtInitializeWidgetClass(boxWidgetClass);
- XtInitializeWidgetClass(coreWidgetClass);
-#ifdef FEAT_MENU
- XtInitializeWidgetClass(menuButtonWidgetClass);
-#endif
- XtInitializeWidgetClass(simpleMenuWidgetClass);
-#ifdef FEAT_GUI_NEXTAW
- XtInitializeWidgetClass(scrollbarWidgetClass);
-#else
- XtInitializeWidgetClass(vim_scrollbarWidgetClass);
-#endif
-#endif
-
/* The form containing all the other widgets */
vimForm = XtVaCreateManagedWidget("vimForm",
formWidgetClass, vimShell,
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 2a4b520640..76ca4fef75 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -4484,52 +4484,6 @@ gui_mch_get_font(char_u *name, int report_error)
return NULL;
}
- /*
- * The fixed-width check has been disabled for GTK+ 2. Rationale:
- *
- * - The check tends to report false positives, particularly
- * in non-Latin locales or with old X fonts.
- * - Thanks to our fixed-width hack in gui_gtk2_draw_string(),
- * GTK+ 2 Vim is actually capable of displaying variable width
- * fonts. Those will just be spaced out like in AA xterm.
- * - Failing here for the default font causes GUI startup to fail
- * even with wiped out configuration files.
- * - The font dialog displays all fonts unfiltered, and it's rather
- * annoying if 95% of the listed fonts produce an error message.
- */
-#if 0
- {
- /* Check that this is a mono-spaced font. Naturally, this is a bit
- * hackish -- fixed-width isn't really suitable for i18n text :/ */
- PangoLayout *layout;
- unsigned int i;
- int last_width = -1;
- const char test_chars[] = { 'W', 'i', ',', 'x' }; /* arbitrary */
-
- layout = pango_layout_new(gui.text_context);
- pango_layout_set_font_description(layout, font);
-
- for (i = 0; i < G_N_ELEMENTS(test_chars); ++i)
- {
- int width;
-
- pango_layout_set_text(layout, &test_chars[i], 1);
- pango_layout_get_size(layout, &width, NULL);
-
- if (last_width >= 0 && width != last_width)
- {
- pango_font_description_free(font);
- font = NULL;
- break;
- }
-
- last_width = width;
- }
-
- g_object_unref(layout);
- }
-#endif
-
return font;
}
diff --git a/src/gui_motif.c b/src/gui_motif.c
index 397ab597d5..51e6112ccd 100644
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -1335,18 +1335,11 @@ gui_mch_add_menu_item(menu, idx)
else
wid = 4;
-#if 0
- /* We better use a FormWidget here, since it's far more
- * flexible in terms of size. */
- type = xmFormWidgetClass;
- XtSetArg(args[n], XmNwidth, wid); n++;
-#else
type = xmSeparatorWidgetClass;
XtSetArg(args[n], XmNwidth, wid); n++;
XtSetArg(args[n], XmNminWidth, wid); n++;
XtSetArg(args[n], XmNorientation, XmVERTICAL); n++;
XtSetArg(args[n], XmNseparatorType, XmSHADOW_ETCHED_IN); n++;
-#endif
}
else
{
@@ -2947,17 +2940,6 @@ gui_mch_compute_footer_height()
return (int) height + top + bottom + (shadow << 1);
}
-#if 0 /* not used */
- void
-gui_mch_set_footer_pos(h)
- int h; /* textArea height */
-{
- XtVaSetValues(footer,
- XmNtopOffset, h + 7,
- NULL);
-}
-#endif
-
void
gui_mch_enable_footer(showit)
int showit;
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 1fdc99396e..3a54e817e2 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -682,40 +682,6 @@ _OnSettingChange(UINT n)
return 0;
}
-#if 0 /* disabled, a gap appears below and beside the window, and the window
- can be moved (in a strange way) */
-/*
- * Even though we have _DuringSizing() which makes the rubber band a valid
- * size, we need this for when the user maximises the window.
- * TODO: Doesn't seem to adjust the width though for some reason.
- */
- static BOOL
-_OnWindowPosChanging(
- HWND hwnd,
- LPWINDOWPOS lpwpos)
-{
- RECT workarea_rect;
-
- if (!(lpwpos->flags & SWP_NOSIZE))
- {
- if (IsMaximized(hwnd)
- && (os_version.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS
- || (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT
- && os_version.dwMajorVersion >= 4)))
- {
- SystemParametersInfo(SPI_GETWORKAREA, 0, &workarea_rect, 0);
- lpwpos->x = workarea_rect.left;
- lpwpos->y = workarea_rect.top;
- lpwpos->cx = workarea_rect.right - workarea_rect.left;
- lpwpos->cy = workarea_rect.bottom - workarea_rect.top;
- }
- gui_mswin_get_valid_dimensions(lpwpos->cx, lpwpos->cy,
- &lpwpos->cx, &lpwpos->cy);
- }
- return 0;
-}
-#endif
-
#ifdef FEAT_NETBEANS_INTG
static void
_OnWindowPosChanged(
@@ -3078,14 +3044,8 @@ gui_mch_dialog(
return dfltbutton; /* return default option */
#endif
-#if 0
- /* If there is no window yet, open it. */
- if (s_hwnd == NULL && gui_mch_init() == FAIL)
- return dfltbutton;
-#else
if (s_hwnd == NULL)
get_dialog_font_metrics();
-#endif
if ((type < 0) || (type > VIM_LAST_TYPE))
type = 0;
@@ -3443,15 +3403,6 @@ gui_mch_dialog(
DLG_NONBUTTON_CONTROL + 0, (WORD)0x0082,
dlg_icons[type]);
-#if 0
- /* Dialog message */
- p = add_dialog_element(p, SS_LEFT,
- PixelToDialogX(2 * dlgPaddingX + DLG_ICON_WIDTH),
- PixelToDialogY(dlgPaddingY),
- (WORD)(PixelToDialogX(messageWidth) + 1),
- PixelToDialogY(msgheight),
- DLG_NONBUTTON_CONTROL + 1, (WORD)0x0082, message);
-#else
/* Dialog message */
p = add_dialog_element(p, ES_LEFT|scroll_flag|ES_MULTILINE|ES_READONLY,
PixelToDialogX(2 * dlgPaddingX + DLG_ICON_WIDTH),
@@ -3459,7 +3410,6 @@ gui_mch_dialog(
(WORD)(PixelToDialogX(messageWidth) + 1),
PixelToDialogY(msgheight),
DLG_NONBUTTON_CONTROL + 1, (WORD)0x0081, message);
-#endif
/* Edit box */
if (textfield != NULL)
@@ -4289,18 +4239,6 @@ dyn_imm_load(void)
return;
}
-# if 0 /* not used */
- int
-dyn_imm_unload(void)
-{
- if (!hLibImm)
- return FALSE;
- FreeLibrary(hLibImm);
- hLibImm = NULL;
- return TRUE;
-}
-# endif
-
#endif
#if defined(FEAT_SIGN_ICONS) || defined(PROTO)
diff --git a/src/gui_x11.c b/src/gui_x11.c
index f955bc85d3..b61aae0779 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -3392,17 +3392,6 @@ gui_x11_get_last_mouse_event()
* to provide room for the bitmap! */
# define SIGN_WIDTH (gui.char_width * 2)
-#if 0 /* not used */
- void
-gui_mch_clearsign(row)
- int row;
-{
- if (gui.in_use)
- XClearArea(gui.dpy, gui.wid, 0, TEXT_Y(row) - gui.char_height,
- SIGN_WIDTH, gui.char_height, FALSE);
-}
-#endif
-
void
gui_mch_drawsign(row, col, typenr)
int row;
diff --git a/src/hashtab.c b/src/hashtab.c
index e0d3e1a081..8b53aa4018 100644
--- a/src/hashtab.c
+++ b/src/hashtab.c
@@ -492,25 +492,10 @@ hash_hash(key)
want to crash if we get one. */
p = key + 1;
-#if 0
- /* ElfHash algorithm, which is supposed to have an even distribution.
- * Suggested by Charles Campbell. */
- hash_T g;
-
- while (*p != NUL)
- {
- hash = (hash << 4) + *p++; /* clear low 4 bits of hash, add char */
- g = hash & 0xf0000000L; /* g has high 4 bits of hash only */
- if (g != 0)
- hash ^= g >> 24; /* xor g's high 4 bits into hash */
- }
-#else
-
/* A simplistic algorithm that appears to do very well.
* Suggested by George Reilly. */
while (*p != NUL)
hash = hash * 101 + *p++;
-#endif
return hash;
}
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 8a2e32bb11..10c614855b 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -405,7 +405,7 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookupDict)
#endif
static PyObject *
-VimEval(PyObject *self UNUSED, PyObject *args)
+VimEval(PyObject *self UNUSED, PyObject *args UNUSED)
{
#ifdef FEAT_EVAL
char *expr;
diff --git a/src/if_tcl.c b/src/if_tcl.c
index 6ec48cc053..f87407d4f9 100644
--- a/src/if_tcl.c
+++ b/src/if_tcl.c
@@ -1494,13 +1494,6 @@ tclgetref(interp, refstartP, prefix, vimobj, proc)
else
{
ref = (struct ref *)Tcl_Alloc(sizeof(struct ref));
-#if 0 /* Tcl_Alloc either succeeds or does not return */
- if (!ref)
- {
- Tcl_SetResult(interp, "out of memory", TCL_STATIC);
- return NULL;
- }
-#endif
ref->interp = NULL;
ref->next = (struct ref *)(*refstartP);
(*refstartP) = (void *)ref;
diff --git a/src/integration.c b/src/integration.c
index 88962755bf..8de684c073 100644
--- a/src/integration.c
+++ b/src/integration.c
@@ -392,7 +392,7 @@ messageFromEserve(XtPointer clientData UNUSED,
pingNum = atoi(&cmd[5]);
workshop_send_ack(ackNum);
- WHAT DO I DO HERE?
+ /* WHAT DO I DO HERE? */
#endif
}
HANDLE_ERRORS(cmd);
@@ -754,51 +754,6 @@ void workshop_disconnect()
* Utility functions
*/
-#if 0
-/* Set icon for the window */
-void
-workshop_set_icon(Display *display, Widget shell, char **xpmdata,
- int width, int height)
-{
- Pixel bgPixel;
- XpmAttributes xpmAttributes;
- XSetWindowAttributes attr;
- Window iconWindow;
- int depth;
- int screenNum;
- Pixmap pixmap;
-
- /* Create the pixmap/icon window which is shown when you
- * iconify the sccs viewer
- * This code snipped was adapted from Sun WorkShop's source base,
- * setIcon.cc.
- */
- XtVaGetValues(shell, XmNbackground, &bgPixel, NULL);
- screenNum = XScreenNumberOfScreen(XtScreen(shell));
- depth = DisplayPlanes(display, screenNum);
- xpmAttributes.valuemask = XpmColorSymbols;
- xpmAttributes.numsymbols = 1;
- xpmAttributes.colorsymbols =
- (XpmColorSymbol *)XtMalloc(sizeof (XpmColorSymbol) *
- xpmAttributes.numsymbols);
- xpmAttributes.colorsymbols[0].name = NOCATGETS("BgColor");
- xpmAttributes.colorsymbols[0].value = NULL;
- xpmAttributes.colorsymbols[0].pixel = bgPixel;
- if (XpmCreatePixmapFromData(display,
- RootWindow(display, screenNum), xpmdata, &pixmap,
- NULL, &xpmAttributes) >= 0) {
- attr.background_pixmap = pixmap;
- iconWindow = XCreateWindow(display, RootWindow(display,
- screenNum), 0, 0, width, height, 0, depth,
- (unsigned int)CopyFromParent,
- CopyFromParent, CWBackPixmap, &attr);
-
- XtVaSetValues(shell,
- XtNiconWindow, iconWindow, NULL);
- }
- XtFree((char *)xpmAttributes.colorsymbols);
-}
-#endif
/* Minimize and maximize shells. From libutil's shell.cc. */
@@ -933,39 +888,6 @@ Boolean workshop_get_width_height(int *width, int *height)
return success;
}
-#if 0
-Boolean workshop_get_rows_cols(int *rows, int *cols)
-{
- static int r = 0;
- static int c = 0;
- static Boolean firstTime = True;
- static Boolean success = False;
-
- if (firstTime) {
- char *settings;
-
- settings = getenv(NOCATGETS("SPRO_GUI_ROWS_COLS"));
- if (settings != NULL) {
- r = atoi(settings);
- settings = strrchr(settings, ':');
- if (settings++ != NULL) {
- c = atoi(settings);
- }
- if (r > 0 && c > 0) {
- success = True;
- }
- firstTime = False;
- }
- }
-
- if (success) {
- *rows = r;
- *cols = c;
- }
- return success;
-}
-#endif
-
/*
* Toolbar code
*/
@@ -1050,20 +972,6 @@ void workshop_set_option_first(char *name, char *value)
}
-#if 0
-/*
- * Send information to eserve on certain editor events
- * You must make sure these are called when necessary
- */
-void workshop_file_closed(char *filename)
-{
- char buffer[2*MAXPATHLEN];
- vim_snprintf(buffer, sizeof(buffer),
- NOCATGETS("deletedFile %s\n"), filename);
- dummy = write(sd, buffer, strlen(buffer));
-}
-#endif
-
void workshop_file_closed_lineno(char *filename, int lineno)
{
char buffer[2*MAXPATHLEN];
@@ -1093,24 +1001,6 @@ void workshop_file_saved(char *filename)
workshop_moved_marks(filename);
}
-#if 0
-void workshop_file_modified(char *filename)
-{
- char buffer[2*MAXPATHLEN];
- vim_snprintf(buffer, sizeof(buffer),
- NOCATGETS("modifiedFile %s\n"), filename);
- dummy = write(sd, buffer, strlen(buffer));
-}
-
-void workshop_move_mark(char *filename, int markId, int newLineno)
-{
- char buffer[2*MAXPATHLEN];
- vim_snprintf(buffer, sizeof(buffer),
- NOCATGETS("moveMark %s %d %d\n"), filename, markId, newLineno);
- dummy = write(sd, buffer, strlen(buffer));
-}
-#endif
-
void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h)
{
char buffer[200];
diff --git a/src/integration.h b/src/integration.h
index e984f56cae..65daea77d4 100644
--- a/src/integration.h
+++ b/src/integration.h
@@ -410,15 +410,6 @@ void workshop_hotkey_pressed(void *frame, void *clientData);
int workshop_invoked(void);
#endif
-#if 0
-/*
- *Set the desktop icon of the current shell to the given xpm icon.
- * Standard WorkShop desktop icons should be 48x48.
- */
-void workshop_set_icon(Display *display, Widget shell, char **xpmdata,
- int width, int height);
-#endif
-
/* Minimize (iconify) the given shell */
void workshop_minimize_shell(Widget shell);
diff --git a/src/main.c b/src/main.c
index cadc2efd28..435e6074e6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -3255,10 +3255,6 @@ usage()
# endif
main_msg(_("-display <display>\tRun vim on <display>"));
main_msg(_("-iconic\t\tStart vim iconified"));
-# if 0
- main_msg(_("-name <name>\t\tUse resource as if vim was <name>"));
- mch_msg(_("\t\t\t (Unimplemented)\n"));
-# endif
main_msg(_("-background <color>\tUse <color> for the background (also: -bg)"));
main_msg(_("-foreground <color>\tUse <color> for normal text (also: -fg)"));
main_msg(_("-font <font>\t\tUse <font> for normal text (also: -fn)"));
diff --git a/src/memline.c b/src/memline.c
index 16b3b3561b..136f805083 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -3355,26 +3355,6 @@ ml_firstmarked()
return (linenr_T) 0;
}
-#if 0 /* not used */
-/*
- * return TRUE if line 'lnum' has a mark
- */
- int
-ml_has_mark(lnum)
- linenr_T lnum;
-{
- bhdr_T *hp;
- DATA_BL *dp;
-
- if (curbuf->b_ml.ml_mfp == NULL
- || (hp = ml_find_line(curbuf, lnum, ML_FIND)) == NULL)
- return FALSE;
-
- dp = (DATA_BL *)(hp->bh_data);
- return (int)((dp->db_index[lnum - curbuf->b_ml.ml_locked_low]) & DB_MARKED);
-}
-#endif
-
/*
* clear all DB_MARKED flags
*/
diff --git a/src/misc1.c b/src/misc1.c
index ef7c10c5e9..911ba4a217 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2413,24 +2413,6 @@ pchar_cursor(c)
+ curwin->w_cursor.col) = c;
}
-#if 0 /* not used */
-/*
- * Put *pos at end of current buffer
- */
- void
-goto_endofbuf(pos)
- pos_T *pos;
-{
- char_u *p;
-
- pos->lnum = curbuf->b_ml.ml_line_count;
- pos->col = 0;
- p = ml_get(pos->lnum);
- while (*p++)
- ++pos->col;
-}
-#endif
-
/*
* When extra == 0: Return TRUE if the cursor is before or on the first
* non-blank in the line.
diff --git a/src/misc2.c b/src/misc2.c
index 8492b3e815..21c5b42e91 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1824,27 +1824,6 @@ vim_strnicmp(s1, s2, len)
}
#endif
-#if 0 /* currently not used */
-/*
- * Check if string "s2" appears somewhere in "s1" while ignoring case.
- * Return NULL if not, a pointer to the first occurrence if it does.
- */
- char_u *
-vim_stristr(s1, s2)
- char_u *s1;
- char_u *s2;
-{
- char_u *p;
- int len = STRLEN(s2);
- char_u *end = s1 + STRLEN(s1) - len;
-
- for (p = s1; p <= end; ++p)
- if (STRNICMP(p, s2, len) == 0)
- return p;
- return NULL;
-}
-#endif
-
/*
* Version of strchr() and strrchr() that handle unsigned char strings
* with characters from 128 to 255 correctly. It also doesn't return a
diff --git a/src/move.c b/src/move.c
index 3dd45c00db..173063134a 100644
--- a/src/move.c
+++ b/src/move.c
@@ -543,19 +543,6 @@ changed_cline_bef_curs_win(wp)
|VALID_CHEIGHT|VALID_TOPLINE);
}
-#if 0 /* not used */
-/*
- * Call this function when the length of the cursor line (in screen
- * characters) has changed, and the position of the cursor doesn't change.
- * Need to take care of w_botline separately!
- */
- void
-changed_cline_aft_curs()
-{
- curwin->