ben 96/10/20 13:45:56
Modified: src http_protocol.c http_request.c http_request.h
httpd.h util.c util_script.c util_script.h
Log:
Even more constification.
Revision Changes Path
1.61 +3 -3 apache/src/http_protocol.c
Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_protocol.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -C3 -r1.60 -r1.61
*** http_protocol.c 1996/10/20 18:03:31 1.60
--- http_protocol.c 1996/10/20 20:45:50 1.61
***************
*** 440,446 ****
}
}
! char *check_fulluri (request_rec *r, char *uri) {
char *name, *host;
int i, port;
--- 440,446 ----
}
}
! const char *check_fulluri (request_rec *r, const char *uri) {
char *name, *host;
int i, port;
***************
*** 494,500 ****
int read_request_line (request_rec *r)
{
char l[HUGE_STRING_LEN];
! char *ll = l, *uri;
conn_rec *conn = r->connection;
int major = 1, minor = 0; /* Assume HTTP/1.0 if non-"HTTP"
protocol*/
--- 494,500 ----
int read_request_line (request_rec *r)
{
char l[HUGE_STRING_LEN];
! const char *ll = l, *uri;
conn_rec *conn = r->connection;
int major = 1, minor = 0; /* Assume HTTP/1.0 if non-"HTTP"
protocol*/
***************
*** 783,789 ****
}
t = uudecode (r->pool, auth_line);
! r->connection->user = getword_nulls (r->pool, &t, ':');
r->connection->auth_type = "Basic";
*pw = t;
--- 783,789 ----
}
t = uudecode (r->pool, auth_line);
! r->connection->user = getword_nulls_nc (r->pool, &t, ':');
r->connection->auth_type = "Basic";
*pw = t;
1.24 +7 -7 apache/src/http_request.c
Index: http_request.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_request.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C3 -r1.23 -r1.24
*** http_request.c 1996/10/20 18:03:32 1.23
--- http_request.c 1996/10/20 20:45:51 1.24
***************
*** 50,56 ****
*
*/
! /* $Id: http_request.c,v 1.23 1996/10/20 18:03:32 ben Exp $ */
/*
* http_request.c: functions to get and process requests
--- 50,56 ----
*
*/
! /* $Id: http_request.c,v 1.24 1996/10/20 20:45:51 ben Exp $ */
/*
* http_request.c: functions to get and process requests
***************
*** 516,522 ****
return rr;
}
! request_rec *sub_req_lookup_simple (char *new_file, request_rec *r)
{
/* This handles the simple case, common to ..._lookup_uri and _file,
* of looking up another file in the same directory.
--- 516,522 ----
return rr;
}
! request_rec *sub_req_lookup_simple (const char *new_file, const request_rec
*r)
{
/* This handles the simple case, common to ..._lookup_uri and _file,
* of looking up another file in the same directory.
***************
*** 625,631 ****
return rnew;
}
! request_rec *sub_req_lookup_file (char *new_file, request_rec *r)
{
request_rec *rnew;
int res;
--- 625,631 ----
return rnew;
}
! request_rec *sub_req_lookup_file (const char *new_file, const request_rec
*r)
{
request_rec *rnew;
int res;
***************
*** 650,656 ****
rnew->uri = "INTERNALLY GENERATED file-relative req";
rnew->filename = ((new_file[0] == '/') ?
! new_file :
make_full_path (rnew->pool, fdir, new_file));
if ((res = directory_walk (rnew))
--- 650,656 ----
rnew->uri = "INTERNALLY GENERATED file-relative req";
rnew->filename = ((new_file[0] == '/') ?
! pstrdup(rnew->pool,new_file) :
make_full_path (rnew->pool, fdir, new_file));
if ((res = directory_walk (rnew))
***************
*** 925,931 ****
return new;
}
! request_rec *internal_internal_redirect (char *new_uri, request_rec *r)
{
request_rec *new = (request_rec *)pcalloc(r->pool, sizeof(request_rec));
char t[10]; /* Long enough... */
--- 925,931 ----
return new;
}
! request_rec *internal_internal_redirect (const char *new_uri, request_rec
*r)
{
request_rec *new = (request_rec *)pcalloc(r->pool, sizeof(request_rec));
char t[10]; /* Long enough... */
***************
*** 980,986 ****
return new;
}
! void internal_redirect (char *new_uri, request_rec *r)
{
request_rec *new = internal_internal_redirect(new_uri, r);
process_request_internal (new);
--- 980,986 ----
return new;
}
! void internal_redirect (const char *new_uri, request_rec *r)
{
request_rec *new = internal_internal_redirect(new_uri, r);
process_request_internal (new);
***************
*** 991,997 ****
* an internal redirect.
*/
! void internal_redirect_handler (char *new_uri, request_rec *r)
{
request_rec *new = internal_internal_redirect(new_uri, r);
if (r->handler)
--- 991,997 ----
* an internal redirect.
*/
! void internal_redirect_handler (const char *new_uri, request_rec *r)
{
request_rec *new = internal_internal_redirect(new_uri, r);
if (r->handler)
1.6 +4 -4 apache/src/http_request.h
Index: http_request.h
===================================================================
RCS file: /export/home/cvs/apache/src/http_request.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C3 -r1.5 -r1.6
*** http_request.h 1996/10/20 18:03:32 1.5
--- http_request.h 1996/10/20 20:45:51 1.6
***************
*** 50,56 ****
*
*/
! /* $Id: http_request.h,v 1.5 1996/10/20 18:03:32 ben Exp $ */
/* http_request.c is the code which handles the main line of request
* processing, once a request has been read in (finding the right per-
--- 50,56 ----
*
*/
! /* $Id: http_request.h,v 1.6 1996/10/20 20:45:51 ben Exp $ */
/* http_request.c is the code which handles the main line of request
* processing, once a request has been read in (finding the right per-
***************
*** 73,79 ****
*/
request_rec *sub_req_lookup_uri (const char *new_file, const request_rec
*r);
! request_rec *sub_req_lookup_file (char *new_file, request_rec *r);
int run_sub_req (request_rec *r);
void destroy_sub_req (request_rec *r);
--- 73,79 ----
*/
request_rec *sub_req_lookup_uri (const char *new_file, const request_rec
*r);
! request_rec *sub_req_lookup_file (const char *new_file, const request_rec
*r);
int run_sub_req (request_rec *r);
void destroy_sub_req (request_rec *r);
***************
*** 83,90 ****
* If so, call this from a handler, and then immediately return OK.
*/
! void internal_redirect (char *new_uri, request_rec *);
! void internal_redirect_handler (char *new_uri, request_rec *);
#ifdef CORE_PRIVATE
/* Function called by main.c to handle first-level request */
--- 83,90 ----
* If so, call this from a handler, and then immediately return OK.
*/
! void internal_redirect (const char *new_uri, request_rec *);
! void internal_redirect_handler (const char *new_uri, request_rec *);
#ifdef CORE_PRIVATE
/* Function called by main.c to handle first-level request */
1.57 +4 -2 apache/src/httpd.h
Index: httpd.h
===================================================================
RCS file: /export/home/cvs/apache/src/httpd.h,v
retrieving revision 1.56
retrieving revision 1.57
diff -C3 -r1.56 -r1.57
*** httpd.h 1996/10/20 18:03:32 1.56
--- httpd.h 1996/10/20 20:45:52 1.57
***************
*** 605,612 ****
char *getword(pool *p, const char **line, char stop);
char *getword_nc(pool *p, char **line, char stop);
! char *getword_white(pool *p, char **line);
! char *getword_nulls (pool *p, char **line, char stop);
char *getword_conf (pool *p, const char **line);
char *getword_conf_nc (pool *p, char **line);
--- 605,614 ----
char *getword(pool *p, const char **line, char stop);
char *getword_nc(pool *p, char **line, char stop);
! char *getword_white(pool *p, const char **line);
! char *getword_white_nc(pool *p, char **line);
! char *getword_nulls (pool *p, const char **line, char stop);
! char *getword_nulls_nc (pool *p, char **line, char stop);
char *getword_conf (pool *p, const char **line);
char *getword_conf_nc (pool *p, char **line);
1.27 +12 -2 apache/src/util.c
Index: util.c
===================================================================
RCS file: /export/home/cvs/apache/src/util.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C3 -r1.26 -r1.27
*** util.c 1996/10/20 18:03:37 1.26
--- util.c 1996/10/20 20:45:52 1.27
***************
*** 399,405 ****
return res;
}
! char *getword_white(pool* atrans, char **line) {
int pos = -1, x;
char *res;
--- 399,410 ----
return res;
}
! char *getword_white_nc(pool* atrans, char **line)
! {
! return getword_white(atrans,(const char **)line);
! }
!
! char *getword_white(pool* atrans, const char **line) {
int pos = -1, x;
char *res;
***************
*** 427,433 ****
return res;
}
! char *getword_nulls(pool* atrans, char **line, char stop) {
int pos = ind(*line, stop);
char *res;
--- 432,443 ----
return res;
}
! char *getword_nulls_nc(pool* atrans, char **line, char stop)
! {
! return getword_nulls(atrans,(const char **)line,stop);
! }
!
! char *getword_nulls(pool* atrans, const char **line, char stop) {
int pos = ind(*line, stop);
char *res;
1.24 +1 -1 apache/src/util_script.c
Index: util_script.c
===================================================================
RCS file: /export/home/cvs/apache/src/util_script.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C3 -r1.23 -r1.24
*** util_script.c 1996/10/20 18:03:37 1.23
--- util_script.c 1996/10/20 20:45:53 1.24
***************
*** 72,78 ****
#define MALFORMED_MESSAGE "malformed header from script. Bad header="
#define MALFORMED_HEADER_LENGTH_TO_SHOW 30
! char **create_argv(pool *p, char *av0, char *args) {
register int x,n;
char **av;
char *w;
--- 72,78 ----
#define MALFORMED_MESSAGE "malformed header from script. Bad header="
#define MALFORMED_HEADER_LENGTH_TO_SHOW 30
! char **create_argv(pool *p, char *av0, const char *args) {
register int x,n;
char **av;
char *w;
1.7 +2 -2 apache/src/util_script.h
Index: util_script.h
===================================================================
RCS file: /export/home/cvs/apache/src/util_script.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C3 -r1.6 -r1.7
*** util_script.h 1996/08/20 11:51:25 1.6
--- util_script.h 1996/10/20 20:45:53 1.7
***************
*** 50,58 ****
*
*/
! /* $Id: util_script.h,v 1.6 1996/08/20 11:51:25 paul Exp $ */
! char **create_argv(pool *p, char *av0, char *args);
#ifdef __EMX__
char **create_argv_cmd(pool *p, char *av0, char *args, char *path);
#endif
--- 50,58 ----
*
*/
! /* $Id: util_script.h,v 1.7 1996/10/20 20:45:53 ben Exp $ */
! char **create_argv(pool *p, char *av0, const char *args);
#ifdef __EMX__
char **create_argv_cmd(pool *p, char *av0, char *args, char *path);
#endif