DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer

subyte(D3oddi)


subyte -- store a character in user data space

Synopsis

int subyte(caddr_t addr, unsigned char val);

Description

The subyte( ) function stores one character in the user's data space.

Arguments


addr
Address in the user's data space where the character is to be stored.

val
Value to be stored.

Return values

subyte returns -1 if the address addr is invalid; otherwise it returns 0 (zero).

Usage

If you are storing data in u.u_base, consider using passc(D3oddi) instead of subyte( ), because it updates u.u_count, u.u_offset, and u.u_base for you and provides error handling through u.u_error. Otherwise, the driver code must increase or decrease these members as appropriate:
   u.u_count -= cnt;
   u.u_offset += cnt;
   u.u_base += cnt;
If 0xff could be present in the data being stored in user space, use copyout(D3oddi) instead of subyte or passc, since a -1 in the data is interpreted as an error condition.

Context and synchronization

User context.

Hardware applicability

All

Version applicability

oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

SVR5 DDI compatibility

DDI does not support this function. Use the subyte( ) with calls to the copyout(D3) function instead.

References

copyout(D3oddi), fubyte(D3oddi), fuword(D3oddi), passc(D3oddi), suword(D3oddi)

``Data, copying'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005