]> granicus.if.org Git - jq/commitdiff
Merge remote-tracking branch 'stagrlee/master' into autotools
authorStephen Dolan <mu@netsoc.tcd.ie>
Tue, 7 May 2013 23:52:24 +0000 (00:52 +0100)
committerStephen Dolan <mu@netsoc.tcd.ie>
Tue, 7 May 2013 23:52:24 +0000 (00:52 +0100)
Conflicts:
Makefile
jq_test.c

1  2 
builtin.c
docs/Rakefile
execute.c
jq_test.c
main.c
parser.y

diff --cc builtin.c
index 39570188d1d55deae6d90032a3b0b6cfa6e32542,b09bd96157a1402202b5b9cc4b7556ec88687b55..4fb14dc7d7c50e6504470cfac87b5e5a60038e9d
+++ b/builtin.c
@@@ -1,7 -1,8 +1,7 @@@
  #include <string.h>
  #include "builtin.h"
 -#include "bytecode.h"
  #include "compile.h"
- #include "parser.h"
+ #include "jq_parser.h"
  #include "locfile.h"
  #include "jv_aux.h"
  #include "jv_unicode.h"
diff --cc docs/Rakefile
Simple merge
diff --cc execute.c
Simple merge
diff --cc jq_test.c
index 64b88fb6658568fcf9e500e3ee1d5c14bb953d68,9cdbdba4c1234ddb8765ba932085a7bef9d9075f..39f2664f53bf2b97ecd1365eb462e1d1b3c54b07
+++ b/jq_test.c
@@@ -8,9 -8,10 +8,9 @@@
  static void jv_test();
  static void run_jq_tests();
  
- FILE* testdata;
  
 -int main(int argc, char* argv[]) {
 +int jq_testsuite(int argc, char* argv[]) {
+   FILE* testdata;
 -
    jv_test();
    if (argc == 1) {
      testdata = fopen("testdata", "r");
@@@ -24,9 -36,8 +35,9 @@@
      printf("usage: %s OR cat testdata | %s - OR %s testdata\n", argv[0], argv[0], argv[0]);
      return 127;
    }
-   run_jq_tests();
+   run_jq_tests(testdata);
    if (testdata != stdin) fclose(testdata);
 +  return 0;
  }
  
  
@@@ -39,10 -50,9 +50,10 @@@ static int skipline(const char* buf) 
    return 0;
  }
  
- static void run_jq_tests() {
+ static void run_jq_tests(FILE *testdata) {
    char buf[4096];
    int tests = 0, passed = 0, invalid = 0;
 +  jq_state *jq = NULL;
  
    while (1) {
      if (!fgets(buf, sizeof(buf), testdata)) break;
diff --cc main.c
index 423510b6e3e7382c0b0243e23a99881e34165c69,17019a8dd5c894d7a1512828c93b3a08bd28f2c3..4b0d496d9c1671bf9b63ea40140092fd05c74e29
--- 1/main.c
--- 2/main.c
+++ b/main.c
@@@ -5,14 -5,15 +5,14 @@@
  #include <ctype.h>
  #include <unistd.h>
  #include "compile.h"
 -#include "builtin.h"
  #include "jv.h"
  #include "jv_parse.h"
 -#include "locfile.h"
 -#include "parser.h"
  #include "execute.h"
+ #include "config.h"  /* Autoconf generated header file */
  #include "jv_alloc.h"
- #include "version.gen.h"
  
 +int jq_testsuite(int argc, char* argv[]);
 +
  static const char* progname;
  
  static void usage() {
diff --cc parser.y
Simple merge