1/*
2 * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it would be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 *
12 * Further, this software is distributed without any warranty that it is
13 * free of the rightful claim of any third person regarding infringement
14 * or the like.  Any license provided herein, whether implied or
15 * otherwise, applies only to this software file.  Patent licenses, if
16 * any, provided herein do not apply to combinations of this program with
17 * other software, or any other product whatsoever.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 *
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA  94043, or:
25 *
26 * http://www.sgi.com
27 *
28 * For further information regarding this notice, see:
29 *
30 * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
31 */
32#ifndef _DATAASCII_H_
33#define _DATAASCII_H_
34
35/***********************************************************************
36 * int dataasciigen(listofchars, buffer, size, offset)
37 *
38 * This function fills buffer with ascii characters.
39 * The ascii characters are obtained from listofchars or the CHARS array
40 *  if listofchars is NULL.
41 * Each char is selected by an index.  The index is the remainder
42 *  of count divided by the array size.
43 * This method allows more than one process to write to a location
44 *  in a file without corrupting it for another process' point of view.
45 *
46 * The return value will be the number of character written in buffer
47 *  (size).
48 *
49 ***********************************************************************/
50int dataasciigen(char *, char *, int, int);
51
52/***********************************************************************
53 * int dataasciichk(listofchars, buffer, size, count, errmsg)
54 *
55 * This function checks the contents of a buffer produced by
56 *  dataasciigen.
57 *
58 * return values:
59 *	>= 0 : error at character count
60 *	< 0  : no error
61 ***********************************************************************/
62
63int dataasciichk(char *, char *, int, int, char**);
64
65#endif
66