diff 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
line wrap: on
line diff
--- a/ticoff/basics.c	Tue Mar 25 08:51:32 2014 +0000
+++ b/ticoff/basics.c	Tue Mar 25 18:34:03 2014 +0000
@@ -45,6 +45,17 @@
 	return ptr[0] | ptr[1] << 8;
 }
 
+get_s16(ptr)
+	u_char *ptr;
+{
+	int i;
+
+	i = ptr[0] | ptr[1] << 8;
+	if (i >= 32768)
+		i -= 65536;
+	return(i);
+}
+
 unsigned
 get_u32(ptr)
 	u_char *ptr;