1
0
Fork 0

Merge branch 'devel' of github.com:triAGENS/ArangoDB into devel

This commit is contained in:
Michael Hackstein 2013-04-09 10:43:29 +02:00
commit 42e7e37aaa
8 changed files with 606 additions and 526 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,8 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 2.4.1. */ /* Bison interface for Yacc-like parsers in C
/* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -98,7 +96,7 @@
typedef union YYSTYPE typedef union YYSTYPE
{ {
/* Line 1676 of yacc.c */ /* Line 2132 of yacc.c */
#line 26 "arangod/Ahuacatl/ahuacatl-grammar.y" #line 26 "arangod/Ahuacatl/ahuacatl-grammar.y"
TRI_aql_node_t* node; TRI_aql_node_t* node;
@ -108,8 +106,8 @@ typedef union YYSTYPE
/* Line 1676 of yacc.c */ /* Line 2132 of yacc.c */
#line 113 "arangod/Ahuacatl/ahuacatl-grammar.h" #line 111 "arangod/Ahuacatl/ahuacatl-grammar.h"
} YYSTYPE; } YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */

View File

@ -809,6 +809,7 @@
var useColor = context.useColor; var useColor = context.useColor;
var customInspect = context.customInspect; var customInspect = context.customInspect;
var useToString = context.useToString;
if (typeof context.seen === "undefined") { if (typeof context.seen === "undefined") {
context.seen = []; context.seen = [];
@ -836,7 +837,7 @@
else if (value.__proto__ === Object.prototype) { else if (value.__proto__ === Object.prototype) {
printObject(value, context); printObject(value, context);
} }
else if (typeof value.toString === "function") { else if (typeof value === "function") {
// it's possible that toString() throws, and this looks quite ugly // it's possible that toString() throws, and this looks quite ugly
try { try {
@ -863,8 +864,20 @@
context.output += "[Function]"; context.output += "[Function]";
} }
} }
else if (useToString && typeof value.toString === "function") {
try {
context.output += value.toString();
}
catch (e) {
context.output += "[Object ";
printObject(value, context);
context.output += "]";
}
}
else { else {
context.output += "[Object ";
printObject(value, context); printObject(value, context);
context.output += "]";
} }
} }
else if (value === undefined) { else if (value === undefined) {
@ -875,58 +888,56 @@
context.output += "undefined"; context.output += "undefined";
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (typeof(value) === "string") {
if (useColor) {
context.output += colors.COLOR_STRING;
}
context.output += quoteJsonString(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (typeof(value) === "boolean") {
if (useColor) {
context.output += value ? colors.COLOR_TRUE : colors.COLOR_FALSE;
}
context.output += String(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (typeof(value) === "number") {
if (useColor) {
context.output += colors.COLOR_NUMBER;
}
context.output += String(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (value === null) {
if (useColor) {
context.output += colors.COLOR_NULL;
}
context.output += String(value);
if (useColor) { if (useColor) {
context.output += colors.COLOR_RESET; context.output += colors.COLOR_RESET;
} }
} }
else { else {
if (typeof(value) === "string") { context.output += String(value);
if (useColor) {
context.output += colors.COLOR_STRING;
}
context.output += quoteJsonString(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (typeof(value) === "boolean") {
if (useColor) {
context.output += value ? colors.COLOR_TRUE : colors.COLOR_FALSE;
}
context.output += String(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (typeof(value) === "number") {
if (useColor) {
context.output += colors.COLOR_NUMBER;
}
context.output += String(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (value === null) {
if (useColor) {
context.output += colors.COLOR_NULL;
}
context.output += String(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else {
context.output += String(value);
}
} }
} }
}; };
@ -1000,7 +1011,8 @@
output: "", output: "",
prettyPrint: usePrettyPrint, prettyPrint: usePrettyPrint,
useColor: useColor, useColor: useColor,
customInspect: true customInspect: true,
useToString: true
}; };
printRecursive(arguments[i], context); printRecursive(arguments[i], context);
@ -1040,7 +1052,8 @@
output: "", output: "",
prettyPrint: true, prettyPrint: true,
useColor: false, useColor: false,
customInspect: options && options.customInspect customInspect: options && options.customInspect,
useToString: false
}; };
printRecursive(object, context); printRecursive(object, context);

View File

@ -809,6 +809,7 @@
var useColor = context.useColor; var useColor = context.useColor;
var customInspect = context.customInspect; var customInspect = context.customInspect;
var useToString = context.useToString;
if (typeof context.seen === "undefined") { if (typeof context.seen === "undefined") {
context.seen = []; context.seen = [];
@ -836,7 +837,7 @@
else if (value.__proto__ === Object.prototype) { else if (value.__proto__ === Object.prototype) {
printObject(value, context); printObject(value, context);
} }
else if (typeof value.toString === "function") { else if (typeof value === "function") {
// it's possible that toString() throws, and this looks quite ugly // it's possible that toString() throws, and this looks quite ugly
try { try {
@ -863,8 +864,20 @@
context.output += "[Function]"; context.output += "[Function]";
} }
} }
else if (useToString && typeof value.toString === "function") {
try {
context.output += value.toString();
}
catch (e) {
context.output += "[Object ";
printObject(value, context);
context.output += "]";
}
}
else { else {
context.output += "[Object ";
printObject(value, context); printObject(value, context);
context.output += "]";
} }
} }
else if (value === undefined) { else if (value === undefined) {
@ -875,58 +888,56 @@
context.output += "undefined"; context.output += "undefined";
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (typeof(value) === "string") {
if (useColor) {
context.output += colors.COLOR_STRING;
}
context.output += quoteJsonString(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (typeof(value) === "boolean") {
if (useColor) {
context.output += value ? colors.COLOR_TRUE : colors.COLOR_FALSE;
}
context.output += String(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (typeof(value) === "number") {
if (useColor) {
context.output += colors.COLOR_NUMBER;
}
context.output += String(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (value === null) {
if (useColor) {
context.output += colors.COLOR_NULL;
}
context.output += String(value);
if (useColor) { if (useColor) {
context.output += colors.COLOR_RESET; context.output += colors.COLOR_RESET;
} }
} }
else { else {
if (typeof(value) === "string") { context.output += String(value);
if (useColor) {
context.output += colors.COLOR_STRING;
}
context.output += quoteJsonString(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (typeof(value) === "boolean") {
if (useColor) {
context.output += value ? colors.COLOR_TRUE : colors.COLOR_FALSE;
}
context.output += String(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (typeof(value) === "number") {
if (useColor) {
context.output += colors.COLOR_NUMBER;
}
context.output += String(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else if (value === null) {
if (useColor) {
context.output += colors.COLOR_NULL;
}
context.output += String(value);
if (useColor) {
context.output += colors.COLOR_RESET;
}
}
else {
context.output += String(value);
}
} }
} }
}; };
@ -1000,7 +1011,8 @@
output: "", output: "",
prettyPrint: usePrettyPrint, prettyPrint: usePrettyPrint,
useColor: useColor, useColor: useColor,
customInspect: true customInspect: true,
useToString: true
}; };
printRecursive(arguments[i], context); printRecursive(arguments[i], context);
@ -1040,7 +1052,8 @@
output: "", output: "",
prettyPrint: true, prettyPrint: true,
useColor: false, useColor: false,
customInspect: options && options.customInspect customInspect: options && options.customInspect,
useToString: false
}; };
printRecursive(object, context); printRecursive(object, context);

View File

@ -1212,7 +1212,7 @@ function require (path) {
libpath = fs.join(this._root, this._path, this._manifest[type]); libpath = fs.join(this._root, this._path, this._manifest[type]);
} }
else { else {
libpath = fs.join(this._root, this._path); libpath = fs.join(this._root, this._path, type);
} }
var pkg = new Package("application", var pkg = new Package("application",

View File

@ -159,7 +159,7 @@ _.extend(Application.prototype, {
}, },
registerRepository: function (name, opts) { registerRepository: function (name, opts) {
this.routingInfo.repositories[name] = opts; this.routingInfo.repositories[name] = opts || {};
}, },
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -6,7 +6,7 @@ dnl ----------------------------------------------------------------------------
TRI_ZLIB_VERSION="1.2.7" TRI_ZLIB_VERSION="1.2.7"
ZLIB_CPPFLAGS"=-I${srcdir}/3rdParty/zlib-${TRI_ZLIB_VERSION}/contrib/minizip" ZLIB_CPPFLAGS="-I${srcdir}/3rdParty/zlib-${TRI_ZLIB_VERSION}/contrib/minizip"
ZLIB_LDFLAGS="" ZLIB_LDFLAGS=""
ZLIB_LIBS="${srcdir}/3rdParty/zlib-${TRI_ZLIB_VERSION}/libz.a" ZLIB_LIBS="${srcdir}/3rdParty/zlib-${TRI_ZLIB_VERSION}/libz.a"

View File

@ -48,14 +48,12 @@ dnl ----------------------------------------------------------------------------
dnl check for header and library dnl check for header and library
dnl ---------------------------------------------------------------------------- dnl ----------------------------------------------------------------------------
ch_LIBEV="$tr_LIBEV" tr_LIBEV="yes"
AC_CHECK_HEADERS(ev.h, [tr_LIBEV="yes"], [tr_LIBEV="no"]) AC_CHECK_HEADERS(ev.h, [], [tr_LIBEV="no"])
if test "x$tr_LIBEV" = xyes; then AC_CHECK_LIB([rt], [clock_gettime], [LIBEV_LIBS="-lrt" LIBS="-lrt $LIBS"], [tr_LIBEV="no"])
AC_CHECK_LIB([rt], [clock_gettime], [LIBEV_LIBS="-lrt" LIBS="-lrt $LIBS"], ) AC_CHECK_LIB([ev], [ev_now], [LIBEV_LIBS="-lev $LIBEV_LIBS" tr_LIBEV="yes"], [tr_LIBEV="no"])
AC_CHECK_LIB([libev], [ev_now], [LIBEV_LIBS="-lev $LIBEV_LIBS" tr_LIBEV="yes"], )
fi
if test "x$tr_LIBEV" != xyes; then if test "x$tr_LIBEV" != xyes; then
AC_MSG_ERROR([Please install libev from http://software.schmorp.de/pkg/libev.html]) AC_MSG_ERROR([Please install libev from http://software.schmorp.de/pkg/libev.html])