when reading the structure header.
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
+#include <stdint.h>
#include <string.h>
#include "out.h"
{
register char *nf, *ni, *no ;
int last, i ;
- long value ;
+ uint32_t value ;
ni=buf ; no=str ; nf=fmt ;
while ( last = *nf++ ) {
last -= '0' ;
switch ( last ) {
case 0 : break ;
case 1 : *no= value ; break ;
- case 2 : *(unsigned short *)no = value ; break ;
- case 4 : *(long *)no = value ; break ;
+ case 2 : *(uint16_t *)no = value ; break ;
+ case 4 : *(uint32_t *)no = value ; break ;
default :
fatal("illegal out.h format string\n");
}