File:  [Research Unix] / researchv10dc / cmd / worm / oscsi / scsi / fixedstr.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:33 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

#include	"../scsi.h"

void
fixedstr(uchar *src, int len, char *dest)
{
	uchar *s;

	while((*src == ' ') && (len > 0))
		src++, len--;
	for(s = src+len-1; s >= src; s--)
		if(*s != ' ')
			break;
	memcpy(dest, (char *)src, len = s-src+1);
	dest[len] = 0;
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.