add new protocol data type for asymmetric small integers

best suited for values ranging from -1 to 252
This commit is contained in:
ac-stef
2016-10-02 12:59:25 +02:00
parent ab27d952d6
commit 2436478c64
4 changed files with 43 additions and 0 deletions
+7
View File
@@ -385,6 +385,13 @@ void addmsg(int type, const char *fmt, ...)
numi += n;
break;
}
case 'a':
{
int n = isdigit(*fmt) ? *fmt++-'0' : 1;
loopi(n) putaint(p, va_arg(args, int));
numi += n;
break;
}
case 's':
{
const char *t = va_arg(args, const char *);