| 822 | Return true if successful. */ |
| 823 | |
| 824 | static bool |
| 825 | bsd_split_3 (char *s, idx_t s_len, |
| 826 | unsigned char **digest, idx_t *d_len, |
| 827 | char **file_name, bool escaped_filename) |
| 828 | { |
| 829 | if (s_len == 0) |
| 830 | return false; |
| 831 | |
| 832 | /* Find end of filename. */ |
| 833 | idx_t i = s_len - 1; |
| 834 | while (i && s[i] != ')') |
| 835 | i--; |
| 836 | |
| 837 | if (s[i] != ')') |
| 838 | return false; |
| 839 | |
| 840 | *file_name = s; |
| 841 | |
| 842 | if (escaped_filename && filename_unescape (s, i) == NULL) |
| 843 | return false; |
| 844 | |
| 845 | s[i++] = '\0'; |
| 846 | |
| 847 | while (c_isblank (s[i])) |
| 848 | i++; |
| 849 | |
| 850 | if (s[i] != '=') |
| 851 | return false; |
| 852 | |
| 853 | i++; |
| 854 | |
| 855 | while (c_isblank (s[i])) |
| 856 | i++; |
| 857 | |
| 858 | *digest = (unsigned char *) &s[i]; |
| 859 | |
| 860 | *d_len = s_len - i; |
| 861 | return valid_digits (*digest, *d_len); |
| 862 | } |
| 863 | |
| 864 | #if HASH_ALGO_CKSUM |
| 865 | /* Return the corresponding Algorithm for the string S, |
no test coverage detected