1 // Copyright (C) 2009-2018 Joel Rosdahl
3 // This program is free software; you can redistribute it and/or modify it
4 // under the terms of the GNU General Public License as published by the Free
5 // Software Foundation; either version 3 of the License, or (at your option)
8 // This program is distributed in the hope that it will be useful, but WITHOUT
9 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 // You should have received a copy of the GNU General Public License along with
14 // this program; if not, write to the Free Software Foundation, Inc., 51
15 // Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
30 unsigned hash_from_string(void *str);
31 unsigned hash_from_int(int i);
32 int strings_equal(void *str1, void *str2);
33 int file_hashes_equal(struct file_hash *fh1, struct file_hash *fh2);
35 #define HASH_SOURCE_CODE_OK 0
36 #define HASH_SOURCE_CODE_ERROR 1
37 #define HASH_SOURCE_CODE_FOUND_DATE 2
38 #define HASH_SOURCE_CODE_FOUND_TIME 4
40 int check_for_temporal_macros(const char *str, size_t len);
41 int hash_source_code_string(
42 struct conf *conf, struct hash *hash, const char *str, size_t len,
44 int hash_source_code_file(
45 struct conf *conf, struct hash *hash, const char *path);
46 bool hash_command_output(struct hash *hash, const char *command,
47 const char *compiler);
48 bool hash_multicommand_output(struct hash *hash, const char *command,
49 const char *compiler);