Skip to content

Commit 0d63f08

Browse files
fix dr_flac trying to include stdio and wchar now for some reason
1 parent 96dd669 commit 0d63f08

File tree

3 files changed

+48
-9
lines changed

3 files changed

+48
-9
lines changed

modules/flac/flac.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#define DRFLAC_REALLOC(p, sz) krealloc(p,sz)
55
#define DRFLAC_FREE(p) kfree(p)
66
#define DRFLAC_ASSERT(x) {}
7+
#define DR_FLAC_NO_WCHAR
8+
#define DR_FLAC_NO_STDIO
79
#define DR_FLAC_IMPLEMENTATION
810
#include "dr_flac.h"
911

os/programs/tree.rrbasic

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
start$ = ARGS$
2+
IF start$ = "" THEN start$ = CSD$
3+
4+
dirs = 0
5+
files = 0
6+
7+
PRINT start$
8+
PROCwalk(start$, "")
9+
10+
PRINT
11+
PRINT dirs; " directories, "; files; " files."
12+
END
13+
14+
DEF PROCwalk(dir$, prefix$)
15+
LOCAL n = GETNAMECOUNT(dir$)
16+
LOCAL i = 0
17+
FOR i = 0 TO n - 1
18+
LOCAL name$ = GETNAME$(dir$, i)
19+
20+
IF dir$ = "" THEN LOCAL base$ = ""
21+
IF dir$ <> "" THEN LOCAL base$ = dir$ + "/"
22+
LOCAL full$ = base$ + name$
23+
24+
LOCAL is_last = FALSE
25+
IF i = n - 1 THEN is_last = TRUE
26+
27+
IF is_last = TRUE THEN LOCAL branch$ = prefix$ + "\-- "
28+
IF is_last = FALSE THEN LOCAL branch$ = prefix$ + "+-- "
29+
30+
LOCAL ftype$ = FILETYPE$(full$)
31+
32+
PRINT branch$; name$
33+
34+
IF ftype$ = "directory" THEN dirs = dirs + 1
35+
IF ftype$ = "file" THEN files = files + 1
36+
37+
IF ftype$ = "directory" THEN PROCdescend(full$, prefix$, is_last)
38+
NEXT
39+
ENDPROC
40+
41+
DEF PROCdescend(full$, prefix$, is_last)
42+
LOCAL next_prefix$ = prefix$
43+
IF is_last = TRUE THEN next_prefix$ = next_prefix$ + " "
44+
IF is_last = FALSE THEN next_prefix$ = next_prefix$ + "| "
45+
PROCwalk(full$, next_prefix$)
46+
ENDPROC

src/net/tls.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,6 @@ int tls_handshake_step_nb(mbedtls_ssl_context *ssl) {
385385
/* reads/writes return negative error */
386386
int tls_read_nb(mbedtls_ssl_context *ssl, void *buf, size_t len, int *want) {
387387
int n = mbedtls_ssl_read(ssl, buf, len);
388-
dprintf("mbedtls_ssl_read\n");
389-
if (n > 0) dump_hex(buf, n);
390388
if (n >= 0) return n;
391389
*want = (n == MBEDTLS_ERR_SSL_WANT_READ) ? 1 : (n == MBEDTLS_ERR_SSL_WANT_WRITE) ? 2 : -1;
392390
char e[128];
@@ -395,13 +393,6 @@ int tls_read_nb(mbedtls_ssl_context *ssl, void *buf, size_t len, int *want) {
395393
return n;
396394
}
397395

398-
/*int tls_write_nb(mbedtls_ssl_context *ssl, const void *buf, size_t len, int *want) {
399-
int n = mbedtls_ssl_write(ssl, buf, len);
400-
if (n >= 0) return n;
401-
*want = (n == MBEDTLS_ERR_SSL_WANT_WRITE) ? 2 : (n == MBEDTLS_ERR_SSL_WANT_READ) ? 1 : -1;
402-
return -1;
403-
}*/
404-
405396
static int tcp_send_nb(void *ctx, const unsigned char *buf, size_t len) {
406397
int fd = (int) (uintptr_t) ctx;
407398
int n = send(fd, buf, (uint32_t) len);

0 commit comments

Comments
 (0)