summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2010-04-25 10:14:48 +0200
committerCarmelo Amoroso <carmelo.amoroso@st.com>2010-04-25 10:14:48 +0200
commitf71bcf0f42bf6926477cc3e3faa006cf74e59c45 (patch)
treeae05a12267d2bfa4c9384bfd0cd43d2659740a92
parentcce1105f017744ad2d6b7b86d8a3160637bebea1 (diff)
libc: Remove compiler warning due to old-style function definition
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
-rw-r--r--libc/inet/rpc/clnt_raw.c11
-rw-r--r--libc/inet/rpc/clnt_tcp.c22
-rw-r--r--libc/inet/rpc/clnt_udp.c16
-rw-r--r--libc/inet/rpc/clnt_unix.c18
-rw-r--r--libc/inet/rpc/pm_getport.c7
-rw-r--r--libc/inet/rpc/pmap_prot.c4
-rw-r--r--libc/inet/rpc/pmap_prot2.c4
-rw-r--r--libc/inet/rpc/pmap_rmt.c32
-rw-r--r--libc/inet/rpc/rcmd.c24
-rw-r--r--libc/inet/rpc/rexec.c7
-rw-r--r--libc/inet/rpc/ruserpass.c2
-rw-r--r--libc/inet/rpc/svc_raw.c4
-rw-r--r--libc/inet/rpc/svc_udp.c30
-rw-r--r--libc/inet/rpc/xdr.c8
-rw-r--r--libc/inet/rpc/xdr_array.c8
-rw-r--r--libc/inet/rpc/xdr_float.c8
-rw-r--r--libc/inet/rpc/xdr_mem.c4
-rw-r--r--libc/inet/rpc/xdr_reference.c6
-rw-r--r--libc/misc/regex/regexec.c84
19 files changed, 93 insertions, 206 deletions
diff --git a/libc/inet/rpc/clnt_raw.c b/libc/inet/rpc/clnt_raw.c
index 4c4c8251d..75dd98286 100644
--- a/libc/inet/rpc/clnt_raw.c
+++ b/libc/inet/rpc/clnt_raw.c
@@ -133,14 +133,9 @@ clntraw_create (u_long prog, u_long vers)
}
static enum clnt_stat
-clntraw_call (h, proc, xargs, argsp, xresults, resultsp, timeout)
- CLIENT *h;
- u_long proc;
- xdrproc_t xargs;
- caddr_t argsp;
- xdrproc_t xresults;
- caddr_t resultsp;
- struct timeval timeout attribute_unused;
+clntraw_call (CLIENT *h, u_long proc, xdrproc_t xargs, caddr_t argsp,
+ xdrproc_t xresults, caddr_t resultsp,
+ struct timeval timeout attribute_unused)
{
struct clntraw_private_s *clp = clntraw_private;
XDR *xdrs = &clp->xdr_stream;
diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c
index 26abc3e17..d01fc80d5 100644
--- a/libc/inet/rpc/clnt_tcp.c
+++ b/libc/inet/rpc/clnt_tcp.c
@@ -237,14 +237,9 @@ fooy:
libc_hidden_def(clnttcp_create)
static enum clnt_stat
-clnttcp_call (h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
- CLIENT *h;
- u_long proc;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
- xdrproc_t xdr_results;
- caddr_t results_ptr;
- struct timeval timeout;
+clnttcp_call (CLIENT *h, u_long proc, xdrproc_t xdr_args, caddr_t args_ptr,
+ xdrproc_t xdr_results, caddr_t results_ptr,
+ struct timeval timeout)
{
struct ct_data *ct = (struct ct_data *) h->cl_private;
XDR *xdrs = &(ct->ct_xdrs);
@@ -345,9 +340,7 @@ call_again:
}
static void
-clnttcp_geterr (h, errp)
- CLIENT *h;
- struct rpc_err *errp;
+clnttcp_geterr (CLIENT *h, struct rpc_err *errp)
{
struct ct_data *ct =
(struct ct_data *) h->cl_private;
@@ -356,10 +349,7 @@ clnttcp_geterr (h, errp)
}
static bool_t
-clnttcp_freeres (cl, xdr_res, res_ptr)
- CLIENT *cl;
- xdrproc_t xdr_res;
- caddr_t res_ptr;
+clnttcp_freeres (CLIENT *cl, xdrproc_t xdr_res, caddr_t res_ptr)
{
struct ct_data *ct = (struct ct_data *) cl->cl_private;
XDR *xdrs = &(ct->ct_xdrs);
@@ -369,7 +359,7 @@ clnttcp_freeres (cl, xdr_res, res_ptr)
}
static void
-clnttcp_abort ()
+clnttcp_abort (void)
{
}
diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c
index ff04cbba5..fe8b7f8e6 100644
--- a/libc/inet/rpc/clnt_udp.c
+++ b/libc/inet/rpc/clnt_udp.c
@@ -260,14 +260,14 @@ is_network_up (int sock)
}
static enum clnt_stat
-clntudp_call (cl, proc, xargs, argsp, xresults, resultsp, utimeout)
- CLIENT *cl; /* client handle */
- u_long proc; /* procedure number */
- xdrproc_t xargs; /* xdr routine for args */
- caddr_t argsp; /* pointer to args */
- xdrproc_t xresults; /* xdr routine for results */
- caddr_t resultsp; /* pointer to results */
- struct timeval utimeout; /* seconds to wait before giving up */
+clntudp_call (
+ CLIENT *cl, /* client handle */
+ u_long proc, /* procedure number */
+ xdrproc_t xargs, /* xdr routine for args */
+ caddr_t argsp, /* pointer to args */
+ xdrproc_t xresults, /* xdr routine for results */
+ caddr_t resultsp, /* pointer to results */
+ struct timeval utimeout /* seconds to wait before giving up */)
{
struct cu_data *cu = (struct cu_data *) cl->cl_private;
XDR *xdrs;
diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c
index f66ce66e2..c7756f700 100644
--- a/libc/inet/rpc/clnt_unix.c
+++ b/libc/inet/rpc/clnt_unix.c
@@ -216,14 +216,9 @@ fooy:
libc_hidden_def(clntunix_create)
static enum clnt_stat
-clntunix_call (h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
- CLIENT *h;
- u_long proc;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
- xdrproc_t xdr_results;
- caddr_t results_ptr;
- struct timeval timeout;
+clntunix_call (CLIENT *h, u_long proc, xdrproc_t xdr_args, caddr_t args_ptr,
+ xdrproc_t xdr_results, caddr_t results_ptr,
+ struct timeval timeout)
{
struct ct_data *ct = (struct ct_data *) h->cl_private;
XDR *xdrs = &(ct->ct_xdrs);
@@ -330,10 +325,7 @@ clntunix_geterr (CLIENT *h, struct rpc_err *errp)
}
static bool_t
-clntunix_freeres (cl, xdr_res, res_ptr)
- CLIENT *cl;
- xdrproc_t xdr_res;
- caddr_t res_ptr;
+clntunix_freeres (CLIENT *cl, xdrproc_t xdr_res, caddr_t res_ptr)
{
struct ct_data *ct = (struct ct_data *) cl->cl_private;
XDR *xdrs = &(ct->ct_xdrs);
@@ -343,7 +335,7 @@ clntunix_freeres (cl, xdr_res, res_ptr)
}
static void
-clntunix_abort ()
+clntunix_abort (void)
{
}
diff --git a/libc/inet/rpc/pm_getport.c b/libc/inet/rpc/pm_getport.c
index 712ba2a8e..8a4276127 100644
--- a/libc/inet/rpc/pm_getport.c
+++ b/libc/inet/rpc/pm_getport.c
@@ -56,11 +56,8 @@ static const struct timeval tottimeout =
* Returns 0 if no map exists.
*/
u_short
-pmap_getport (address, program, version, protocol)
- struct sockaddr_in *address;
- u_long program;
- u_long version;
- u_int protocol;
+pmap_getport (struct sockaddr_in *address, u_long program, u_long version,
+ u_int protocol)
{
u_short port = 0;
int _socket = -1;
diff --git a/libc/inet/rpc/pmap_prot.c b/libc/inet/rpc/pmap_prot.c
index c2081f9cf..342dbad09 100644
--- a/libc/inet/rpc/pmap_prot.c
+++ b/libc/inet/rpc/pmap_prot.c
@@ -44,9 +44,7 @@ static char sccsid[] = "@(#)pmap_prot.c 1.17 87/08/11 Copyr 1984 Sun Micro";
bool_t
-xdr_pmap (xdrs, regs)
- XDR *xdrs;
- struct pmap *regs;
+xdr_pmap (XDR *xdrs, struct pmap *regs)
{
if (xdr_u_long (xdrs, &regs->pm_prog) &&
diff --git a/libc/inet/rpc/pmap_prot2.c b/libc/inet/rpc/pmap_prot2.c
index 5492fc13e..f383757e8 100644
--- a/libc/inet/rpc/pmap_prot2.c
+++ b/libc/inet/rpc/pmap_prot2.c
@@ -82,9 +82,7 @@ static char sccsid[] = "@(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";
* this sounds like a job for xdr_reference!
*/
bool_t
-xdr_pmaplist (xdrs, rp)
- XDR *xdrs;
- struct pmaplist **rp;
+xdr_pmaplist (XDR *xdrs, struct pmaplist **rp)
{
/*
* more_elements is pre-computed in case the direction is
diff --git a/libc/inet/rpc/pmap_rmt.c b/libc/inet/rpc/pmap_rmt.c
index d6e8fcf85..f9dd6e727 100644
--- a/libc/inet/rpc/pmap_rmt.c
+++ b/libc/inet/rpc/pmap_rmt.c
@@ -73,13 +73,9 @@ static const struct timeval timeout = {3, 0};
* programs to do a lookup and call in one step.
*/
enum clnt_stat
-pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_ptr)
- struct sockaddr_in *addr;
- u_long prog, vers, proc;
- xdrproc_t xdrargs, xdrres;
- caddr_t argsp, resp;
- struct timeval tout;
- u_long *port_ptr;
+pmap_rmtcall (struct sockaddr_in *addr, u_long prog, u_long vers, u_long proc,
+ xdrproc_t xdrargs, caddr_t argsp, xdrproc_t xdrres, caddr_t resp,
+ struct timeval tout, u_long *port_ptr)
{
int _socket = -1;
CLIENT *client;
@@ -151,9 +147,7 @@ libc_hidden_def(xdr_rmtcall_args)
* written for XDR_DECODE direction only
*/
bool_t
-xdr_rmtcallres (xdrs, crp)
- XDR *xdrs;
- struct rmtcallres *crp;
+xdr_rmtcallres (XDR *xdrs, struct rmtcallres *crp)
{
caddr_t port_ptr;
@@ -231,15 +225,15 @@ getbroadcastnets (struct in_addr *addrs, int sock, char *buf)
enum clnt_stat
-clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
- u_long prog; /* program number */
- u_long vers; /* version number */
- u_long proc; /* procedure number */
- xdrproc_t xargs; /* xdr routine for args */
- caddr_t argsp; /* pointer to args */
- xdrproc_t xresults; /* xdr routine for results */
- caddr_t resultsp; /* pointer to results */
- resultproc_t eachresult; /* call with each result obtained */
+clnt_broadcast (
+ u_long prog, /* program number */
+ u_long vers, /* version number */
+ u_long proc, /* procedure number */
+ xdrproc_t xargs, /* xdr routine for args */
+ caddr_t argsp, /* pointer to args */
+ xdrproc_t xresults, /* xdr routine for results */
+ caddr_t resultsp, /* pointer to results */
+ resultproc_t eachresult /* call with each result obtained */)
{
enum clnt_stat stat = RPC_FAILED;
AUTH *unix_auth = authunix_create_default ();
diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c
index 745ea776a..628c291fe 100644
--- a/libc/inet/rpc/rcmd.c
+++ b/libc/inet/rpc/rcmd.c
@@ -95,11 +95,8 @@ static int iruserok2 (u_int32_t raddr, int superuser, const char *ruser,
const char *luser, const char *rhost);
-int rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
- char **ahost;
- u_short rport;
- const char *locuser, *remuser, *cmd;
- int *fd2p;
+int rcmd(char **ahost, u_short rport, const char *locuser, const char *remuser,
+ const char *cmd, int *fd2p)
{
#ifdef __UCLIBC_HAS_REENTRANT_RPC__
int herr;
@@ -319,9 +316,8 @@ libc_hidden_def(rresvport)
*/
int __check_rhosts_file = 1;
-int ruserok(rhost, superuser, ruser, luser)
- const char *rhost, *ruser, *luser;
- int superuser;
+int ruserok(const char *rhost, int superuser, const char *ruser,
+ const char *luser)
{
struct hostent *hp;
u_int32_t addr;
@@ -430,10 +426,8 @@ iruserfopen (const char *file, uid_t okuser)
* Returns 0 if ok, -1 if not ok.
*/
static int
-iruserok2 (raddr, superuser, ruser, luser, rhost)
- u_int32_t raddr;
- int superuser;
- const char *ruser, *luser, *rhost;
+iruserok2 (u_int32_t raddr, int superuser, const char *ruser, const char *luser,
+ const char *rhost)
{
FILE *hostf = NULL;
int isbad = -1;
@@ -647,10 +641,8 @@ __isempty(char *p)
* Returns 0 if positive match, -1 if _not_ ok.
*/
static int
-__ivaliduser2(hostf, raddr, luser, ruser, rhost)
- FILE *hostf;
- u_int32_t raddr;
- const char *luser, *ruser, *rhost;
+__ivaliduser2(FILE *hostf, u_int32_t raddr, const char *luser,
+ const char *ruser, const char *rhost)
{
register const char *user;
register char *p;
diff --git a/libc/inet/rpc/rexec.c b/libc/inet/rpc/rexec.c
index a9d0dd66c..4148fdd07 100644
--- a/libc/inet/rpc/rexec.c
+++ b/libc/inet/rpc/rexec.c
@@ -185,11 +185,8 @@ bad:
libc_hidden_def(rexec_af)
int
-rexec(ahost, rport, name, pass, cmd, fd2p)
- char **ahost;
- int rport;
- const char *name, *pass, *cmd;
- int *fd2p;
+rexec(char **ahost, int rport, const char *name, const char *pass,
+ const char *cmd, int *fd2p)
{
return rexec_af(ahost, rport, name, pass, cmd, fd2p, AF_INET);
}
diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c
index c422a0510..0e4b74fcf 100644
--- a/libc/inet/rpc/ruserpass.c
+++ b/libc/inet/rpc/ruserpass.c
@@ -286,7 +286,7 @@ bad:
libc_hidden_def(ruserpass)
static int
-token()
+token(void)
{
char *cp;
int c;
diff --git a/libc/inet/rpc/svc_raw.c b/libc/inet/rpc/svc_raw.c
index 1fadb3075..f915a7d66 100644
--- a/libc/inet/rpc/svc_raw.c
+++ b/libc/inet/rpc/svc_raw.c
@@ -105,9 +105,7 @@ svcraw_stat (SVCXPRT *xprt attribute_unused)
}
static bool_t
-svcraw_recv (xprt, msg)
- SVCXPRT *xprt attribute_unused;
- struct rpc_msg *msg;
+svcraw_recv (SVCXPRT *xprt attribute_unused, struct rpc_msg *msg)
{
struct svcraw_private_s *srp = svcraw_private;
XDR *xdrs;
diff --git a/libc/inet/rpc/svc_udp.c b/libc/inet/rpc/svc_udp.c
index af0dc9a5a..87015c6c5 100644
--- a/libc/inet/rpc/svc_udp.c
+++ b/libc/inet/rpc/svc_udp.c
@@ -212,17 +212,14 @@ svcudp_create (int sock)
libc_hidden_def(svcudp_create)
static enum xprt_stat
-svcudp_stat (xprt)
- SVCXPRT *xprt attribute_unused;
+svcudp_stat (SVCXPRT *xprt attribute_unused)
{
return XPRT_IDLE;
}
static bool_t
-svcudp_recv (xprt, msg)
- SVCXPRT *xprt;
- struct rpc_msg *msg;
+svcudp_recv (SVCXPRT *xprt, struct rpc_msg *msg)
{
struct svcudp_data *su = su_data (xprt);
XDR *xdrs = &(su->su_xdrs);
@@ -298,9 +295,7 @@ again:
}
static bool_t
-svcudp_reply (xprt, msg)
- SVCXPRT *xprt;
- struct rpc_msg *msg;
+svcudp_reply (SVCXPRT *xprt, struct rpc_msg *msg)
{
struct svcudp_data *su = su_data (xprt);
XDR *xdrs = &(su->su_xdrs);
@@ -344,20 +339,14 @@ svcudp_reply (xprt, msg)
}
static bool_t
-svcudp_getargs (xprt, xdr_args, args_ptr)
- SVCXPRT *xprt;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
+svcudp_getargs (SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
{
return (*xdr_args) (&(su_data (xprt)->su_xdrs), args_ptr);
}
static bool_t
-svcudp_freeargs (xprt, xdr_args, args_ptr)
- SVCXPRT *xprt;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
+svcudp_freeargs (SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
{
XDR *xdrs = &(su_data (xprt)->su_xdrs);
@@ -366,8 +355,7 @@ svcudp_freeargs (xprt, xdr_args, args_ptr)
}
static void
-svcudp_destroy (xprt)
- SVCXPRT *xprt;
+svcudp_destroy (SVCXPRT *xprt)
{
struct svcudp_data *su = su_data (xprt);
@@ -573,11 +561,7 @@ cache_set (SVCXPRT *xprt, u_long replylen)
* return 1 if found, 0 if not found
*/
static int
-cache_get (xprt, msg, replyp, replylenp)
- SVCXPRT *xprt;
- struct rpc_msg *msg;
- char **replyp;
- u_long *replylenp;
+cache_get (SVCXPRT *xprt, struct rpc_msg *msg, char **replyp, u_long *replylenp)
{
u_int loc;
cache_ptr ent;
diff --git a/libc/inet/rpc/xdr.c b/libc/inet/rpc/xdr.c
index 78f4d04ba..bcf890176 100644
--- a/libc/inet/rpc/xdr.c
+++ b/libc/inet/rpc/xdr.c
@@ -593,9 +593,7 @@ libc_hidden_def(xdr_bytes)
* Implemented here due to commonality of the object.
*/
bool_t
-xdr_netobj (xdrs, np)
- XDR *xdrs;
- struct netobj *np;
+xdr_netobj (XDR *xdrs, struct netobj *np)
{
return xdr_bytes (xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ);
@@ -737,9 +735,7 @@ libc_hidden_def(xdr_string)
* routines like clnt_call
*/
bool_t
-xdr_wrapstring (xdrs, cpp)
- XDR *xdrs;
- char **cpp;
+xdr_wrapstring (XDR *xdrs, char **cpp)
{
if (xdr_string (xdrs, cpp, LASTUNSIGNED))
{
diff --git a/libc/inet/rpc/xdr_array.c b/libc/inet/rpc/xdr_array.c
index bb3e51e33..61603edd1 100644
--- a/libc/inet/rpc/xdr_array.c
+++ b/libc/inet/rpc/xdr_array.c
@@ -152,12 +152,8 @@ libc_hidden_def(xdr_array)
* > xdr_elem: routine to XDR each element
*/
bool_t
-xdr_vector (xdrs, basep, nelem, elemsize, xdr_elem)
- XDR *xdrs;
- char *basep;
- u_int nelem;
- u_int elemsize;
- xdrproc_t xdr_elem;
+xdr_vector (XDR *xdrs, char *basep, u_int nelem, u_int elemsize,
+ xdrproc_t xdr_elem)
{
u_int i;
char *elptr;
diff --git a/libc/inet/rpc/xdr_float.c b/libc/inet/rpc/xdr_float.c
index 03632c5ca..fd3863ff5 100644
--- a/libc/inet/rpc/xdr_float.c
+++ b/libc/inet/rpc/xdr_float.c
@@ -89,9 +89,7 @@ static struct sgl_limits {
#endif /* vax */
bool_t
-xdr_float(xdrs, fp)
- XDR *xdrs;
- float *fp;
+xdr_float(XDR *xdrs, float *fp)
{
#ifdef vax
struct ieee_single is;
@@ -209,9 +207,7 @@ static struct dbl_limits {
bool_t
-xdr_double(xdrs, dp)
- XDR *xdrs;
- double *dp;
+xdr_double(XDR *xdrs, double *dp)
{
#ifdef vax
struct ieee_double id;
diff --git a/libc/inet/rpc/xdr_mem.c b/libc/inet/rpc/xdr_mem.c
index 9892dd936..c58fc450a 100644
--- a/libc/inet/rpc/xdr_mem.c
+++ b/libc/inet/rpc/xdr_mem.c
@@ -173,9 +173,7 @@ xdrmem_getpos (const XDR *xdrs)
* xdrs modified
*/
static bool_t
-xdrmem_setpos (xdrs, pos)
- XDR *xdrs;
- u_int pos;
+xdrmem_setpos (XDR *xdrs, u_int pos)
{
caddr_t newaddr = xdrs->x_base + pos;
caddr_t lastaddr = xdrs->x_private + xdrs->x_handy;
diff --git a/libc/inet/rpc/xdr_reference.c b/libc/inet/rpc/xdr_reference.c
index 937b0ccb3..1c601fc95 100644
--- a/libc/inet/rpc/xdr_reference.c
+++ b/libc/inet/rpc/xdr_reference.c
@@ -128,11 +128,7 @@ libc_hidden_def(xdr_reference)
*
*/
bool_t
-xdr_pointer (xdrs, objpp, obj_size, xdr_obj)
- XDR *xdrs;
- char **objpp;
- u_int obj_size;
- xdrproc_t xdr_obj;
+xdr_pointer (XDR *xdrs, char **objpp, u_int obj_size, xdrproc_t xdr_obj)
{
bool_t more_data;
diff --git a/libc/misc/regex/regexec.c b/libc/misc/regex/regexec.c
index 568108a67..018026280 100644
--- a/libc/misc/regex/regexec.c
+++ b/libc/misc/regex/regexec.c
@@ -213,12 +213,8 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx)
We return 0 if we find a match and REG_NOMATCH if not. */
int
-regexec (preg, string, nmatch, pmatch, eflags)
- const regex_t *__restrict preg;
- const char *__restrict string;
- size_t nmatch;
- regmatch_t pmatch[];
- int eflags;
+regexec (const regex_t *__restrict preg, const char *__restrict string,
+ size_t nmatch, regmatch_t pmatch[], int eflags)
{
reg_errcode_t err;
int start, length;
@@ -282,56 +278,43 @@ libc_hidden_def(regexec)
match was found and -2 indicates an internal error. */
int
-re_match (bufp, string, length, start, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- int length, start;
- struct re_registers *regs;
+re_match (struct re_pattern_buffer *bufp, const char *string, int length,
+ int start, struct re_registers *regs)
{
return re_search_stub (bufp, string, length, start, 0, length, regs, 1);
}
int
-re_search (bufp, string, length, start, range, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- int length, start, range;
- struct re_registers *regs;
+re_search (struct re_pattern_buffer *bufp, const char *string, int length,
+ int start, int range, struct re_registers *regs)
{
return re_search_stub (bufp, string, length, start, range, length, regs, 0);
}
libc_hidden_def(re_search)
int
-re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int length1, length2, start, stop;
- struct re_registers *regs;
+re_match_2 (struct re_pattern_buffer *bufp, const char *string1, int length1,
+ const char *string2, int length2, int start,
+ struct re_registers *regs, int stop)
{
return re_search_2_stub (bufp, string1, length1, string2, length2,
start, 0, regs, stop, 1);
}
int
-re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int length1, length2, start, range, stop;
- struct re_registers *regs;
+re_search_2 (struct re_pattern_buffer *bufp, const char *string1, int lenght1,
+ const char *string2, int length2, int start, int range,
+ struct re_registers *regs, int stop)
{
- return re_search_2_stub (bufp, string1, length1, string2, length2,
+ return re_search_2_stub (bufp, string1, lenght1, string2, length2,
start, range, regs, stop, 0);
}
libc_hidden_def(re_search_2)
static int
-re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
- stop, ret_len)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int length1, length2, start, range, stop, ret_len;
- struct re_registers *regs;
+re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1,
+ int length1, const char *string2, int length2, int start,
+ int range, struct re_registers *regs, int stop, int ret_len)
{
const char *str;
int rval;
@@ -372,11 +355,9 @@ re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
otherwise the position of the match is returned. */
static int
-re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
- struct re_pattern_buffer *bufp;
- const char *string;
- int length, start, range, stop, ret_len;
- struct re_registers *regs;
+re_search_stub (struct re_pattern_buffer *bufp, const char *string, int length,
+ int start, int range, int stop, struct re_registers *regs,
+ int ret_len)
{
reg_errcode_t result;
regmatch_t *pmatch;
@@ -462,10 +443,8 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
}
static unsigned
-re_copy_regs (regs, pmatch, nregs, regs_allocated)
- struct re_registers *regs;
- regmatch_t *pmatch;
- int nregs, regs_allocated;
+re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, int nregs,
+ int regs_allocated)
{
int rval = REGS_REALLOCATE;
int i;
@@ -531,11 +510,8 @@ re_copy_regs (regs, pmatch, nregs, regs_allocated)
freeing the old data. */
void
-re_set_registers (bufp, regs, num_regs, starts, ends)
- struct re_pattern_buffer *bufp;
- struct re_registers *regs;
- unsigned num_regs;
- regoff_t *starts, *ends;
+re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs,
+ unsigned num_regs, regoff_t *starts, regoff_t *ends)
{
if (num_regs)
{
@@ -574,15 +550,10 @@ re_exec (const char *s)
otherwise return the error code.
Note: We assume front end functions already check ranges.
(START + RANGE >= 0 && START + RANGE <= LENGTH) */
-
static reg_errcode_t
-re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
- eflags)
- const regex_t *preg;
- const char *string;
- int length, start, range, stop, eflags;
- size_t nmatch;
- regmatch_t pmatch[];
+re_search_internal (const regex_t *preg, const char *string, int length,
+ int start, int range, int stop, size_t nmatch,
+ regmatch_t pmatch[], int eflags)
{
reg_errcode_t err;
const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
@@ -889,8 +860,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
}
static reg_errcode_t
-prune_impossible_nodes (mctx)
- re_match_context_t *mctx;
+prune_impossible_nodes (re_match_context_t *mctx)
{
const re_dfa_t *const dfa = mctx->dfa;
int halt_node, match_last;