Skip to content

Commit d11f0b9

Browse files
Merge pull request #27 from Jun-Software/development
v1.14.11
2 parents 773b442 + 7dd3d92 commit d11f0b9

File tree

7 files changed

+3645
-2
lines changed

7 files changed

+3645
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.9)
2-
project(JunLang VERSION 1.14.10 LANGUAGES CXX)
3-
set(CMAKE_CXX_STANDARD 17)
2+
project(JunLang VERSION 1.14.11 LANGUAGES CXX)
3+
set(CMAKE_CXX_STANDARD 11)
44
set(CMAKE_CXX_STANDARD_REQUIRED ON)
55
set(CMAKE_CXX_EXTENSIONS OFF)
66
add_executable(JunLang src/main.cpp)

curl/COPYING.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
COPYRIGHT AND PERMISSION NOTICE
2+
3+
Copyright (c) 1996 - 2023, Daniel Stenberg, <daniel@haxx.se>, and many
4+
contributors, see the THANKS file.
5+
6+
All rights reserved.
7+
8+
Permission to use, copy, modify, and distribute this software for any purpose
9+
with or without fee is hereby granted, provided that the above copyright
10+
notice and this permission notice appear in all copies.
11+
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
15+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
16+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
17+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
18+
OR OTHER DEALINGS IN THE SOFTWARE.
19+
20+
Except as contained in this notice, the name of a copyright holder shall not
21+
be used in advertising or otherwise to promote the sale, use or other dealings
22+
in this Software without prior written authorization of the copyright holder.

curl/README.txt

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
_ _ ____ _
2+
___| | | | _ \| |
3+
/ __| | | | |_) | |
4+
| (__| |_| | _ <| |___
5+
\___|\___/|_| \_\_____|
6+
7+
README
8+
9+
Curl is a command line tool for transferring data specified with URL
10+
syntax. Find out how to use curl by reading the curl.1 man page or the
11+
MANUAL document. Find out how to install Curl by reading the INSTALL
12+
document.
13+
14+
libcurl is the library curl is using to do its job. It is readily
15+
available to be used by your software. Read the libcurl.3 man page to
16+
learn how.
17+
18+
You find answers to the most frequent questions we get in the FAQ document.
19+
20+
Study the COPYING file for distribution terms.
21+
22+
Those documents and more can be found in the docs/ directory.
23+
24+
CONTACT
25+
26+
If you have problems, questions, ideas or suggestions, please contact us
27+
by posting to a suitable mailing list. See https://curl.se/mail/
28+
29+
All contributors to the project are listed in the THANKS document.
30+
31+
WEBSITE
32+
33+
Visit the curl website for the latest news and downloads:
34+
35+
https://curl.se/
36+
37+
GIT
38+
39+
To download the latest source code off the GIT server, do this:
40+
41+
git clone https://github.com/curl/curl.git
42+
43+
(you will get a directory named curl created, filled with the source code)
44+
45+
SECURITY PROBLEMS
46+
47+
Report suspected security problems via our HackerOne page and not in public.
48+
49+
https://hackerone.com/curl
50+
51+
NOTICE
52+
53+
Curl contains pieces of source code that is Copyright (c) 1998, 1999
54+
Kungliga Tekniska Högskolan. This notice is included here to comply with the
55+
distribution terms.

curl/curl-ca-bundle.crt

Lines changed: 3534 additions & 0 deletions
Large diffs are not rendered by default.

curl/curl.exe

3.01 MB
Binary file not shown.

src/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#include "init.hpp"
22
#include "read.hpp"
3+
#include "update.hpp"
34
int main(int argc, char* argv[]) {
45
// Check if there is a filename.
56
if (argc == 1) {
67
// Output usage.
78
cout << "JunLang " << _VERSION_ << endl;
89
cout << "Usage: " << argv[0] << " [filename]" << endl;
10+
update();
911
exit(0);
1012
}
1113
// Read file.
1214
read(argv);
15+
// Check update.
16+
update();
1317
return 0;
1418
}

src/update.hpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#include <cstdlib>
2+
#include <cstdio>
3+
#include <string>
4+
5+
string execute(const char *command) {
6+
char buffer[1024];
7+
char result[1024] = {0};
8+
FILE *ptr;
9+
strcpy(result, command);
10+
if((ptr = popen(result, "r"))) {
11+
while (fgets(buffer, 1024, ptr)) {
12+
strcat(result, buffer);
13+
if (strlen(result) > 1024) {
14+
break;
15+
}
16+
}
17+
pclose(ptr);
18+
ptr = NULL;
19+
}
20+
return result;
21+
}
22+
23+
void update() {
24+
string result = execute("curl -s https://junlang.imjcj.eu.org/VERSION").substr(41);
25+
if (result != _VERSION_) {
26+
cout << "Warning: Upgrade JunLang: \"https://junlang.imjcj.eu.org\"" << endl;
27+
}
28+
}

0 commit comments

Comments
 (0)