Utah Raster Toolkit  9999-git
URT Development version (post-3.1b)
Functions | Variables
vaxshort.c File Reference

Go to the source code of this file.

Functions

int vax_gshort (char *msgp)
 
char * vax_pshort (char *msgp, unsigned short s)
 

Variables

static char RCSid [] = "@(#)$Id: vaxshort.c,v 3.0 90/08/03 15:21:30 spencer Exp $ (BRL)"
 

Function Documentation

int vax_gshort ( char *  msgp)

Definition at line 31 of file vaxshort.c.

33 {
34  register unsigned char *p = (unsigned char *) msgp;
35  register int i;
36 
37  if( (i = (p[1] << 8) | p[0]) & 0x8000 )
38  return(i | ~0xFFFF); /* Sign extend */
39  return(i);
40 }
int i
Definition: rletorla.c:82
char* vax_pshort ( char *  msgp,
unsigned short  s 
)

Definition at line 46 of file vaxshort.c.

49 {
50 
51  msgp[0] = s & 0xFF;
52  msgp[1] = s >> 8;
53  return(msgp+2);
54 }
_urt_stack * s
Definition: rleClock.c:919

Variable Documentation

char RCSid[] = "@(#)$Id: vaxshort.c,v 3.0 90/08/03 15:21:30 spencer Exp $ (BRL)"
static

Definition at line 21 of file vaxshort.c.