Skip to content

Commit 56dcbca

Browse files
committed
Move base64simd into a 3rdparty folder
1 parent cc6dc96 commit 56dcbca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+15
-13
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ kittens/diff/options/types.py linguist-generated=true
1616
kittens/diff/options/parse.py linguist-generated=true
1717
glfw/*.c linguist-vendored=true
1818
glfw/*.h linguist-vendored=true
19+
3rdparty/** linguist-vendored=true
1920
kittens/unicode_input/names.h linguist-generated=true
2021
tools/wcswidth/std.go linguist-generated=true
2122
tools/unicode_names/names.txt linguist-generated=true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

count-lines-of-code

+7-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ import subprocess
55
ls_files = subprocess.check_output([ 'git', 'ls-files']).decode('utf-8')
66
all_files = set(ls_files.splitlines())
77
all_files.discard('')
8-
cp = subprocess.run(['git', 'check-attr', 'linguist-generated', '--stdin'],
9-
check=True, stdout=subprocess.PIPE, input='\n'.join(all_files).encode('utf-8'))
10-
for line in cp.stdout.decode().splitlines():
11-
if line.endswith(' true'):
12-
fname = line.split(':', 1)[0]
13-
all_files.discard(fname)
8+
for attr in ('linguist-generated', 'linguist-vendored'):
9+
cp = subprocess.run(['git', 'check-attr', attr, '--stdin'],
10+
check=True, stdout=subprocess.PIPE, input='\n'.join(all_files).encode('utf-8'))
11+
for line in cp.stdout.decode().splitlines():
12+
if line.endswith(' true'):
13+
fname = line.split(':', 1)[0]
14+
all_files.discard(fname)
1415

1516
all_files -= {'gen/nerd-fonts-glyphs.txt', 'gen/rowcolumn-diacritics.txt'}
1617
cp = subprocess.run(['cloc', '--list-file', '-'], input='\n'.join(all_files).encode())

kitty/base64.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <stdint.h>
88
#include <stddef.h>
99
#include <stdbool.h>
10-
#include "../base64/include/libbase64.h"
10+
#include "../3rdparty/base64/include/libbase64.h"
1111

1212
static inline size_t required_buffer_size_for_base64_decode(size_t src_sz) { return (src_sz / 4 * 3 + 2); }
1313
static inline size_t required_buffer_size_for_base64_encode(size_t src_sz) { return ((src_sz + 2) / 3 * 4); }

setup.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,8 @@ def get_source_specific_defines(env: Env, src: str) -> Tuple[str, List[str], Opt
651651
if not env.vcs_rev:
652652
env.vcs_rev = get_vcs_rev()
653653
return src, [], [f'KITTY_VCS_REV="{env.vcs_rev}"', f'WRAPPED_KITTENS="{wrapped_kittens()}"']
654-
if src.startswith('base64/'):
655-
return src, ['base64',], base64_defines()
654+
if src.startswith('3rdparty/base64/'):
655+
return src, ['3rdparty/base64',], base64_defines()
656656
try:
657657
return src, [], env.library_paths[src]
658658
except KeyError:
@@ -804,10 +804,10 @@ def find_c_files() -> Tuple[List[str], List[str]]:
804804
ans.append('kitty/vt-parser-dump.c')
805805

806806
# base64
807-
ans.extend(glob.glob('base64/lib/arch/*/codec.c'))
808-
ans.append('base64/lib/tables/tables.c')
809-
ans.append('base64/lib/codec_choose.c')
810-
ans.append('base64/lib/lib.c')
807+
ans.extend(glob.glob('3rdparty/base64/lib/arch/*/codec.c'))
808+
ans.append('3rdparty/base64/lib/tables/tables.c')
809+
ans.append('3rdparty/base64/lib/codec_choose.c')
810+
ans.append('3rdparty/base64/lib/lib.c')
811811
return ans, headers
812812

813813

0 commit comments

Comments
 (0)