-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify FORTRAN access to the new plugin path mechanism
The new plugin path API uses char** to represent a variable lenght vector of variable length strings. FORTRAN is not capable of accessing such structures. So, this PR extends the API to provide a counted string-based API to the plugin path functionality. The new functions are inserted in the netcdf_aux.h/daux.c files. The new functions are just wrappers around other plugin path API function; they are just (I hope) more convenient for FORTRAN users. The new functions are as follows: ### *ncaux_plugin_path_stringlen(void)* * Return the length (as in strlen) of the current plugin path directories encoded as a string. Return -1 if the request fails. ### *int ncaux_plugin_path_stringget(int pathlen, char* path)* * Get the current sequence of directories in the internal global plugin path list encoded as a string path using ';' as a path separator. As an example, it might return "/a/b/c;/home/user/me;/tmp". The arguments are as follows: * *pathlen* -- the length of the path argument. * *path* -- a string into which the current plugin path as a string is stored. * Return NC_NOERR | NC_EINVAL ### *int ncaux_plugin_path_stringset(int pathlen, const char* path)* * Set the current sequence of directories in the internal global plugin path list. As an example, it might take "/a/b/c;/home/user/me;/tmp". The arguments are as follows: * *pathlen* -- the length of the path argument. * *path* -- a string that is parsed to obtain the sequence of directories for the current plugin path. * Return NC_NOERR | NC_EINVAL
- Loading branch information
1 parent
e8d23ea
commit 2133052
Showing
7 changed files
with
254 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
testxget(global): /zero;/one;/two;/three;/four |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
testxset(global): before: /zero;/one;/two;/three;/four | ||
testxset(global): after: /zero;/one;/mod;/two;/three;/four |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.