# HG changeset patch # User Matti Hamalainen # Date 1337824690 -10800 # Node ID 74d97581dc46ed38aa413992cbd58dc79044030f # Parent cabf2233ea392d345b9d7d5c248eae71274b8a89 Rename variable and function, internal use only. diff -r cabf2233ea39 -r 74d97581dc46 libnnchat.c --- a/libnnchat.c Thu May 24 04:57:37 2012 +0300 +++ b/libnnchat.c Thu May 24 04:58:10 2012 +0300 @@ -358,7 +358,7 @@ { if (conn != NULL) { - conn->got_ptr = conn->buf; + conn->ptr = conn->in_ptr = conn->buf; conn->got_bytes = conn->total_bytes = 0; } } @@ -390,7 +390,7 @@ } else if (FD_ISSET(conn->socket, &tmpfds)) { - conn->got_bytes = recv(conn->socket, conn->got_ptr, NN_CONNBUF_SIZE - conn->total_bytes, 0); + conn->got_bytes = recv(conn->socket, conn->in_ptr, NN_CONNBUF_SIZE - conn->total_bytes, 0); if (conn->got_bytes < 0) { conn->err = nn_get_socket_errno(); @@ -406,7 +406,7 @@ else { conn->total_bytes += conn->got_bytes; - conn->got_ptr += conn->got_bytes; + conn->in_ptr += conn->got_bytes; return 0; } } @@ -491,7 +491,7 @@ } -static int getHexDigit(const int c, const int shift) +static int nn_get_hexdigit(const int c, const int shift) { int i; @@ -546,9 +546,9 @@ s++; if (*s == '%') PUSHCHAR('%'); - else if ((c = getHexDigit(*s, 4)) >= 0) + else if ((c = nn_get_hexdigit(*s, 4)) >= 0) { - int i = getHexDigit(*(++s), 0); + int i = nn_get_hexdigit(*(++s), 0); if (i >= 0) { PUSHCHAR(c | i); diff -r cabf2233ea39 -r 74d97581dc46 libnnchat.h --- a/libnnchat.h Thu May 24 04:57:37 2012 +0300 +++ b/libnnchat.h Thu May 24 04:58:10 2012 +0300 @@ -100,7 +100,7 @@ int status; char buf[NN_CONNBUF_SIZE + 16]; - char *ptr, *got_ptr; + char *ptr, *in_ptr; ssize_t got_bytes, total_bytes; } nn_conn_t;