From 8c183b526ba8f225684f6431836138a9cffae509 Mon Sep 17 00:00:00 2001 From: Jan Mercl <0xjnml@gmail.com> Date: Mon, 5 Jun 2017 20:13:10 +0200 Subject: Release the {cgo,VM}-free Linux/Intel version. modified: Makefile new file: all_linux_test.go renamed: all_test.go -> all_test_windows.go new file: doc.go new file: generate_linux.go new file: generate_windows.go modified: generator.go new file: generator_windows.go modified: internal/bin/bin_linux_386.go modified: internal/bin/bin_linux_amd64.go modified: main.c modified: sqlite.go modified: sqlite_go18.go new file: sqlite_windows.go --- main.c | 44 +++++++++----------------------------------- 1 file changed, 9 insertions(+), 35 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 50d19fd..4fe3ac4 100644 --- a/main.c +++ b/main.c @@ -1,30 +1,9 @@ -// +build ignore - +// Copyright 2017 The Sqlite Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. // SQLite Is Public Domain -// -// All of the code and documentation in SQLite has been dedicated to the public -// domain by the authors. All code authors, and representatives of the -// companies they work for, have signed affidavits dedicating their -// contributions to the public domain and originals of those signed affidavits -// are stored in a firesafe at the main offices of Hwaci. Anyone is free to -// copy, modify, publish, use, compile, sell, or distribute the original SQLite -// code, either in source code form or as a compiled binary, for any purpose, -// commercial or non-commercial, and by any means. -// -// The previous paragraph applies to the deliverable code and documentation in -// SQLite - those parts of the SQLite library that you actually bundle and ship -// with a larger application. Some scripts used as part of the build process -// (for example the "configure" scripts generated by autoconf) might fall under -// other open-source licenses. Nothing from these build scripts ever reaches -// the final deliverable SQLite library, however, and so the licenses -// associated with those scripts should not be a factor in assessing your -// rights to copy and use the SQLite library. -// -// All of the deliverable code in SQLite has been written from scratch. No code -// has been taken from other projects or from the open internet. Every line of -// code can be traced back to its original author, and all of those authors -// have public domain dedications on file. So the SQLite code base is clean and -// is uncontaminated with licensed code from other projects. + +// +build ignore #define minAlloc (2<<5) @@ -33,16 +12,11 @@ int main(int argc, char **argv) { - if (argc != 2) { - return 1; - } - - int heapSize = 0; - char *p = argv[1]; - for (; *p; p++) { - heapSize = 10 * heapSize + *p - '0'; - } + init(-1); +} +int init(int heapSize) +{ void *heap = malloc(heapSize); if (heap == 0) { return 1; -- cgit v1.2.3-70-g09d2