Mercurial > hg > octave-nkf
comparison src/ls-oct-ascii.h @ 5679:297b82335c7b
[project @ 2006-03-16 16:44:12 by jwe]
author | jwe |
---|---|
date | Thu, 16 Mar 2006 16:44:12 +0000 |
parents | 4c8a2e4e0717 |
children | a9ac02e9fda5 |
comparison
equal
deleted
inserted
replaced
5678:52323f13c86b | 5679:297b82335c7b |
---|---|
88 | 88 |
89 while (is.get (c) && isalpha (c)) | 89 while (is.get (c) && isalpha (c)) |
90 buf << c; | 90 buf << c; |
91 | 91 |
92 buf << OSSTREAM_ENDS; | 92 buf << OSSTREAM_ENDS; |
93 const char *tmp = OSSTREAM_C_STR (buf); | 93 std::string tmp = OSSTREAM_STR (buf); |
94 int match = (strncmp (tmp, keyword, strlen (keyword)) == 0); | 94 bool match = (tmp.compare (0, strlen (keyword), keyword) == 0); |
95 OSSTREAM_FREEZE (buf); | 95 OSSTREAM_FREEZE (buf); |
96 | 96 |
97 if (match) | 97 if (match) |
98 { | 98 { |
99 while (is.get (c) && (c == ' ' || c == '\t' || c == ':')) | 99 while (is.get (c) && (c == ' ' || c == '\t' || c == ':')) |