all: add copyright

pull/417/head
chai2010 2019-06-23 10:21:30 +08:00 committed by Alex Medvednikov
parent 461b78bc77
commit 978ec58fe3
47 changed files with 186 additions and 1 deletions

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module builtin module builtin
struct array { struct array {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module builtin module builtin
pub fn exit(reason string) { pub fn exit(reason string) {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module builtin module builtin
fn (d double) str() string { fn (d double) str() string {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module builtin module builtin
struct map { struct map {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module builtin module builtin
struct Option { struct Option {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module builtin module builtin
struct Entry2 { struct Entry2 {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module builtin module builtin
// V strings are not null-terminated. // V strings are not null-terminated.

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module builtin module builtin
struct StringBuilder { struct StringBuilder {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
fn test_add() { fn test_add() {
mut a := 'a' mut a := 'a'
a += 'b' a += 'b'

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module builtin module builtin
fn (s string) is_utf8() int { fn (s string) is_utf8() int {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module main module main
struct CGen { struct CGen {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module main module main
const ( const (

View File

@ -1,6 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved. // Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license // Use of this source code is governed by an MIT license
// that can be found in the LICENSE file. // that can be found in the LICENSE file.
module main module main
// TODO replace with comptime code generation. // TODO replace with comptime code generation.

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module main module main
import os import os

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module main module main
import rand import rand

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module main module main
struct Scanner { struct Scanner {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module main module main
struct Table { struct Table {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module main module main
enum Token { enum Token {

View File

@ -1 +1,5 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
println('Hello!') println('Hello!')

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
import http import http
fn main() { fn main() {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
import http import http
import json import json
import sync import sync

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
import rand import rand
import time import time
import gx import gx

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
import os import os
fn main() { fn main() {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module gg module gg
import stbi import stbi

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module gl module gl
import os import os

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module gl module gl
import const ( import const (

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module glfw module glfw
// Debugging a custom build // Debugging a custom build

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module glm module glm
import math import math

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module gx module gx
struct Color { struct Color {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module http module http
import os import os

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module http module http
import os import os

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module http module http
fn download_file_with_progress(url, out string, cb, cb_finished voidptr) { fn download_file_with_progress(url, out string, cb, cb_finished voidptr) {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module http module http
struct Request { struct Request {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module http module http
#include <curl/curl.h> #include <curl/curl.h>
@ -125,7 +129,7 @@ fn (req &Request) do() Response {
h := '$key: $val' h := '$key: $val'
hlist = C.curl_slist_append(hlist, h.cstr()) hlist = C.curl_slist_append(hlist, h.cstr())
} }
// curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, // (long)CURL_HTTP_VERSION_2TLS);ô`CÒÊ€9À // curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, // (long)CURL_HTTP_VERSION_2TLS);<EFBFBD>`C<>ʀ9<CA80>
C.curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1) C.curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1)
if req.verbose { if req.verbose {
C.curl_easy_setopt(curl, CURLOPT_VERBOSE, 1) C.curl_easy_setopt(curl, CURLOPT_VERBOSE, 1)

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module http module http
#flag -lwininet #flag -lwininet

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module json module json
// #include "json/cJSON/cJSON.c" // #include "json/cJSON/cJSON.c"

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module os module os
#include <sys/stat.h> #include <sys/stat.h>

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module os module os
#include <execinfo.h> #include <execinfo.h>

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module os module os
fn ls(path string) []string { fn ls(path string) []string {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module rand module rand
#include <time.h> #include <time.h>

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module stbi module stbi
#include "glad.h" #include "glad.h"

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module sync module sync
#include <pthread.h> #include <pthread.h>

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module sync module sync
struct Mutex { struct Mutex {

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module time module time
import rand import rand

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module time module time
// in ms // in ms

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module time module time
//#flag -framework CoreServices //#flag -framework CoreServices

View File

@ -1,3 +1,7 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module time module time
// in ms // in ms