Commit 1db5b1ad authored by Juanma Barranquero's avatar Juanma Barranquero

src/*.c: Remove unused parameters and other warnings.

* dispextern.h (string_buffer_position): Remove declaration.

* print.c (strout): Remove parameter `multibyte', unused since
  1999-08-21T19:30:21Z!gerd@gnu.org.  All callers changed.

* search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
  never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
  All callers changed.

* w32.c (_wsa_errlist): Use braces for struct initializers.

* xdisp.c (string_buffer_position_lim): Remove parameter `w',
  never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
  All callers changed.
  (string_buffer_position): Likewise.  Also, make static (it's never
  used outside xdisp.c).
  (cursor_row_p): Remove parameter `w', unused since
  2000-10-17T16:08:57Z!gerd@gnu.org.  All callers changed.
  (decode_mode_spec): Remove parameter `precision', introduced during
  Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
  All callers changed.
parent 39f31873
2011-03-28 Juanma Barranquero <lekktu@gmail.com>
* dispextern.h (string_buffer_position): Remove declaration.
* print.c (strout): Remove parameter `multibyte', unused since
1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
* search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
All callers changed.
* w32.c (_wsa_errlist): Use braces for struct initializers.
* xdisp.c (string_buffer_position_lim): Remove parameter `w',
never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
All callers changed.
(string_buffer_position): Likewise. Also, make static (it's never
used outside xdisp.c).
(cursor_row_p): Remove parameter `w', unused since
2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
(decode_mode_spec): Remove parameter `precision', introduced during
Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
All callers changed.
2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
......@@ -2953,8 +2953,6 @@ extern int bidi_mirror_char (int);
struct glyph_row *row_containing_pos (struct window *, EMACS_INT,
struct glyph_row *,
struct glyph_row *, int);
EMACS_INT string_buffer_position (struct window *, Lisp_Object,
EMACS_INT);
int line_bottom_y (struct it *);
int display_prop_intangible_p (Lisp_Object);
void resize_echo_area_exactly (void);
......
This diff is collapsed.
......@@ -95,10 +95,9 @@ static void save_search_regs (void);
static EMACS_INT simple_search (EMACS_INT, unsigned char *, EMACS_INT,
EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT,
EMACS_INT, EMACS_INT);
static EMACS_INT boyer_moore (EMACS_INT, unsigned char *, EMACS_INT, EMACS_INT,
Lisp_Object, Lisp_Object,
EMACS_INT, EMACS_INT,
EMACS_INT, EMACS_INT, int);
static EMACS_INT boyer_moore (EMACS_INT, unsigned char *, EMACS_INT,
Lisp_Object, Lisp_Object, EMACS_INT,
EMACS_INT, int);
static EMACS_INT search_buffer (Lisp_Object, EMACS_INT, EMACS_INT,
EMACS_INT, EMACS_INT, EMACS_INT, int,
Lisp_Object, Lisp_Object, int);
......@@ -1416,15 +1415,14 @@ search_buffer (Lisp_Object string, EMACS_INT pos, EMACS_INT pos_byte,
}
len_byte = pat - patbuf;
len = raw_pattern_size;
pat = base_pat = patbuf;
if (boyer_moore_ok)
return boyer_moore (n, pat, len, len_byte, trt, inverse_trt,
pos, pos_byte, lim, lim_byte,
return boyer_moore (n, pat, len_byte, trt, inverse_trt,
pos_byte, lim_byte,
char_base);
else
return simple_search (n, pat, len, len_byte, trt,
return simple_search (n, pat, raw_pattern_size, len_byte, trt,
pos, pos_byte, lim, lim_byte);
}
}
......@@ -1636,8 +1634,8 @@ simple_search (EMACS_INT n, unsigned char *pat,
}
/* Do Boyer-Moore search N times for the string BASE_PAT,
whose length is LEN/LEN_BYTE,
from buffer position POS/POS_BYTE until LIM/LIM_BYTE.
whose length is LEN_BYTE,
from buffer position POS_BYTE until LIM_BYTE.
DIRECTION says which direction we search in.
TRT and INVERSE_TRT are translation tables.
Characters in PAT are already translated by TRT.
......@@ -1652,10 +1650,10 @@ simple_search (EMACS_INT n, unsigned char *pat,
static EMACS_INT
boyer_moore (EMACS_INT n, unsigned char *base_pat,
EMACS_INT len, EMACS_INT len_byte,
EMACS_INT len_byte,
Lisp_Object trt, Lisp_Object inverse_trt,
EMACS_INT pos, EMACS_INT pos_byte,
EMACS_INT lim, EMACS_INT lim_byte, int char_base)
EMACS_INT pos_byte, EMACS_INT lim_byte,
int char_base)
{
int direction = ((n > 0) ? 1 : -1);
register EMACS_INT dirlen;
......@@ -1776,8 +1774,8 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat,
stride_for_teases = BM_tab[j];
BM_tab[j] = dirlen - i;
/* A translation table is accompanied by its inverse -- see */
/* comment following downcase_table for details */
/* A translation table is accompanied by its inverse -- see
comment following downcase_table for details. */
if (ch >= 0)
{
int starting_ch = ch;
......
......@@ -4517,75 +4517,75 @@ struct {
int errnum;
char * msg;
} _wsa_errlist[] = {
WSAEINTR , "Interrupted function call",
WSAEBADF , "Bad file descriptor",
WSAEACCES , "Permission denied",
WSAEFAULT , "Bad address",
WSAEINVAL , "Invalid argument",
WSAEMFILE , "Too many open files",
WSAEWOULDBLOCK , "Resource temporarily unavailable",
WSAEINPROGRESS , "Operation now in progress",
WSAEALREADY , "Operation already in progress",
WSAENOTSOCK , "Socket operation on non-socket",
WSAEDESTADDRREQ , "Destination address required",
WSAEMSGSIZE , "Message too long",
WSAEPROTOTYPE , "Protocol wrong type for socket",
WSAENOPROTOOPT , "Bad protocol option",
WSAEPROTONOSUPPORT , "Protocol not supported",
WSAESOCKTNOSUPPORT , "Socket type not supported",
WSAEOPNOTSUPP , "Operation not supported",
WSAEPFNOSUPPORT , "Protocol family not supported",
WSAEAFNOSUPPORT , "Address family not supported by protocol family",
WSAEADDRINUSE , "Address already in use",
WSAEADDRNOTAVAIL , "Cannot assign requested address",
WSAENETDOWN , "Network is down",
WSAENETUNREACH , "Network is unreachable",
WSAENETRESET , "Network dropped connection on reset",
WSAECONNABORTED , "Software caused connection abort",
WSAECONNRESET , "Connection reset by peer",
WSAENOBUFS , "No buffer space available",
WSAEISCONN , "Socket is already connected",
WSAENOTCONN , "Socket is not connected",
WSAESHUTDOWN , "Cannot send after socket shutdown",
WSAETOOMANYREFS , "Too many references", /* not sure */
WSAETIMEDOUT , "Connection timed out",
WSAECONNREFUSED , "Connection refused",
WSAELOOP , "Network loop", /* not sure */
WSAENAMETOOLONG , "Name is too long",
WSAEHOSTDOWN , "Host is down",
WSAEHOSTUNREACH , "No route to host",
WSAENOTEMPTY , "Buffer not empty", /* not sure */
WSAEPROCLIM , "Too many processes",
WSAEUSERS , "Too many users", /* not sure */
WSAEDQUOT , "Double quote in host name", /* really not sure */
WSAESTALE , "Data is stale", /* not sure */
WSAEREMOTE , "Remote error", /* not sure */
WSASYSNOTREADY , "Network subsystem is unavailable",
WSAVERNOTSUPPORTED , "WINSOCK.DLL version out of range",
WSANOTINITIALISED , "Winsock not initialized successfully",
WSAEDISCON , "Graceful shutdown in progress",
{WSAEINTR , "Interrupted function call"},
{WSAEBADF , "Bad file descriptor"},
{WSAEACCES , "Permission denied"},
{WSAEFAULT , "Bad address"},
{WSAEINVAL , "Invalid argument"},
{WSAEMFILE , "Too many open files"},
{WSAEWOULDBLOCK , "Resource temporarily unavailable"},
{WSAEINPROGRESS , "Operation now in progress"},
{WSAEALREADY , "Operation already in progress"},
{WSAENOTSOCK , "Socket operation on non-socket"},
{WSAEDESTADDRREQ , "Destination address required"},
{WSAEMSGSIZE , "Message too long"},
{WSAEPROTOTYPE , "Protocol wrong type for socket"},
{WSAENOPROTOOPT , "Bad protocol option"},
{WSAEPROTONOSUPPORT , "Protocol not supported"},
{WSAESOCKTNOSUPPORT , "Socket type not supported"},
{WSAEOPNOTSUPP , "Operation not supported"},
{WSAEPFNOSUPPORT , "Protocol family not supported"},
{WSAEAFNOSUPPORT , "Address family not supported by protocol family"},
{WSAEADDRINUSE , "Address already in use"},
{WSAEADDRNOTAVAIL , "Cannot assign requested address"},
{WSAENETDOWN , "Network is down"},
{WSAENETUNREACH , "Network is unreachable"},
{WSAENETRESET , "Network dropped connection on reset"},
{WSAECONNABORTED , "Software caused connection abort"},
{WSAECONNRESET , "Connection reset by peer"},
{WSAENOBUFS , "No buffer space available"},
{WSAEISCONN , "Socket is already connected"},
{WSAENOTCONN , "Socket is not connected"},
{WSAESHUTDOWN , "Cannot send after socket shutdown"},
{WSAETOOMANYREFS , "Too many references"}, /* not sure */
{WSAETIMEDOUT , "Connection timed out"},
{WSAECONNREFUSED , "Connection refused"},
{WSAELOOP , "Network loop"}, /* not sure */
{WSAENAMETOOLONG , "Name is too long"},
{WSAEHOSTDOWN , "Host is down"},
{WSAEHOSTUNREACH , "No route to host"},
{WSAENOTEMPTY , "Buffer not empty"}, /* not sure */
{WSAEPROCLIM , "Too many processes"},
{WSAEUSERS , "Too many users"}, /* not sure */
{WSAEDQUOT , "Double quote in host name"}, /* really not sure */
{WSAESTALE , "Data is stale"}, /* not sure */
{WSAEREMOTE , "Remote error"}, /* not sure */
{WSASYSNOTREADY , "Network subsystem is unavailable"},
{WSAVERNOTSUPPORTED , "WINSOCK.DLL version out of range"},
{WSANOTINITIALISED , "Winsock not initialized successfully"},
{WSAEDISCON , "Graceful shutdown in progress"},
#ifdef WSAENOMORE
WSAENOMORE , "No more operations allowed", /* not sure */
WSAECANCELLED , "Operation cancelled", /* not sure */
WSAEINVALIDPROCTABLE , "Invalid procedure table from service provider",
WSAEINVALIDPROVIDER , "Invalid service provider version number",
WSAEPROVIDERFAILEDINIT , "Unable to initialize a service provider",
WSASYSCALLFAILURE , "System call failure",
WSASERVICE_NOT_FOUND , "Service not found", /* not sure */
WSATYPE_NOT_FOUND , "Class type not found",
WSA_E_NO_MORE , "No more resources available", /* really not sure */
WSA_E_CANCELLED , "Operation already cancelled", /* really not sure */
WSAEREFUSED , "Operation refused", /* not sure */
{WSAENOMORE , "No more operations allowed"}, /* not sure */
{WSAECANCELLED , "Operation cancelled"}, /* not sure */
{WSAEINVALIDPROCTABLE , "Invalid procedure table from service provider"},
{WSAEINVALIDPROVIDER , "Invalid service provider version number"},
{WSAEPROVIDERFAILEDINIT , "Unable to initialize a service provider"},
{WSASYSCALLFAILURE , "System call failure"},
{WSASERVICE_NOT_FOUND , "Service not found"}, /* not sure */
{WSATYPE_NOT_FOUND , "Class type not found"},
{WSA_E_NO_MORE , "No more resources available"}, /* really not sure */
{WSA_E_CANCELLED , "Operation already cancelled"}, /* really not sure */
{WSAEREFUSED , "Operation refused"}, /* not sure */
#endif
WSAHOST_NOT_FOUND , "Host not found",
WSATRY_AGAIN , "Authoritative host not found during name lookup",
WSANO_RECOVERY , "Non-recoverable error during name lookup",
WSANO_DATA , "Valid name, no data record of requested type",
{WSAHOST_NOT_FOUND , "Host not found"},
{WSATRY_AGAIN , "Authoritative host not found during name lookup"},
{WSANO_RECOVERY , "Non-recoverable error during name lookup"},
{WSANO_DATA , "Valid name, no data record of requested type"},
-1, NULL
{-1, NULL}
};
char *
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment