|
|
| version 1.38, 2004/02/11 15:33:12 | version 1.40, 2005/08/09 08:14:48 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: @b math parser class. | Parser: @b math parser class. |
| Copyright(c) 2001-2004 ArtLebedev Group(http://www.artlebedev.com) | Copyright(c) 2001-2005 ArtLebedev Group(http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru>(http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru>(http://paf.design.ru) |
| portions from gen_uuid.c, | portions from gen_uuid.c, |
| Line 228 inline bool is_salt_body_char(int c) { | Line 228 inline bool is_salt_body_char(int c) { |
| } | } |
| static size_t calc_prefix_size(const char* salt) { | static size_t calc_prefix_size(const char* salt) { |
| if(strlen(salt)) { | if(strlen(salt)) { |
| if(!is_salt_body_char(salt[0])) { // $... {... | if(!is_salt_body_char((unsigned char)salt[0])) { // $... {... |
| const char* cur=salt+1; // skip | const char* cur=salt+1; // skip |
| while(is_salt_body_char(*cur++)) // ...$ ...} | while(is_salt_body_char((unsigned char)*cur++)) // ...$ ...} |
| ; | ; |
| return cur-salt; | return cur-salt; |
| } else | } else |