GRASS GIS 7 Programmer's Manual  7.7.svn(2018)-r73574
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
xdrstring.c File Reference

DBMI Library (base) - external data representation (string) More...

#include <string.h>
#include "xdr.h"
Include dependency graph for xdrstring.c:

Go to the source code of this file.

Functions

int db__send_string_array (dbString *a, int count)
 Send string array. More...
 
int db__recv_string_array (dbString **a, int *n)
 Receive string array. More...
 
int db__send_string (dbString *x)
 Send string. More...
 
int db__recv_string (dbString *x)
 Reads a string from transport. More...
 
int db__send_Cstring (const char *s)
 Send C string. More...
 

Detailed Description

DBMI Library (base) - external data representation (string)

(C) 1999-2009, 2011 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
Doxygenized by Martin Landa <landa.martin gmail.com> (2011)

Definition in file xdrstring.c.

Function Documentation

int db__recv_string ( dbString x)

Reads a string from transport.

Note: caller MUST initialize x by calling db_init_string()

Parameters
x
Returns
DB_OK, DB_MEMORY_ERR, or DB_PROTOCOL_ERR
NULL if error

Definition at line 117 of file xdrstring.c.

References db__recv(), db_enlarge_string(), db_get_string(), DB_OK, DB_PROTOCOL_ERR, and db_protocol_error().

Referenced by db__recv_string_array().

int db__recv_string_array ( dbString **  a,
int n 
)

Receive string array.

Parameters
a
n
Returns

Definition at line 46 of file xdrstring.c.

References b, count, db__recv_int(), db__recv_string(), db_alloc_string_array(), db_free_string_array(), DB_MEMORY_ERR, DB_OK, DB_PROTOCOL_ERR, db_protocol_error(), and NULL.

int db__send_Cstring ( const char *  s)

Send C string.

Parameters
s
Returns

Definition at line 150 of file xdrstring.c.

References db__send_string(), db_init_string(), db_set_string_no_copy(), and x.

int db__send_string ( dbString x)

Send string.

Parameters
x
Returns

Definition at line 86 of file xdrstring.c.

References db__send(), db_get_string(), DB_OK, DB_PROTOCOL_ERR, and db_protocol_error().

Referenced by db__send_Cstring(), and db__send_string_array().

int db__send_string_array ( dbString a,
int  count 
)

Send string array.

Parameters
a
count
Returns

Definition at line 26 of file xdrstring.c.

References count, db__send_int(), db__send_string(), and DB_OK.