Mercurial > hg > nnchat
comparison nnchat.c @ 410:7ea78f4a4d23
Rename input handling main function.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 24 May 2012 06:01:38 +0300 |
parents | 4556174b5be8 |
children | 664b94a58dbe |
comparison
equal
deleted
inserted
replaced
409:4556174b5be8 | 410:7ea78f4a4d23 |
---|---|
886 else | 886 else |
887 return 1; | 887 return 1; |
888 } | 888 } |
889 | 889 |
890 | 890 |
891 int handleUserInput(nn_conn_t *conn, char *buf, size_t bufLen) | 891 int nn_handle_input(nn_conn_t *conn, char *buf, size_t bufLen) |
892 { | 892 { |
893 char *tmpStr, tmpBuf[4096]; | 893 char *tmpStr, tmpBuf[4096]; |
894 BOOL result; | 894 BOOL result; |
895 | 895 |
896 /* Trim right */ | 896 /* Trim right */ |
1881 histPos = 0; | 1881 histPos = 0; |
1882 histBuf[1] = nn_editbuf_copy(editBuf); | 1882 histBuf[1] = nn_editbuf_copy(editBuf); |
1883 if (histMax < SET_MAX_HISTORY) histMax++; | 1883 if (histMax < SET_MAX_HISTORY) histMax++; |
1884 | 1884 |
1885 nn_editbuf_insert(editBuf, editBuf->len, 0); | 1885 nn_editbuf_insert(editBuf, editBuf->len, 0); |
1886 result = handleUserInput(conn, editBuf->data, editBuf->len); | 1886 result = nn_handle_input(conn, editBuf->data, editBuf->len); |
1887 | 1887 |
1888 nn_editbuf_clear(editBuf); | 1888 nn_editbuf_clear(editBuf); |
1889 | 1889 |
1890 if (result < 0) | 1890 if (result < 0) |
1891 { | 1891 { |