diff options
| author | Dave Hibberd <hibby@debian.org> | 2024-10-29 22:45:25 +0000 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2024-10-29 22:45:25 +0000 |
| commit | 6c8e7093c0c01dbf0e7b2d3b3e8909a209faebbd (patch) | |
| tree | 8d4a8ff6b2aff51cd6235b9923eb9c5db5017075 /ALSASound.c | |
| parent | a724b7ca21df2a3b98bc203f719396d5e62d55d4 (diff) | |
| parent | d0709a1e0a04bf74f240dc0fdb8697f030b68cea (diff) | |
Update upstream source from tag 'upstream/0.0.0.73_rc1'
Update to upstream version '0.0.0.73~rc1'
with Debian dir 676c65807274e34716fecd1055a3812ab33a8229
Diffstat (limited to 'ALSASound.c')
| -rw-r--r-- | ALSASound.c | 84 |
1 files changed, 58 insertions, 26 deletions
diff --git a/ALSASound.c b/ALSASound.c index fc950a4..6cb6121 100644 --- a/ALSASound.c +++ b/ALSASound.c @@ -1789,32 +1789,6 @@ int gpioInitialise(void) -int stricmp(const unsigned char * pStr1, const unsigned char *pStr2)
-{
- unsigned char c1, c2;
- int v;
-
- if (pStr1 == NULL)
- {
- if (pStr2)
- Debugprintf("stricmp called with NULL 1st param - 2nd %s ", pStr2);
- else
- Debugprintf("stricmp called with two NULL params");
-
- return 1;
- }
-
-
- do {
- c1 = *pStr1++;
- c2 = *pStr2++;
- /* The casts are necessary when pStr1 is shorter & char is signed */
- v = tolower(c1) - tolower(c2);
- } while ((v == 0) && (c1 != '\0') && (c2 != '\0') );
-
- return v;
-}
-
char Leds[8]= {0};
unsigned int PKTLEDTimer = 0;
@@ -2107,5 +2081,63 @@ int gethints() return 0;
}
+// Microsoft routines not available in gcc
+
+int memicmp(unsigned char *a, unsigned char *b, int n)
+{
+ if (n)
+ {
+ while (n && (toupper(*a) == toupper(*b)))
+ n--, a++, b++;
+
+ if (n)
+ return toupper(*a) - toupper(*b);
+ }
+ return 0;
+}
+int stricmp(const unsigned char * pStr1, const unsigned char *pStr2)
+{
+ unsigned char c1, c2;
+ int v;
+
+ if (pStr1 == NULL)
+ {
+ if (pStr2)
+ Debugprintf("stricmp called with NULL 1st param - 2nd %s ", pStr2);
+ else
+ Debugprintf("stricmp called with two NULL params");
+
+ return 1;
+ }
+
+
+ do {
+ c1 = *pStr1++;
+ c2 = *pStr2++;
+ /* The casts are necessary when pStr1 is shorter & char is signed */
+ v = tolower(c1) - tolower(c2);
+ } while ((v == 0) && (c1 != '\0') && (c2 != '\0'));
+
+ return v;
+}
+char * strupr(char* s)
+{
+ char* p = s;
+
+ if (s == 0)
+ return 0;
+
+ while (*p = toupper(*p)) p++;
+ return s;
+}
+
+char * strlwr(char* s)
+{
+ char* p = s;
+ while (*p = tolower(*p)) p++;
+ return s;
+}
+
+
|
