blob: d08fe86f391feb9edad239b346ef993fb1eee2d7 [file] [log] [blame]
whrb973f2b2000-05-05 19:34:50 +00001/*
2 * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
vapier45a8ba02009-07-20 10:59:32 +00003 *
whrb973f2b2000-05-05 19:34:50 +00004 * 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.
vapier45a8ba02009-07-20 10:59:32 +00007 *
whrb973f2b2000-05-05 19:34:50 +00008 * 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.
vapier45a8ba02009-07-20 10:59:32 +000011 *
whrb973f2b2000-05-05 19:34:50 +000012 * 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.
vapier45a8ba02009-07-20 10:59:32 +000018 *
whrb973f2b2000-05-05 19:34:50 +000019 * 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., 59
21 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
vapier45a8ba02009-07-20 10:59:32 +000022 *
whrb973f2b2000-05-05 19:34:50 +000023 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
vapier45a8ba02009-07-20 10:59:32 +000025 *
26 * http://www.sgi.com
27 *
28 * For further information regarding this notice, see:
29 *
whrb973f2b2000-05-05 19:34:50 +000030 * 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
vapier45a8ba02009-07-20 10:59:32 +000042 * of count divided by the array size.
whrb973f2b2000-05-05 19:34:50 +000043 * 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