diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-01-01 01:40:52 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-01-01 01:40:52 +0800 |
commit | ce591a73e5bafcf08b93da768b8c76c5e824f599 (patch) | |
tree | 416921f99fdfb349e7f0a6655cae28e1e87d67c7 /mbbsd/edit.c | |
parent | 5507859f58d2a4dd6ff14f441c5c0f51ed4c5928 (diff) | |
download | pttbbs-ce591a73e5bafcf08b93da768b8c76c5e824f599.tar pttbbs-ce591a73e5bafcf08b93da768b8c76c5e824f599.tar.gz pttbbs-ce591a73e5bafcf08b93da768b8c76c5e824f599.tar.bz2 pttbbs-ce591a73e5bafcf08b93da768b8c76c5e824f599.tar.lz pttbbs-ce591a73e5bafcf08b93da768b8c76c5e824f599.tar.xz pttbbs-ce591a73e5bafcf08b93da768b8c76c5e824f599.tar.zst pttbbs-ce591a73e5bafcf08b93da768b8c76c5e824f599.zip |
make gcc33 happy
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@592 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/edit.c')
-rw-r--r-- | mbbsd/edit.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 1107a6f1..ec20e7c1 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -1,4 +1,4 @@ -/* $Id: edit.c,v 1.23 2002/12/26 09:46:04 kcwu Exp $ */ +/* $Id: edit.c,v 1.24 2002/12/31 17:40:51 in2 Exp $ */ #include "bbs.h" typedef struct textline_t { struct textline_t *prev; @@ -1244,14 +1244,14 @@ match_paren() for (lino = currln, p = currline; p; p = p->next, lino++) { lino = lino; for (i = (lino == currln) ? currpnt + 1 : 0; - i < strlen(p->data); i++) + (size_t)i < strlen(p->data); i++) if (p->data[i] == '/' && p->data[++i] == '*') { ++i; while (1) { - while (i < strlen(p->data) - 1 && + while ((size_t)i < strlen(p->data) - 1 && !(p->data[i] == '*' && p->data[i + 1] == '/')) i++; - if (i >= strlen(p->data) - 1 && p->next) { + if ((size_t)i >= strlen(p->data) - 1 && p->next) { p = p->next; ++lino; i = 0; @@ -1261,11 +1261,11 @@ match_paren() } else if ((c = p->data[i]) == '\'' || c == '"') { while (1) { while (i < (int)(strlen(p->data) - 1)) - if (p->data[++i] == '\\' && i < strlen(p->data) - 2) + if (p->data[++i] == '\\' && (size_t)i < strlen(p->data) - 2) ++i; else if (p->data[i] == c) goto end_quote; - if (i >= strlen(p->data) - 1 && p->next) { + if ((size_t)i >= strlen(p->data) - 1 && p->next) { p = p->next; ++lino; i = -1; @@ -1281,7 +1281,9 @@ match_paren() } } else { for (lino = currln, p = currline; p; p = p->prev, lino--) - for (i = (lino == currln) ? currpnt - 1 : strlen(p->data) - 1; + for (i = ((lino == currln) ? + currpnt - 1 : + (int)strlen(p->data) - 1); i >= 0; i--) if (p->data[i] == '/' && p->data[--i] == '*' && i > 0) { --i; |