Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
I64 Str2I64(U8 *st, I64 radix=10, U8 **_end_ptr=NULL)
|
2020-02-15 20:01:48 +00:00
|
|
|
|
{//String to I64. Similar to strtoul().
|
|
|
|
|
//Allows radix change with "0x20" "0b1010" "0d123" "0o18".
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
//Be careful of Str2I64("0b101", 16)-->0xB101.
|
|
|
|
|
Bool neg = FALSE;
|
|
|
|
|
I64 ch, res = 0;
|
|
|
|
|
|
|
|
|
|
if (!st || !(2 <= radix <= 36))
|
|
|
|
|
{
|
|
|
|
|
if (_end_ptr)
|
|
|
|
|
*_end_ptr = st;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
while (Bt(char_bmp_white_space, *st))
|
2020-02-20 23:40:10 +00:00
|
|
|
|
st++;
|
|
|
|
|
while (TRUE)
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
switch (*st)
|
|
|
|
|
{
|
2020-02-20 23:40:10 +00:00
|
|
|
|
case '-':
|
|
|
|
|
st++;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
neg = !neg;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
case '+':
|
|
|
|
|
st++;
|
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
case '0':
|
|
|
|
|
st++;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
ch = ToUpper(*st);
|
|
|
|
|
if (ch >= 'B' && (radix <= 10 || ch > 'A' + radix - 11))
|
|
|
|
|
switch (ch)
|
|
|
|
|
{
|
|
|
|
|
case 'B': radix = 2; st++; break;
|
|
|
|
|
case 'D': radix = 10; st++; break;
|
|
|
|
|
case 'X': radix = 16; st++; break;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
}
|
|
|
|
|
default:
|
|
|
|
|
goto ai_cont;
|
|
|
|
|
}
|
2020-02-15 20:01:48 +00:00
|
|
|
|
ai_cont:
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
while (ch = ToUpper(*st++))
|
|
|
|
|
{
|
|
|
|
|
if (radix > 10)
|
|
|
|
|
{
|
|
|
|
|
if ('0' <= ch <= '9')
|
|
|
|
|
res = res * radix + ch - '0';
|
|
|
|
|
else if ('A' <= ch <= 'A' + radix - 11)
|
|
|
|
|
res = res * radix + ch - 'A' + 10;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
else
|
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
}
|
|
|
|
|
else if ('0' <= ch <= '0' + radix - 1)
|
|
|
|
|
res = res * radix + ch - '0';
|
2020-02-20 23:40:10 +00:00
|
|
|
|
else
|
|
|
|
|
break;
|
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (_end_ptr)
|
|
|
|
|
*_end_ptr = st - 1;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
if (neg)
|
|
|
|
|
return -res;
|
|
|
|
|
else
|
|
|
|
|
return res;
|
2020-02-15 20:01:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
F64 Str2F64(U8 *src, U8 **_end_ptr=NULL)
|
2020-02-15 20:01:48 +00:00
|
|
|
|
{/*String to F64.
|
|
|
|
|
Does not allow more than 18-digits
|
|
|
|
|
before or after the decimal point
|
|
|
|
|
because the numbers before and after
|
|
|
|
|
the decimal point are stored
|
2020-03-01 01:59:50 +00:00
|
|
|
|
in 64-bits. Use exponentiated forms
|
2020-02-15 20:01:48 +00:00
|
|
|
|
to avoid this.
|
|
|
|
|
*/
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
I64 i, j, k, ch;
|
|
|
|
|
F64 d;
|
|
|
|
|
Bool neg = FALSE, neg_e = FALSE;
|
2020-02-15 20:01:48 +00:00
|
|
|
|
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
ch = *src++;
|
|
|
|
|
while (Bt(char_bmp_white_space, ch))
|
|
|
|
|
ch = *src++;
|
|
|
|
|
if (ch == '-')
|
|
|
|
|
{
|
|
|
|
|
neg = TRUE;
|
|
|
|
|
ch = *src++;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (!StrNCompare(src - 1, "inf", 3))
|
|
|
|
|
{
|
2020-02-20 23:40:10 +00:00
|
|
|
|
d=<EFBFBD>;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
src += 3;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
goto a2f_end;
|
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (*src == '<EFBFBD>')
|
|
|
|
|
{
|
|
|
|
|
d = <EFBFBD>;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
src++;
|
|
|
|
|
goto a2f_end;
|
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
i = 0;
|
|
|
|
|
while (TRUE)
|
|
|
|
|
{
|
|
|
|
|
if (Bt(char_bmp_dec_numeric, ch))
|
|
|
|
|
i = i * 10 + ch - '0';
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (ch == '.' || ch == 'e' || ch == 'E')
|
2020-02-20 23:40:10 +00:00
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
d = i;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
goto a2f_end;
|
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
ch = *src++;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (ch == '.')
|
|
|
|
|
ch = *src++;
|
|
|
|
|
k = 0;
|
|
|
|
|
while (TRUE)
|
|
|
|
|
{
|
|
|
|
|
if (Bt(char_bmp_dec_numeric, ch))
|
|
|
|
|
{
|
|
|
|
|
i = i * 10 + ch - '0';
|
2020-02-20 23:40:10 +00:00
|
|
|
|
k++;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (ch == 'e' || ch == 'E')
|
2020-02-20 23:40:10 +00:00
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
d = i * Pow10I64(-k);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
goto a2f_end;
|
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
ch = *src++;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
ch = *src++;
|
|
|
|
|
if (ch == '-')
|
|
|
|
|
{
|
|
|
|
|
neg_e = TRUE;
|
|
|
|
|
ch = *src++;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
j = 0;
|
|
|
|
|
while (TRUE)
|
|
|
|
|
{
|
|
|
|
|
if (Bt(char_bmp_dec_numeric, ch))
|
|
|
|
|
j = j * 10 + ch - '0';
|
|
|
|
|
else
|
|
|
|
|
{
|
2020-02-20 23:40:10 +00:00
|
|
|
|
if (neg_e)
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
d = i * Pow10I64(-j - k);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
else
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
d = i * Pow10I64(j - k);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
goto a2f_end;
|
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
ch = *src++;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
}
|
2020-02-15 20:01:48 +00:00
|
|
|
|
a2f_end:
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (_end_ptr)
|
|
|
|
|
*_end_ptr = src - 1;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
if (neg)
|
|
|
|
|
return -d;
|
|
|
|
|
else
|
|
|
|
|
return d;
|
2020-02-15 20:01:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CDate Str2Date(U8 *_src)
|
|
|
|
|
{/*"*+nnnn", "*-nnnn", "mm/dd", "mm/dd/yy"
|
Rename abs_addres to abs_address.
Update documentation/comments to rename addr, fun, var, stmt, blk, desc, reg, seg, ptr, dup, clus, val, and bttn, to address, function, variable, statement, block, description, register, segment, pointer, duplicate, cluster, value, and button, respectively.
2021-10-07 02:35:32 +01:00
|
|
|
|
It also supports some functions
|
2020-02-15 20:01:48 +00:00
|
|
|
|
SM() start of mon
|
|
|
|
|
EM() end of mon
|
|
|
|
|
SY() start of year
|
|
|
|
|
EY() end of year
|
|
|
|
|
Full expressions are not implimented
|
|
|
|
|
but you can do stuff like SM(*-7)+3
|
|
|
|
|
and it will return the 3rd day after
|
|
|
|
|
the start of mon for seven days before
|
|
|
|
|
today.
|
|
|
|
|
*/
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
CDate res = 0;
|
|
|
|
|
CDateStruct ds, ds_now;
|
|
|
|
|
U8 *src = MStrUtil(_src, SUF_REM_SPACES | SUF_TO_UPPER), *v = StrNew(src), *ptr = src;
|
|
|
|
|
Bool start_mon = FALSE, end_mon = FALSE, start_year = FALSE, end_year = FALSE;
|
2020-02-15 20:01:48 +00:00
|
|
|
|
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
MemSet(&ds, 0, sizeof(CDateStruct));
|
|
|
|
|
if (!StrNCompare(ptr, "SM(", 3))
|
|
|
|
|
{
|
|
|
|
|
ptr += 3;
|
|
|
|
|
start_mon = TRUE;
|
|
|
|
|
}
|
|
|
|
|
else if (!StrNCompare(ptr, "EM(", 3))
|
|
|
|
|
{
|
|
|
|
|
ptr += 3;
|
|
|
|
|
end_mon = TRUE;
|
|
|
|
|
}
|
|
|
|
|
else if (!StrNCompare(ptr, "SY(", 3))
|
|
|
|
|
{
|
|
|
|
|
ptr += 3;
|
|
|
|
|
start_year = TRUE;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
else if (!StrNCompare(ptr, "EY(", 3))
|
|
|
|
|
{
|
|
|
|
|
ptr += 3;
|
|
|
|
|
end_year = TRUE;
|
|
|
|
|
}
|
|
|
|
|
if (*ptr == '*')
|
|
|
|
|
{
|
2020-02-20 23:40:10 +00:00
|
|
|
|
ptr++;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (*ptr == '+' || *ptr == '-')
|
|
|
|
|
res.date = Str2I64(ptr,, &ptr);
|
|
|
|
|
res += Now + local_time_offset;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
StrFirstRemove(ptr, "/", v); //Put mon into v
|
|
|
|
|
ds.mon = Str2I64(v);
|
|
|
|
|
if (StrOcc(ptr, '/'))
|
|
|
|
|
{
|
Rename abs_addres to abs_address.
Update documentation/comments to rename addr, fun, var, stmt, blk, desc, reg, seg, ptr, dup, clus, val, and bttn, to address, function, variable, statement, block, description, register, segment, pointer, duplicate, cluster, value, and button, respectively.
2021-10-07 02:35:32 +01:00
|
|
|
|
StrFirstRemove(ptr, "/", v); //Put day into v leaving year in pointer
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
ds.day_of_mon = Str2I64(v);
|
|
|
|
|
ds.year = Str2I64(ptr,, &ptr);
|
|
|
|
|
if (ds.year < 100) //if not 4 digit year
|
|
|
|
|
ds.year += 2000;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ds.day_of_mon = Str2I64(ptr,, &ptr);
|
|
|
|
|
Date2Struct(&ds_now, Now + local_time_offset);
|
|
|
|
|
ds.year = ds_now.year;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
res = Struct2Date(&ds);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (*ptr == ')')
|
|
|
|
|
ptr++;
|
2020-02-15 20:01:48 +00:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
if (start_mon)
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
res.date = FirstDayOfMon(res.date);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
else if (end_mon)
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
res.date = LastDayOfMon(res.date);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
else if (start_year)
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
res.date = FirstDayOfYear(res.date);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
else if (end_year)
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
res.date = LastDayOfYear(res.date);
|
2020-02-15 20:01:48 +00:00
|
|
|
|
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (*ptr == '+' || *ptr == '-')
|
|
|
|
|
res.date += Str2I64(ptr);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
Free(src);
|
|
|
|
|
Free(v);
|
2020-12-23 23:27:18 +00:00
|
|
|
|
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
return res - local_time_offset;
|
2020-02-15 20:01:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
U8 *StrScan(U8 *src, U8 *format, ...)
|
Rename abs_addres to abs_address.
Update documentation/comments to rename addr, fun, var, stmt, blk, desc, reg, seg, ptr, dup, clus, val, and bttn, to address, function, variable, statement, block, description, register, segment, pointer, duplicate, cluster, value, and button, respectively.
2021-10-07 02:35:32 +01:00
|
|
|
|
{/*Opposite of sprintf(). Pass pointers to data to be scanned-in.
|
|
|
|
|
For "%s", pass pointer to pointer (be careful because address
|
|
|
|
|
of array is the same as array--create pointer to array
|
|
|
|
|
and take address.
|
2020-02-15 20:01:48 +00:00
|
|
|
|
*/
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
U8 *buf, *ptr, **pptr;
|
|
|
|
|
Bool left_justify = FALSE;
|
|
|
|
|
I64 ch, cur_arg = 0, i, len, *i_ptr, dec_len;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
F64 *d_ptr;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
if (!format)
|
2020-02-15 20:01:48 +00:00
|
|
|
|
throw('Scan');
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
while (ch = *format++)
|
|
|
|
|
{
|
|
|
|
|
if (ch == '%')
|
|
|
|
|
{
|
|
|
|
|
if (*format == '%')
|
|
|
|
|
{
|
2020-02-20 23:40:10 +00:00
|
|
|
|
src++;
|
|
|
|
|
format++;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (*format == '-')
|
|
|
|
|
{
|
|
|
|
|
left_justify = TRUE;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
format++;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
left_justify = FALSE;
|
|
|
|
|
len = 0;
|
|
|
|
|
while ('0' <= *format <= '9')
|
|
|
|
|
len = len * 10 + (*format++ - '0');
|
|
|
|
|
if (*format == '*')
|
|
|
|
|
{
|
2020-02-20 23:40:10 +00:00
|
|
|
|
format++;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (cur_arg >= argc)
|
2020-02-20 23:40:10 +00:00
|
|
|
|
throw('Scan');
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
len = argv[cur_arg++];
|
2020-02-20 23:40:10 +00:00
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
ch = *format++;
|
|
|
|
|
if (ch && !len)
|
|
|
|
|
{
|
|
|
|
|
ptr = src;
|
|
|
|
|
while (*ptr && *ptr != *format)
|
2020-02-20 23:40:10 +00:00
|
|
|
|
ptr++;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
len = ptr - src;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (ch == '.')
|
|
|
|
|
{
|
|
|
|
|
dec_len = 0;
|
|
|
|
|
while ('0' <= *format <= '9')
|
|
|
|
|
dec_len = dec_len * 10 + (*format++ - '0');
|
|
|
|
|
if (*format == '*')
|
|
|
|
|
{
|
2020-02-20 23:40:10 +00:00
|
|
|
|
format++;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (cur_arg >= argc)
|
2020-02-20 23:40:10 +00:00
|
|
|
|
throw('Scan');
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
dec_len = argv[cur_arg++];
|
2020-02-20 23:40:10 +00:00
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
ch = *format++;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
buf = MAlloc(len + 1);
|
|
|
|
|
for (i = 0; i < len; i++)
|
|
|
|
|
buf[i] = *src++;
|
|
|
|
|
buf[i] = 0;
|
|
|
|
|
switch (ch)
|
|
|
|
|
{
|
2020-02-20 23:40:10 +00:00
|
|
|
|
case 's':
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (cur_arg >= argc)
|
2020-02-20 23:40:10 +00:00
|
|
|
|
throw('Scan');
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
pptr = argv[cur_arg++];
|
|
|
|
|
StrCopy(*pptr, buf);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
case 'c':
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (cur_arg >= argc)
|
2020-02-20 23:40:10 +00:00
|
|
|
|
throw('Scan');
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
ptr = argv[cur_arg++];
|
|
|
|
|
*ptr = *buf;
|
2020-02-20 23:40:10 +00:00
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
case 'C':
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (cur_arg >= argc)
|
2020-02-20 23:40:10 +00:00
|
|
|
|
throw('Scan');
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
ptr = argv[cur_arg++];
|
|
|
|
|
*ptr = ToUpper(*buf);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
case 'z':
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (cur_arg + 1 >= argc)
|
2020-02-20 23:40:10 +00:00
|
|
|
|
throw('Scan');
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
i_ptr = argv[cur_arg++];
|
|
|
|
|
*i_ptr = ListMatch(buf, argv[cur_arg++]);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
case 'Z':
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (cur_arg + 1 >= argc)
|
2020-02-20 23:40:10 +00:00
|
|
|
|
throw('Scan');
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
i_ptr = argv[cur_arg++];
|
|
|
|
|
*i_ptr = DefineMatch(buf, argv[cur_arg++]);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
case 'd':
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (cur_arg >= argc)
|
2020-02-20 23:40:10 +00:00
|
|
|
|
throw('Scan');
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
i_ptr = argv[cur_arg++];
|
|
|
|
|
*i_ptr = Str2I64(buf);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
case 'X':
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (cur_arg >= argc)
|
2020-02-20 23:40:10 +00:00
|
|
|
|
throw('Scan');
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
i_ptr = argv[cur_arg++];
|
|
|
|
|
*i_ptr = Str2I64(buf, 16);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
case 'b':
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (cur_arg >= argc)
|
2020-02-20 23:40:10 +00:00
|
|
|
|
throw('Scan');
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
i_ptr = argv[cur_arg++];
|
|
|
|
|
*i_ptr = Str2I64(buf, 2);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
case 'e':
|
|
|
|
|
case 'f':
|
|
|
|
|
case 'g':
|
|
|
|
|
case 'n':
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (cur_arg >= argc)
|
2020-02-20 23:40:10 +00:00
|
|
|
|
throw('Scan');
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
d_ptr = argv[cur_arg++];
|
|
|
|
|
*d_ptr = Str2F64(buf);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
break;
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
case 'D':
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
if (cur_arg >= argc)
|
2020-02-20 23:40:10 +00:00
|
|
|
|
throw('Scan');
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
i_ptr = argv[cur_arg++];
|
|
|
|
|
*i_ptr = Str2Date(buf);
|
2020-02-20 23:40:10 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
Free(buf);
|
|
|
|
|
}
|
Reformatted more Kernel files.
Reformatted KMathA.CC, KMathB.CC, KMisc.CC, KTask.CC, KUtils.CC, Kernel.PRJ, KernelA.HH, KernelB.HH, KernelC.HH, KeyDev.CC, MultiProc.CC, PCIBIOS.CC, QuickSort.CC, Sched.CC, StrA.CC, StrB.CC, StrPrint.CC, StrScan.CC.
All top-level Kernel files are now reformatted. Remaining are files in Kernel/ subdirectories.
2020-09-12 22:37:51 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
2020-02-20 23:40:10 +00:00
|
|
|
|
src++;
|
2020-02-15 20:01:48 +00:00
|
|
|
|
}
|
2020-12-23 23:27:18 +00:00
|
|
|
|
|
2020-02-20 23:40:10 +00:00
|
|
|
|
return src;
|
2020-02-15 20:01:48 +00:00
|
|
|
|
}
|