"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "gawkapi.h" between
gawk-5.0.1.tar.xz and gawk-5.1.0.tar.xz

About: GNU awk - pattern scanning and processing language.

gawkapi.h  (gawk-5.0.1.tar.xz):gawkapi.h  (gawk-5.1.0.tar.xz)
/* /*
* gawkapi.h -- Definitions for use by extension functions calling into gawk. * gawkapi.h -- Definitions for use by extension functions calling into gawk.
*/ */
/* /*
* Copyright (C) 2012-2018 the Free Software Foundation, Inc. * Copyright (C) 2012-2019 the Free Software Foundation, Inc.
* *
* This file is part of GAWK, the GNU implementation of the * This file is part of GAWK, the GNU implementation of the
* AWK Programming Language. * AWK Programming Language.
* *
* GAWK is free software; you can redistribute it and/or modify * GAWK is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* GAWK is distributed in the hope that it will be useful, * GAWK is distributed in the hope that it will be useful,
skipping to change at line 299 skipping to change at line 299
* and no gawk state has changed since that call. It should populate * and no gawk state has changed since that call. It should populate
* the awk_input_buf_t and awk_otuput_buf_t structures as needed. * the awk_input_buf_t and awk_otuput_buf_t structures as needed.
* It should return true if successful. * It should return true if successful.
*/ */
awk_bool_t (*take_control_of)(const char *name, awk_input_buf_t *inbuf, awk_bool_t (*take_control_of)(const char *name, awk_input_buf_t *inbuf,
awk_output_buf_t *outbuf); awk_output_buf_t *outbuf);
awk_const struct awk_two_way_processor *awk_const next; /* for use by ga wk */ awk_const struct awk_two_way_processor *awk_const next; /* for use by ga wk */
} awk_two_way_processor_t; } awk_two_way_processor_t;
#define gawk_api_major_version 2 #define gawk_api_major_version 3
#define gawk_api_minor_version 0 #define gawk_api_minor_version 0
/* Current version of the API. */ /* Current version of the API. */
enum { enum {
GAWK_API_MAJOR_VERSION = gawk_api_major_version, GAWK_API_MAJOR_VERSION = gawk_api_major_version,
GAWK_API_MINOR_VERSION = gawk_api_minor_version GAWK_API_MINOR_VERSION = gawk_api_minor_version
}; };
/* A number of typedefs related to different types of values. */ /* A number of typedefs related to different types of values. */
skipping to change at line 461 skipping to change at line 461
const size_t min_required_args; const size_t min_required_args;
awk_bool_t suppress_lint; awk_bool_t suppress_lint;
void *data; /* opaque pointer to any extra state */ void *data; /* opaque pointer to any extra state */
} awk_ext_func_t; } awk_ext_func_t;
typedef void *awk_ext_id_t; /* opaque type for extension id */ typedef void *awk_ext_id_t; /* opaque type for extension id */
/* /*
* The API into gawk. Lots of functions here. We hope that they are * The API into gawk. Lots of functions here. We hope that they are
* logically organized. * logically organized.
*
* !!! If you make any changes to this structure, please remember to bump !!!
* !!! gawk_api_major_version and/or gawk_api_minor_version. !!!
*/ */
typedef struct gawk_api { typedef struct gawk_api {
/* First, data fields. */ /* First, data fields. */
/* These are what gawk thinks the API version is. */ /* These are what gawk thinks the API version is. */
awk_const int major_version; awk_const int major_version;
awk_const int minor_version; awk_const int minor_version;
/* GMP/MPFR versions, if extended-precision is available */ /* GMP/MPFR versions, if extended-precision is available */
awk_const int gmp_major_version; awk_const int gmp_major_version;
skipping to change at line 546 skipping to change at line 549
void (*api_update_ERRNO_int)(awk_ext_id_t id, int errno_val); void (*api_update_ERRNO_int)(awk_ext_id_t id, int errno_val);
void (*api_update_ERRNO_string)(awk_ext_id_t id, const char *string); void (*api_update_ERRNO_string)(awk_ext_id_t id, const char *string);
void (*api_unset_ERRNO)(awk_ext_id_t id); void (*api_unset_ERRNO)(awk_ext_id_t id);
/* /*
* All of the functions that return a value from inside gawk * All of the functions that return a value from inside gawk
* (get a parameter, get a global variable, get an array element) * (get a parameter, get a global variable, get an array element)
* behave in the same way. * behave in the same way.
* *
* For a function parameter, the return is false if the argument * For a function parameter, the return is false if the argument
* count is out of range, or if the actual paramater does not match * count is out of range, or if the actual parameter does not match
* what is specified in wanted. In that case, result->val_type * what is specified in wanted. In that case, result->val_type
* will hold the actual type of what was passed. * will hold the actual type of what was passed.
* *
* Similarly for symbol table access to variables and array elements, * Similarly for symbol table access to variables and array elements,
* the return is false if the actual variable or array element does * the return is false if the actual variable or array element does
* not match what was requested, and result->val_type will hold * not match what was requested, and result->val_type will hold
* the actual type. * the actual type.
Table entry is type returned: Table entry is type returned:
skipping to change at line 584 skipping to change at line 587
| | Undefined | String | Strnum | Number | Regex | Array | Und efined | | | Undefined | String | Strnum | Number | Regex | Array | Und efined |
| +-----------+--------+--------+--------+--------+-------+---- -------+ | +-----------+--------+--------+--------+--------+-------+---- -------+
| | Value | false | false | false | false | false | fal se | | | Value | false | false | false | false | false | fal se |
| | Cookie | | | | | | | | | Cookie | | | | | | |
+-----------+-----------+--------+--------+--------+--------+-------+---- -------+ +-----------+-----------+--------+--------+--------+--------+-------+---- -------+
*/ */
/* Functions to handle parameters passed to the extension. */ /* Functions to handle parameters passed to the extension. */
/* /*
* Get the count'th paramater, zero-based. * Get the count'th parameter, zero-based.
* Returns false if count is out of range, or if actual paramater * Returns false if count is out of range, or if actual parameter
* does not match what is specified in wanted. In that case, * does not match what is specified in wanted. In that case,
* result->val_type is as described above. * result->val_type is as described above.
*/ */
awk_bool_t (*api_get_argument)(awk_ext_id_t id, size_t count, awk_bool_t (*api_get_argument)(awk_ext_id_t id, size_t count,
awk_valtype_t wanted, awk_valtype_t wanted,
awk_value_t *result); awk_value_t *result);
/* /*
* Convert a parameter that was undefined into an array * Convert a parameter that was undefined into an array
* (provide call-by-reference for arrays). Returns false * (provide call-by-reference for arrays). Returns false
 End of changes. 5 change blocks. 
5 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)