FreeCalypso > hg > freecalypso-reveng
comparison ticoff/basics.c @ 73:10f3fbff5e97
tiobjd: symbol table parsing implemented
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Tue, 25 Mar 2014 18:34:03 +0000 |
parents | 6799a5c57a49 |
children | 2eef88395908 |
comparison
equal
deleted
inserted
replaced
72:2bec477178fc | 73:10f3fbff5e97 |
---|---|
41 unsigned | 41 unsigned |
42 get_u16(ptr) | 42 get_u16(ptr) |
43 u_char *ptr; | 43 u_char *ptr; |
44 { | 44 { |
45 return ptr[0] | ptr[1] << 8; | 45 return ptr[0] | ptr[1] << 8; |
46 } | |
47 | |
48 get_s16(ptr) | |
49 u_char *ptr; | |
50 { | |
51 int i; | |
52 | |
53 i = ptr[0] | ptr[1] << 8; | |
54 if (i >= 32768) | |
55 i -= 65536; | |
56 return(i); | |
46 } | 57 } |
47 | 58 |
48 unsigned | 59 unsigned |
49 get_u32(ptr) | 60 get_u32(ptr) |
50 u_char *ptr; | 61 u_char *ptr; |