Skip to content

Commit

Permalink
Merge pull request #208 from Kray-G/develop
Browse files Browse the repository at this point in the history
Merge to the latest.
  • Loading branch information
Kray-G committed Feb 15, 2021
2 parents e0c1459 + af20550 commit a84a531
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 50 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ rebuild:
cp -f build/kxrepl ./
cp -f build/kxtest ./
cp -f build/*.so* ./

install:
(cd build; make install)

4 changes: 2 additions & 2 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ kxdouble.so: $(SRCDIR)/extlib/kxdouble.c $(PICOBJS)
kxarray.so: $(SRCDIR)/extlib/kxarray.c $(PICOBJS)
$(CC) $(CFLAGS) -fPIC -o $@ -shared $< $(PICOBJS)

kxfile.so: $(SRCDIR)/extlib/kxfile.c $(PICOBJS) libz.so
$(CC) $(CFLAGS) -fPIC -o $@ -shared $< $(PICOBJS) $(SRCDIR)/extlib/zip/x64/gcc/libminizip.a -Wl,-rpath,'$$ORIGIN' -L. -lz
kxfile.so: $(SRCDIR)/extlib/kxfile.c $(PICOBJS) libz.so libcrypto.so
$(CC) $(CFLAGS) -fPIC -o $@ -shared $< $(PICOBJS) $(SRCDIR)/extlib/zip/x64/gcc/libminizip.a -Wl,-rpath,'$$ORIGIN' -L. -lcrypto -lz

kxdebugger.so: $(SRCDIR)/extlib/kxdebugger.c $(PICOBJS)
$(CC) $(CFLAGS) -fPIC -o $@ -shared $< $(PICOBJS) -Wl,-rpath,'$$ORIGIN'
Expand Down
15 changes: 8 additions & 7 deletions build/Makefile.msc
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ RCFILE = \
.SUFFIXES :
.SUFFIXES : .c .obj

all: timex kinx zlib.dll libxml2.dll libssh2.dll libssl-3.dll libcrypto-3.dll $(SOFILES) main_kxcmd
all: timex kinx zlib.dll libxml2.dll libssh2.dll libssl-3-x64.dll libcrypto-3-x64.dll $(SOFILES) main_kxcmd

lib: $(SOFILES)

Expand Down Expand Up @@ -253,12 +253,13 @@ kxssh.dll: $(SRCDIR)/extlib/kxssh.c $(PICOBJS) onig.dll
kxsqlite.dll: $(SRCDIR)/extlib/kxsqlite.c $(PICOBJS) sqlite3.obj
$(CC) /LD $(CFLAGS) /Fe$@ $(SRCDIR)/extlib/kxsqlite.c $(PICOBJS) sqlite3.obj

kxnet.dll: $(SRCDIR)/extlib/kxnet.c $(PICOBJS) libssl-3.dll libcrypto-3.dll
kxnet.dll: $(SRCDIR)/extlib/kxnet.c $(PICOBJS) libssl-3-x64.dll libcrypto-3-x64.dll
$(CC) /LD $(CFLAGS) /Fe$@ $(SRCDIR)/extlib/kxnet.c $(PICOBJS) \
$(SRCDIR)\extlib\libcurl\x64\vs2017\libcurl_a.lib \
$(SRCDIR)\extlib\openssl\x64\vs2017\libssl.lib \
$(SRCDIR)\extlib\openssl\x64\vs2017\libcrypto.lib \
$(SRCDIR)\extlib\zip\x64\vs2017\zlib.lib
$(SRCDIR)\extlib\zip\x64\vs2017\zlib.lib \
advapi32.lib

kxxml.dll: $(SRCDIR)/extlib/kxxml.c $(PICOBJS)
$(CC) /LD $(CFLAGS) /I $(SRCDIR)/extlib/libxml2/include/libxml2 /Fe$@ $(SRCDIR)/extlib/kxxml.c $(PICOBJS) $(SRCDIR)/extlib/libxml2/x64/vs2017/libxml2.lib
Expand All @@ -278,11 +279,11 @@ libxml2.dll:
libssh2.dll:
copy /y $(SRCDIR)\extlib\libssh2\x64\vs2017\libssh2.dll libssh2.dll

libssl-3.dll:
copy /y $(SRCDIR)\extlib\openssl\x64\vs2017\libssl-3.dll libssl-3.dll
libssl-3-x64.dll:
copy /y $(SRCDIR)\extlib\openssl\x64\vs2017\libssl-3-x64.dll libssl-3-x64.dll

libcrypto-3.dll:
copy /y $(SRCDIR)\extlib\openssl\x64\vs2017\libcrypto-3.dll libcrypto-3.dll
libcrypto-3-x64.dll:
copy /y $(SRCDIR)\extlib\openssl\x64\vs2017\libcrypto-3-x64.dll libcrypto-3-x64.dll

zip/x64/vs2017/minizip.lib:
echo Build minizip.lib first.
Expand Down
9 changes: 0 additions & 9 deletions docs/spec/definition/lambda.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ var doit = { => _1() };

When the block style without an arrow of `=>` operator, it can be just like a block statement with argument list inside block.

```javascript
var add = { &(a, b):
return a + b;
};
System.println(add(1, 2)); // => 3
```

The ':' in the above example can be omitted. You can just use it as a separator if you want it.

```javascript
var add = { &(a, b)
return a + b;
Expand Down
8 changes: 2 additions & 6 deletions examples/blockfunc.kx
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,12 @@ System.println(r);
var r = f(3, 10) { &(a, b) return a + b; };
System.println(r);

# ':' is available for distinguishing parameters and a statement list.
var r = f(4, 10) { &(a, b): return a + b; };
System.println(r);

# Can put a statement list directly without a parameter list.
var r = f(5, 10) { return _1 * _2; };
System.println(r);

# No sense, but it is okay without statements.
var r = f(6, 10) { &(a, b) };
# No sense.
var r = f(6, 10) { &(a, b) ; };
System.println(r.isUndefined);

# This means nothing to do, it can be used for ignoring callback, etc.
Expand Down
5 changes: 3 additions & 2 deletions examples/ssh.kx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ using net.Ssh;

var [, user, pass] = $$;


var ssh = new Net.Ssh("127.0.0.1");
ssh.setTimeout(100); # for connection timeout.
ssh.open { &(con):
# ssh.setTimeout(100); # for connection timeout.
ssh.open { &(con)
System.println("Fingerprint: ", con.getFingerprint());

con.setTimeout(10000); # for user auth timeout.
Expand Down
2 changes: 1 addition & 1 deletion lib/std/net/http.kx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ _namespace Net {
}

public setProxyUserPassword(user, pass) {
curl_.setOptionInt(Net.CURLOPT_PROXYUSERPWD, user + ":" + pass);
curl_.setOptionString(Net.CURLOPT_PROXYUSERPWD, user + ":" + pass);
return this;
}

Expand Down
46 changes: 23 additions & 23 deletions src/extlib/version.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# x64
## Platform: x64

## Windows VS2019
### Windows VS2019

| Name | Type | Version | Updated | Repository |
| ---------- | :---: | :-----: | :--------: | ------------------------------------- |
| oniguruma | Src | 6.9.6 | 2021.02.12 | https://github.com/kkos/oniguruma.git |
| sqlite3 | Src | 3.34.1 | 2021.02.12 | https://www.sqlite.org/ |
| minizip-ng | Lib | 3.0.0 | 2021.02.12 | https://github.com/zlib-ng/minizip-ng |
| OpenSSL | Lib | 3.0 | 2021.02.12 | https://github.com/openssl/openssl |
| libxml2 | Lib | 2.9.9 | 2020.03.04 | |
| libssh2 | Lib | | | |
| libcurl | Lib | 7.76.0 | | https://github.com/curl/curl |
| libharu | Lib | | | |
| Name | Type | Version | Updated | Repository |
| ---------- | :---: | :--------------: | :--------: | ------------------------------------- |
| oniguruma | Src | 6.9.6 | 2021.02.12 | https://github.com/kkos/oniguruma |
| sqlite3 | Src | 3.34.1 | 2021.02.12 | https://www.sqlite.org/ |
| minizip-ng | Lib | 3.0.0 | 2021.02.12 | https://github.com/zlib-ng/minizip-ng |
| OpenSSL | Lib | 3.0.0alpha12-dev | 2021.02.15 | https://github.com/openssl/openssl |
| libxml2 | Lib | 2.9.10 | 2021.02.15 | https://github.com/GNOME/libxml2 |
| libssh2 | Lib | 1.9.0 | 2021.02.15 | https://github.com/libssh2/libssh2 |
| libcurl | Lib | 7.76.0 | 2021.02.15 | https://github.com/curl/curl |
| libharu | Lib | 2.3.0 RC2 | 2020.08.21 | https://github.com/libharu/libharu |

## Linux gcc 7.5.0
### Linux gcc 7.5.0

| Name | Type | Version | Updated | Repository |
| --------- | :---: | :-----: | :--------: | ------------------------------------- |
| oniguruma | Src | 6.9.6 | 2020.02.12 | https://github.com/kkos/oniguruma.git |
| sqlite3 | Src | 3.34.1 | 2021.02.12 | https://www.sqlite.org/ |
| OpenSSL | Lib | | | |
| minizip | Lib | 2.9.2 | 2020.02.28 | |
| libxml2 | Lib | 2.9.9 | 2020.03.04 | |
| libssh2 | Lib | | | |
| libcurl | Lib | | | |
| libharu | Lib | | | |
| Name | Type | Version | Updated | Repository |
| ---------- | :---: | :--------------: | :--------: | ------------------------------------- |
| oniguruma | Src | 6.9.6 | 2021.02.12 | https://github.com/kkos/oniguruma |
| sqlite3 | Src | 3.34.1 | 2021.02.12 | https://www.sqlite.org/ |
| minizip-ng | Lib | 3.0.0 | 2021.02.15 | https://github.com/zlib-ng/minizip-ng |
| OpenSSL | Lib | 3.0.0alpha12-dev | 2021.02.15 | https://github.com/openssl/openssl |
| libxml2 | Lib | 2.9.10 | 2021.02.15 | https://github.com/GNOME/libxml2 |
| libssh2 | Lib | 1.9.0 | 2021.02.15 | https://github.com/libssh2/libssh2 |
| libcurl | Lib | 7.76.0 | 2021.02.15 | https://github.com/curl/curl |
| libharu | Lib | 2.3.0 RC2 | 2020.08.21 | https://github.com/libharu/libharu |

0 comments on commit a84a531

Please sign in to comment.