aboutsummaryrefslogtreecommitdiff
path: root/unicode.h
diff options
context:
space:
mode:
authorEduardo Casino <mail@eduardocasino.es>2022-05-24 07:58:48 +0200
committerJavier <dev.git@javispedro.com>2022-06-12 17:13:03 +0200
commit80f0debf2032e16629cb13682b8fb9ceccde423c (patch)
tree401b662542df92e1d4e8527a73e21531850ce109 /unicode.h
parenta56c45b42d5d1bf3b161d051fbe879454856b2ff (diff)
downloadvbados-80f0debf2032e16629cb13682b8fb9ceccde423c.tar.gz
vbados-80f0debf2032e16629cb13682b8fb9ceccde423c.zip
Add support for hash-generated short file names
Diffstat (limited to 'unicode.h')
-rw-r--r--unicode.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/unicode.h b/unicode.h
index 81d187a..730d549 100644
--- a/unicode.h
+++ b/unicode.h
@@ -40,9 +40,9 @@ static inline uint8_t lookup_codepage( TSRDATAPTR data, uint16_t cp )
}
// dst and src CAN'T BE THE SAME !!!!
-// Returns resulting length or -1 if buffer overflow
+// Returns resulting length or 0 if buffer overflow
//
-static uint16_t local_to_utf8_n( TSRDATAPTR data, uint8_t *dst, const char far *src, uint16_t buflen, uint16_t count )
+static uint16_t local_to_utf8_n( TSRDATAPTR data, uint8_t *dst, char far *src, uint16_t buflen, uint16_t count )
{
uint16_t len = 0; // Resulting length
uint16_t cp; // Unicode Code Point
@@ -63,7 +63,7 @@ static uint16_t local_to_utf8_n( TSRDATAPTR data, uint8_t *dst, const char far *
}
else
{
- return -1;
+ return 0;
}
}
@@ -83,7 +83,7 @@ static uint16_t local_to_utf8_n( TSRDATAPTR data, uint8_t *dst, const char far *
}
else
{
- return -1;
+ return 0;
}
}
@@ -102,7 +102,7 @@ static uint16_t local_to_utf8_n( TSRDATAPTR data, uint8_t *dst, const char far *
}
else
{
- return -1;
+ return 0;
}
}
cont:
@@ -117,7 +117,7 @@ cont:
}
-static inline uint16_t local_to_utf8( TSRDATAPTR data, uint8_t *dst, const char far *src, uint16_t buflen )
+static inline uint16_t local_to_utf8( TSRDATAPTR data, uint8_t *dst, char far *src, uint16_t buflen )
{
return local_to_utf8_n( data, dst, src, buflen, buflen );
}