Commit Graph

1439 Commits

Author SHA1 Message Date
gingerBill
ebbc33fdb5 Mockup of the new package os interface (incomplete and non-functioning) 2021-04-14 19:39:12 +01:00
gingerBill
3e54cddf64 Merge pull request #902 from Kelimion/run_as_user
Add support to core:windows to add/delete users.
2021-04-14 12:15:30 +01:00
gingerBill
d602709133 Fix typo 2021-04-14 12:14:44 +01:00
gingerBill
8e1120bc09 Fix typo 2021-04-13 19:23:12 +01:00
gingerBill
ebed29fc09 Revert *nix thread stuff to old sync
(I was just testing)
2021-04-13 19:09:04 +01:00
gingerBill
bee8beb2c9 Default to pthreads in sync2 for *nix 2021-04-13 19:04:44 +01:00
Jeroen van Rijn
2942e45ff5 Placate -vet for unrelated core:thread update. 2021-04-13 02:23:14 +02:00
Jeroen van Rijn
aca5c7c1c6 Placate -vet. 2021-04-13 02:18:47 +02:00
Jeroen van Rijn
a1d871360c Add support to core:windows to add/delete users.
main :: proc() {

	using fmt;
	using windows;

	username := "testuser";
	password := "testpass";

	ok := add_user("", username, password);
	fmt.printf("add_user: %v\n", ok);
	pi := windows.PROCESS_INFORMATION{};

	ok2, path := windows.add_user_profile(username);
	fmt.printf("add_user_profile: %v, %v\n", ok2, path);

	ok3 := windows.delete_user_profile(username);
	fmt.printf("delete_user_profile: %v\n", ok3);

	ok4 := windows.delete_user("", username);
	fmt.printf("delete_user: %v\n", ok4);

	// Has optional bool to not wait on the process before returning.
	b := run_as_user(username, password, "C:\\Repro\\repro.exe", "Hellope!", &pi);
	fmt.printf("run_as_user: %v %v\n", b, pi);
}
2021-04-13 02:09:44 +02:00
gingerBill
2b36069924 Fix typo 2021-04-12 17:13:05 +01:00
gingerBill
4fb4ada2c7 Update sync2 to just use atomic intrinsics rather than the parapoly wrappers 2021-04-12 15:22:40 +01:00
gingerBill
e3ee005404 Clean up path_unix.odin to make it not depend on package os 2021-04-11 19:05:01 +01:00
gingerBill
1156bd9dd0 Remove thread stuff from sync2; Cleanup package thread 2021-04-11 18:25:56 +01:00
gingerBill
52c193316b Add Thread stuff to new sync package 2021-04-11 15:36:55 +01:00
gingerBill
2db1fe7429 New redesign of core:sync (stored under core:sync/sync2 for the time being) 2021-04-11 15:18:28 +01:00
vassvik
8169cb4853 Fix missing newlines in core:math/linalg/specific.odin 2021-04-09 09:21:20 +02:00
gingerBill
394e4fcbad Add __extendhfsf2 for macOS 2021-04-05 18:44:08 +01:00
gingerBill
bcda9ddee7 Add core:math/fixed 2021-04-01 17:09:34 +01:00
gingerBill
0fc04a939e Add f16 support to core:math/linalg 2021-04-01 11:12:40 +01:00
gingerBill
63bb26c0e0 Add f16 specific procedures to core:math 2021-04-01 10:52:46 +01:00
gingerBill
54e6c50769 Implement f16 functionality 2021-04-01 10:06:00 +01:00
DanielGavin
c429c85ade Merge remote-tracking branch 'upstream/master' into parser 2021-03-30 12:42:11 +02:00
DanielGavin
02bbac0903 changed error 2021-03-30 12:40:40 +02:00
DanielGavin
b8658547e0 Give error if raw literal hits EOF, and stop removing .Using if it exists in flags and allowed_flags. 2021-03-30 12:38:58 +02:00
gingerBill
2c14accfd0 Merge pull request #879 from Kelimion/partial_hash_updates
Allow seeding CRC32, CRC64 & Adler32 with previous partial hash.
2021-03-30 11:20:19 +01:00
gingerBill
fc8c94324e Fix typo 2021-03-29 15:43:33 +01:00
gingerBill
0ccf103160 Fix byte swapping for endian specific types in -llvm-api 2021-03-27 12:48:29 +00:00
gingerBill
43ac6ca8f4 Add linalg.matrix_cast 2021-03-26 16:24:56 +00:00
gingerBill
62d2656f69 Add linalg.matrix_cast 2021-03-26 14:33:46 +00:00
breeo
24e7b5ea78 Add container.Priority_Queue 2021-03-25 15:50:33 +01:00
Jeroen van Rijn
f4d0f74dbb Allow seeding CRC32, CRC64 & Adler32 with previous partial hash.
Foo  := []u8{'F', 'o','o', '3', 'F', 'o', 'o', '4'};
crc     := hash.crc32(Foo[0:4]);
crc      = hash.crc32(Foo[4:], crc);
crc_all := hash.crc32(Foo);

fmt.printf("%8x %8x\n", crc, crc_all);
d6285ff7 d6285ff7

a32     := hash.adler32(Foo[0:4]);
a32      = hash.adler32(Foo[4:], a32);
a32_all := hash.adler32(Foo);

fmt.printf("%8x %8x\n", a32, a32_all);
0c5102b0 0c5102b0
2021-03-25 13:48:34 +01:00
gingerBill
7a045bd957 Merge pull request #877 from Kelimion/datetime
Add core:datetime_to_time
2021-03-24 16:59:19 +00:00
gingerBill
bec42e8dd3 Improve core:odin/ast ast.Range_Stmt to use generic number of vals rather than the fixed two to aid with parsing errors 2021-03-24 12:34:06 +00:00
gingerBill
08f7d3edbe Allow $ in polymorphic record parameter fields (but disallow mixing) 2021-03-23 22:59:10 +00:00
Jeroen van Rijn
06c5a7fb3e Correct overflowed months. 2021-03-23 18:49:50 +01:00
Jeroen van Rijn
781f784375 Add core:datetime_to_time
datetime_to_time takes separate parameters for date and time values and returns a time.Time and an `ok` bool.

If the values are out of range, they're considered modulo and ok will be set to false.
2021-03-23 18:41:40 +01:00
gingerBill
3337412228 split*_iterator procedures for package bytes and strings 2021-03-18 13:26:33 +00:00
gingerBill
e3f9d99a3b Merge branch 'master' of https://github.com/odin-lang/Odin 2021-03-18 13:25:47 +00:00
gingerBill
359ae29d98 Minor fixes 2021-03-18 13:25:41 +00:00
Jeroen van Rijn
d80670fe0c Fix typo in cubic(). 2021-03-16 16:34:59 +01:00
gingerBill
04e0cacd30 Update package core:math/linalg to support matrix3 euler angle operations 2021-03-16 12:14:54 +00:00
gingerBill
f5142aaec4 Change from test_* prefix to @(test) attribute for odin test 2021-03-14 18:43:21 +00:00
gingerBill
db0ac2ba98 Add "NO TESTS RAN" message to testing.runner if no tests were ran 2021-03-14 18:17:00 +00:00
gingerBill
468ad4837b Add pkg field to testing.Internal_Test 2021-03-14 18:15:08 +00:00
gingerBill
2aa588209e odin test to work with the new core:testing package 2021-03-14 18:01:31 +00:00
gingerBill
10f91a0d3f Make base32 and base64 adhere to -strict-style 2021-03-14 12:54:28 +00:00
gingerBill
a60d22fefd Make trailing comma usage consistent 2021-03-13 21:18:07 +00:00
gingerBill
3ff7bded64 Add intrinsics.volatile_store and intrinsics.volatile_load 2021-03-09 11:40:36 +00:00
gingerBill
083cec6c88 Remove dead code 2021-03-06 16:11:54 +00:00
gingerBill
1988856eed Minimize the size of runtime.Source_Code_Location to use i32 instead of int 2021-03-05 12:56:36 +00:00