1
0
Files
irix-657m-src/irix/cmd/netman/lib/ds_byte.c
2022-09-29 17:59:04 +03:00

21 lines
356 B
C

/*
* Copyright 1988 Silicon Graphics, Inc. All rights reserved.
*
* Get or put a datastream byte.
*/
#include "datastream.h"
int
ds_byte(DataStream *ds, char *cp)
{
if (ds->ds_bitoff || ds->ds_count <= 0)
return 0;
if (ds->ds_direction == DS_DECODE)
*cp = *ds->ds_next;
else
*ds->ds_next = *cp;
--ds->ds_count;
ds->ds_next++;
return 1;
}