mirror of
https://github.com/preble/libpinproc
synced 2026-02-24 18:25:23 +01:00
Separated kPRMachineStern into ...SternSAM and ...SternWhitestar and added SternWhitestar decodes.
This commit is contained in:
@@ -278,7 +278,7 @@ PR_EXPORT uint16_t PRDecode(PRMachineType machineType, const char *str)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (machineType == kPRMachineStern)
|
else if (machineType == kPRMachineSternSAM)
|
||||||
{
|
{
|
||||||
switch (str[0])
|
switch (str[0])
|
||||||
{
|
{
|
||||||
@@ -307,6 +307,32 @@ PR_EXPORT uint16_t PRDecode(PRMachineType machineType, const char *str)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (machineType == kPRMachineSternWhitestar)
|
||||||
|
{
|
||||||
|
switch (str[0])
|
||||||
|
{
|
||||||
|
case 'L':
|
||||||
|
case 'l':
|
||||||
|
return 80 + 16 * (7 - ((x - 1) % 8)) + (x - 1) / 8;
|
||||||
|
case 'C':
|
||||||
|
case 'c':
|
||||||
|
return x + 31;
|
||||||
|
case 'S':
|
||||||
|
case 's':
|
||||||
|
{
|
||||||
|
switch (str[1])
|
||||||
|
{
|
||||||
|
case 'D':
|
||||||
|
case 'd':
|
||||||
|
if (strlen(str) == 3)
|
||||||
|
return (str[2]-'0') + 7;
|
||||||
|
else return x + 7;
|
||||||
|
default:
|
||||||
|
return 32 + 16 * (((x-1) / 8)) + (7-((x-1) % 8));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return atoi(str);
|
return atoi(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user