|
|
| version 1.34, 2003/07/24 11:31:20 | version 1.37, 2003/11/20 17:46:01 |
|---|---|
| Line 8 | Line 8 |
| Copyright (C) 1996, 1997, 1998, 1999 Theodore Ts'o. | Copyright (C) 1996, 1997, 1998, 1999 Theodore Ts'o. |
| */ | */ |
| static const char* IDENT_MATH_C="$Date$"; | static const char * const IDENT_MATH_C="$Date$"; |
| #include "pa_vmethod_frame.h" | #include "pa_vmethod_frame.h" |
| #include "pa_common.h" | #include "pa_common.h" |
| Line 227 inline bool is_salt_body_char(int c) { | Line 227 inline bool is_salt_body_char(int c) { |
| return isalnum(c) || c == '.' || c=='/'; | return isalnum(c) || c == '.' || c=='/'; |
| } | } |
| static size_t calc_prefix_size(const char* salt) { | static size_t calc_prefix_size(const char* salt) { |
| if(size_t salt_size=strlen(salt)) { | if(strlen(salt)) { |
| if(!is_salt_body_char(salt[0])) { // $... {... | if(!is_salt_body_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(*cur++)) // ...$ ...} |
| Line 294 static const char* hex_string(unsigned c | Line 294 static const char* hex_string(unsigned c |
| static const char *hex=upcase?"0123456789ABCDEF":"0123456789abcdef"; | static const char *hex=upcase?"0123456789ABCDEF":"0123456789abcdef"; |
| const char *format=upcase?"%02X":"%02x"; | |
| for(; src<end; src++) { | for(; src<end; src++) { |
| *dest++=hex[*src/0x10]; | *dest++=hex[*src/0x10]; |
| *dest++=hex[*src%0x10]; | *dest++=hex[*src%0x10]; |