Commit 44df183e authored by Pekka Pessi's avatar Pekka Pessi
Browse files

Using http_off_t instead of off_t.

darcs-hash:20050908145428-65a35-6564c651b032ecaea4436ad7171c9bd370c888ac.gz
parent adf1342c
...@@ -449,7 +449,7 @@ int http_content_range_d(su_home_t *home, http_header_t *h, char *s, int slen) ...@@ -449,7 +449,7 @@ int http_content_range_d(su_home_t *home, http_header_t *h, char *s, int slen)
return -1; return -1;
s += 5; skip_lws(&s); s += 5; skip_lws(&s);
if (s[0] == '*') { if (s[0] == '*') {
cr->cr_first = cr->cr_last = (off_t)-1; cr->cr_first = cr->cr_last = (http_off_t)-1;
s++; skip_lws(&s); s++; skip_lws(&s);
} else { } else {
if (msg_delta_d((char const **)&s, &cr->cr_first) < 0) if (msg_delta_d((char const **)&s, &cr->cr_first) < 0)
...@@ -466,7 +466,7 @@ int http_content_range_d(su_home_t *home, http_header_t *h, char *s, int slen) ...@@ -466,7 +466,7 @@ int http_content_range_d(su_home_t *home, http_header_t *h, char *s, int slen)
s++; skip_lws(&s); s++; skip_lws(&s);
if (s[0] == '*') { if (s[0] == '*') {
cr->cr_length = (off_t)-1; cr->cr_length = (http_off_t)-1;
s++; skip_lws(&s); s++; skip_lws(&s);
} else { } else {
if (msg_delta_d((char const **)&s, &cr->cr_length) < 0) if (msg_delta_d((char const **)&s, &cr->cr_length) < 0)
...@@ -480,14 +480,14 @@ int http_content_range_e(char b[], int bsiz, http_header_t const *h, int f) ...@@ -480,14 +480,14 @@ int http_content_range_e(char b[], int bsiz, http_header_t const *h, int f)
{ {
http_content_range_t const *cr = h->sh_content_range; http_content_range_t const *cr = h->sh_content_range;
if (cr->cr_first == (off_t)-1) { if (cr->cr_first == (http_off_t)-1) {
if (cr->cr_length == (off_t)-1) if (cr->cr_length == (http_off_t)-1)
return snprintf(b, bsiz, "bytes */*"); return snprintf(b, bsiz, "bytes */*");
else else
return snprintf(b, bsiz, "bytes */%lu", cr->cr_length); return snprintf(b, bsiz, "bytes */%lu", cr->cr_length);
} }
else { else {
if (cr->cr_length == (off_t)-1) if (cr->cr_length == (http_off_t)-1)
return snprintf(b, bsiz, "bytes %lu-%lu/*", cr->cr_first, cr->cr_last); return snprintf(b, bsiz, "bytes %lu-%lu/*", cr->cr_first, cr->cr_last);
else else
return snprintf(b, bsiz, "bytes %lu-%lu/%lu", return snprintf(b, bsiz, "bytes %lu-%lu/%lu",
......
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