| 1 | /* |
| 2 | Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011 R. Bernstein |
| 3 | <[email protected]> |
| 4 | This file is part of GNU Make (remake variant). |
| 5 | |
| 6 | GNU Make is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 2, or (at your option) |
| 9 | any later version. |
| 10 | |
| 11 | GNU Make is distributed in the hope that it will be useful, |
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | GNU General Public License for more details. |
| 15 | |
| 16 | You should have received a copy of the GNU General Public License |
| 17 | along with GNU Make; see the file COPYING. If not, write to |
| 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 19 | Boston, MA 02111-1307, USA. */ |
| 20 | #ifndef REMAKE_FILE2LINE |
| 21 | #define REMAKE_FILE2LINE |
| 22 | extern struct hash_table file2lines; |
| 23 | |
| 24 | typedef enum { |
| 25 | F2L_TARGET, |
| 26 | F2L_PATTERN |
| 27 | } f2l_entry_t; |
| 28 | |
| 29 | |
| 30 | typedef struct lineo_array_s |
| 31 | { |
| 32 | const char *hname; /**< Name stored in hash table */ |
| 33 | unsigned int size; /**< Number of entries in array */ |
| 34 | f2l_entry_t *type; /**< type[i] determines what object array[i] points to */ |
| 35 | void **array; /**< target or implicit rule name or NULL. */ |
| 36 | } lineno_array_t; |
| 37 | |
| 38 | /*! |
| 39 | Initializes hash table file2lines. file2lines is used in breakpoints |
| 40 | only. So we do this on demand. |
| 41 | */ |
| 42 | extern bool file2lines_init(void); |
| 43 | extern file_t *target_for_file_and_line (const char *psz_filename, |
| 44 | unsigned int lineno, |
| 45 | /*out*/ f2l_entry_t *entry_type); |
| 46 | extern void file2lines_dump(void); |
| 47 | #endif |
| 48 | |
| 49 | /* |
| 50 | * Local variables: |
| 51 | * eval: (c-set-style "gnu") |
| 52 | * indent-tabs-mode: nil |
| 53 | * End: |
| 54 | */ |