Fix styling. Include decompress.h in search.c, not .h. Remove duplicated typedef.

This commit is contained in:
Geoff Greer 2016-06-21 02:06:18 -07:00
parent f6170cc557
commit fa35a7f86e
2 changed files with 2 additions and 8 deletions

View file

@ -1,3 +1,4 @@
#include "decompress.h"
#include "search.h"
#include "scandir.h"
@ -38,7 +39,7 @@ search_results_t *search_buf(const char *buf, const size_t buf_len, const char *
if (!opts.literal && opts.query_len == 1 && opts.query[0] == '.') {
/* Don't even PCRE, just match everything */
sr.matches_size = 1;
sr.matches = sr.matches == NULL ? ag_malloc(sr.matches_size * sizeof(match_t)): sr.matches;
sr.matches = sr.matches == NULL ? ag_malloc(sr.matches_size * sizeof(match_t)) : sr.matches;
sr.matches[0].start = 0;
sr.matches[0].end = buf_len;
sr.matches_len = 1;

View file

@ -34,13 +34,6 @@ typedef enum {
AG_BINARY_TRUE
} ag_binary_type;
typedef enum {
AG_NO_COMPRESSION,
AG_GZIP,
AG_COMPRESS,
AG_ZIP
} ag_compression_type;
typedef struct {
size_t start; /* Byte at which the match starts */
size_t end; /* and where it ends */