Commit Graph

375 Commits

Author SHA1 Message Date
Kovid Goyal
e818f01ff2 Ensure palette is large enough to avoid panics with invalid images that have pixels refering to colors not in the palette 2024-03-22 10:01:20 +05:30
Kovid Goyal
e11081ac09 Use exiffix rather than imaging to handle EXIF rotation
exiffix works for more formats than just JPEG
2024-03-22 09:35:39 +05:30
Kovid Goyal
210c417d96 ... 2024-03-06 10:41:39 +05:30
Kovid Goyal
16d36c46fe Update to using math/rand/v2 2024-02-25 09:57:43 +05:30
Kovid Goyal
777fd5350b Add a test for Go flock implementation 2024-02-09 11:54:51 +05:30
Kovid Goyal
a1f2a7df4d Port new shlex code to Go 2023-12-04 14:14:11 +05:30
Kovid Goyal
314fe4fe4a Allow launched background process to work with --allow-remote-control
Use a dedicated socketpair for such processes. Fixes #6712
2023-10-18 19:56:58 +05:30
Kovid Goyal
c280a28155 Dont use os.Remove on failures in syscall_shm
Use shm_unlink instead
2023-09-23 11:16:30 +05:30
Kovid Goyal
24598b846c ... 2023-09-23 11:09:51 +05:30
Kovid Goyal
dc43f0d42f ... 2023-09-23 11:08:55 +05:30
Kovid Goyal
5fede41205 Always use fallocate() on Linux for SHM creation 2023-09-23 10:55:15 +05:30
Kovid Goyal
6619bf33b0 Using fcntl() based fallocate on darwin doesnt work with file descriptors returned by shm_open 2023-09-23 10:39:10 +05:30
Kovid Goyal
38bac98c12 Fix build of fallocate_darwin.go 2023-09-23 10:08:04 +05:30
Kovid Goyal
2e4f3dab41 Use fallocate() rather than truncate() when creating SHM memory
With truncate() the OS might not actually allocate the space leading to
a SIGBUS if /dev/shm runs out of space when actually using the mmap.

By using fallocate we ensure that once the SHM mmap is created it wont
fail
2023-09-23 09:53:17 +05:30
Kovid Goyal
7faf216f9e More linter fixes 2023-09-18 20:59:47 +05:30
Kovid Goyal
863adb3e8d Go: Fix parsing of nullable colors
Fixes #6629
2023-09-15 20:36:24 +05:30
Kovid Goyal
5c4efc0fd7 ... 2023-09-14 08:24:43 +05:30
Kovid Goyal
93618842ae Make a couple of other Set API functions nil-safe 2023-09-12 15:37:24 +05:30
Kovid Goyal
2d7bbf60cc Fix #6615 2023-09-12 15:34:09 +05:30
Kovid Goyal
d1d888ce19 Remove unnecessary copy of the decoder array 2023-09-04 22:28:18 +05:30
Kovid Goyal
1f4386fd08 ... 2023-09-04 21:44:46 +05:30
Kovid Goyal
34e5c7f8aa Ensure efficient conversion for base85 string API 2023-09-04 21:39:03 +05:30
Kovid Goyal
541c0cdde4 Do not build decode table for base85 until it is actually needed
Also make the tests actual tests
2023-09-04 21:32:25 +05:30
Kovid Goyal
0107d1cb89 Import base85.go into tree
Upstream is not maintained last commit was six years ago and there
are various improvements to be had in the code
2023-09-04 20:29:20 +05:30
Kovid Goyal
4f72bb9894 Replace utils.Once with stdlib sync.OnceValue 2023-08-09 12:08:42 +05:30
Kovid Goyal
49ea26968c Bump go version to 1.21
Allows us to use the much faster builtin min/max functions
for two variable min/max
2023-08-09 11:58:16 +05:30
Kovid Goyal
341d845b9a Port calls to slices.Sort functions since they now need a cmp() function rather than a less() function
Also rename os.SEEK_* to io.Seek* as the former has been deprecated
2023-08-04 22:50:13 +05:30
Kovid Goyal
ca485cc0f7 Make getting function name a utility function 2023-07-30 19:49:46 +05:30
Kovid Goyal
5881041fcd Ensure shortduration is no more than 8 chars 2023-07-30 19:49:46 +05:30
Kovid Goyal
b60d15fe75 Make short duration formatter re-useable 2023-07-30 19:49:46 +05:30
Kovid Goyal
b3819d3226 Ensure output.Write is not called outside of the stream decompressor function 2023-07-30 19:49:45 +05:30
Kovid Goyal
301f309444 ... 2023-07-30 19:49:45 +05:30
Kovid Goyal
42c9f30618 Change receive code to use new streaming decomp infra 2023-07-30 19:49:45 +05:30
Kovid Goyal
b4d8eaa0fe ... 2023-07-30 19:49:45 +05:30
Kovid Goyal
a210e0c977 Simplify stream decompressor 2023-07-30 19:49:45 +05:30
Kovid Goyal
73ee5b32c9 A better way to wrap go's zlib into a streaming decompressor 2023-07-30 19:49:44 +05:30
Kovid Goyal
08e3dbb8e7 Patcher signature generation implemented 2023-07-30 19:49:42 +05:30
Kovid Goyal
74e0fa3f1d Show invocation line for failing test 2023-07-30 19:49:40 +05:30
Kovid Goyal
ed6e3dfe2c Speedup Memset for single val 2023-07-30 19:49:40 +05:30
Kovid Goyal
26c22f0086 Work on creating tests for rsync api 2023-07-30 19:49:40 +05:30
Kovid Goyal
10362c3121 DRYer 2023-07-30 19:49:39 +05:30
Kovid Goyal
dee6210de5 Utility function to initialize struct based on default tags 2023-07-30 19:49:39 +05:30
Kovid Goyal
5d361757a2 more work on the transfer kitten 2023-07-30 19:49:38 +05:30
Kovid Goyal
ff3232547d More work on transfer kitten porting 2023-07-30 19:49:38 +05:30
Kovid Goyal
55bbf175c6 Port send file mapping tests 2023-07-30 19:49:37 +05:30
Kovid Goyal
be7f276d3e More work on the transfer kitten 2023-07-30 19:49:37 +05:30
Kovid Goyal
58312fffee Also detect makefiles as plain text files 2023-07-24 10:53:39 +05:30
Kovid Goyal
51aaea03bf Go code to get the shell of the current user 2023-06-25 13:12:35 +05:30
Kovid Goyal
2787f305f3 Generic helper to concatenate arbitrary numbers of slices 2023-06-24 09:13:20 +05:30
Kovid Goyal
e59e42a6c2 simplify API of utils.Once 2023-05-26 22:42:07 +05:30