From 6f34a1c4ad9420bb31809e5fe5b94583d09e53cb Mon Sep 17 00:00:00 2001 From: Cedric Bastoul Date: Wed, 22 Jun 2011 03:09:18 +0200 Subject: [PATCH] Rename string and _structure printing functions --- include/openscop/arrays.h | 6 ++--- include/openscop/comment.h | 6 ++--- include/openscop/extension.h | 2 +- include/openscop/irregular.h | 6 ++--- include/openscop/lines.h | 6 ++--- include/openscop/names.h | 2 +- include/openscop/relation.h | 2 +- include/openscop/relation_list.h | 2 +- include/openscop/scop.h.in | 2 +- include/openscop/statement.h | 2 +- include/openscop/util.h | 2 +- include/openscop/vector.h | 2 +- source/extension.c.in | 37 +++++++++------------------- source/extension.sh | 14 +++++------ source/extensions/arrays.c | 8 +++--- source/extensions/comment.c | 18 +++++++------- source/extensions/irregular.c | 18 +++++++------- source/extensions/lines.c | 18 +++++++------- source/names.c | 53 ++++++++++++++++++++-------------------- source/relation.c | 18 +++++++------- source/relation_list.c | 20 +++++++-------- source/scop.c | 19 +++++++------- source/statement.c | 26 ++++++++++---------- source/util.c | 18 +++++++------- source/vector.c | 9 +++---- 25 files changed, 150 insertions(+), 166 deletions(-) diff --git a/include/openscop/arrays.h b/include/openscop/arrays.h index 05b81fc..e50bfbd 100644 --- a/include/openscop/arrays.h +++ b/include/openscop/arrays.h @@ -95,15 +95,15 @@ typedef struct openscop_arrays * openscop_arrays_p; /*+*************************************************************************** * Structure display function * *****************************************************************************/ -void openscop_arrays_dump_structure(FILE *, openscop_arrays_p, int); +void openscop_arrays_idump(FILE *, openscop_arrays_p, int); void openscop_arrays_dump(FILE *, openscop_arrays_p); -char * openscop_arrays_print(openscop_arrays_p); +char * openscop_arrays_sprint(openscop_arrays_p); /***************************************************************************** * Reading function * *****************************************************************************/ -openscop_arrays_p openscop_arrays_read(char *); +openscop_arrays_p openscop_arrays_sread(char *); /*+*************************************************************************** diff --git a/include/openscop/comment.h b/include/openscop/comment.h index ec5419b..ec72924 100644 --- a/include/openscop/comment.h +++ b/include/openscop/comment.h @@ -91,15 +91,15 @@ typedef struct openscop_comment * openscop_comment_p; /*+*************************************************************************** * Structure display function * *****************************************************************************/ -void openscop_comment_dump_structure(FILE *, openscop_comment_p, int); +void openscop_comment_idump(FILE *, openscop_comment_p, int); void openscop_comment_dump(FILE *, openscop_comment_p); -char * openscop_comment_print(openscop_comment_p); +char * openscop_comment_sprint(openscop_comment_p); /***************************************************************************** * Reading function * *****************************************************************************/ -openscop_comment_p openscop_comment_read(char *); +openscop_comment_p openscop_comment_sread(char *); /*+*************************************************************************** diff --git a/include/openscop/extension.h b/include/openscop/extension.h index f98e8da..be4fda1 100644 --- a/include/openscop/extension.h +++ b/include/openscop/extension.h @@ -100,7 +100,7 @@ typedef struct openscop_extension * openscop_extension_p; /*+*************************************************************************** * Structure display function * *****************************************************************************/ -void openscop_extension_dump_structure(FILE *, openscop_extension_p, int); +void openscop_extension_idump(FILE *, openscop_extension_p, int); void openscop_extension_dump(FILE *, openscop_extension_p); void openscop_extension_print(FILE *, openscop_extension_p); diff --git a/include/openscop/irregular.h b/include/openscop/irregular.h index f60be7c..6194163 100644 --- a/include/openscop/irregular.h +++ b/include/openscop/irregular.h @@ -110,15 +110,15 @@ typedef struct openscop_irregular * openscop_irregular_p; /*+*************************************************************************** * Structure display function * *****************************************************************************/ -void openscop_irregular_dump_structure(FILE *, openscop_irregular_p, int); +void openscop_irregular_idump(FILE *, openscop_irregular_p, int); void openscop_irregular_dump(FILE *, openscop_irregular_p); -char * openscop_irregular_print(openscop_irregular_p); +char * openscop_irregular_sprint(openscop_irregular_p); /***************************************************************************** * Reading function * *****************************************************************************/ -openscop_irregular_p openscop_irregular_read(char *); +openscop_irregular_p openscop_irregular_sread(char *); /*+*************************************************************************** diff --git a/include/openscop/lines.h b/include/openscop/lines.h index c0faae8..8643c31 100644 --- a/include/openscop/lines.h +++ b/include/openscop/lines.h @@ -93,15 +93,15 @@ typedef struct openscop_lines * openscop_lines_p; /*+*************************************************************************** * Structure display function * *****************************************************************************/ -void openscop_lines_dump_structure(FILE *, openscop_lines_p, int); +void openscop_lines_idump(FILE *, openscop_lines_p, int); void openscop_lines_dump(FILE *, openscop_lines_p); -char * openscop_lines_print(openscop_lines_p); +char * openscop_lines_sprint(openscop_lines_p); /***************************************************************************** * Reading function * *****************************************************************************/ -openscop_lines_p openscop_lines_read(char *); +openscop_lines_p openscop_lines_sread(char *); /*+*************************************************************************** diff --git a/include/openscop/names.h b/include/openscop/names.h index b5dbff7..9cbaf4f 100644 --- a/include/openscop/names.h +++ b/include/openscop/names.h @@ -104,7 +104,7 @@ typedef struct openscop_names * openscop_names_p; /*+*************************************************************************** * Structure display function * *****************************************************************************/ -void openscop_names_dump_structure(FILE *, openscop_names_p, int); +void openscop_names_idump(FILE *, openscop_names_p, int); void openscop_names_dump(FILE *, openscop_names_p); void openscop_names_print(FILE *, openscop_names_p); diff --git a/include/openscop/relation.h b/include/openscop/relation.h index 55a6a99..9085036 100644 --- a/include/openscop/relation.h +++ b/include/openscop/relation.h @@ -123,7 +123,7 @@ typedef struct openscop_relation * openscop_relation_p; /*+*************************************************************************** * Structure display function * *****************************************************************************/ -void openscop_relation_dump_structure(FILE *, +void openscop_relation_idump(FILE *, openscop_relation_p, int); void openscop_relation_dump(FILE *, openscop_relation_p); char * openscop_relation_expression( diff --git a/include/openscop/relation_list.h b/include/openscop/relation_list.h index ce378ba..c7d7c30 100644 --- a/include/openscop/relation_list.h +++ b/include/openscop/relation_list.h @@ -93,7 +93,7 @@ typedef struct openscop_relation_list * openscop_relation_list_p; /*+*************************************************************************** * Structure display function * *****************************************************************************/ -void openscop_relation_list_dump_structure(FILE *, +void openscop_relation_list_idump(FILE *, openscop_relation_list_p, int); void openscop_relation_list_dump(FILE *, openscop_relation_list_p); void openscop_relation_list_print(FILE *, diff --git a/include/openscop/scop.h.in b/include/openscop/scop.h.in index b6260bb..5d82c05 100644 --- a/include/openscop/scop.h.in +++ b/include/openscop/scop.h.in @@ -113,7 +113,7 @@ typedef struct openscop_scop * openscop_scop_p; /*+*************************************************************************** * Structure display function * *****************************************************************************/ -void openscop_scop_dump_structure(FILE *, openscop_scop_p, int); +void openscop_scop_idump(FILE *, openscop_scop_p, int); void openscop_scop_dump(FILE *, openscop_scop_p); void openscop_scop_print(FILE *, openscop_scop_p); diff --git a/include/openscop/statement.h b/include/openscop/statement.h index 3922554..9f8bd1f 100644 --- a/include/openscop/statement.h +++ b/include/openscop/statement.h @@ -102,7 +102,7 @@ typedef struct openscop_statement * openscop_statement_p; /*+*************************************************************************** * Structure display function * *****************************************************************************/ -void openscop_statement_dump_structure(FILE *, openscop_statement_p, int); +void openscop_statement_idump(FILE *, openscop_statement_p, int); void openscop_statement_dump(FILE *, openscop_statement_p); void openscop_statement_print(FILE *, openscop_statement_p, openscop_names_p); diff --git a/include/openscop/util.h b/include/openscop/util.h index 1940b9f..739a5f1 100644 --- a/include/openscop/util.h +++ b/include/openscop/util.h @@ -75,7 +75,7 @@ extern "C" /*+*************************************************************************** * Functions on arrays of strings * *****************************************************************************/ -void openscop_util_strings_dump_structure(FILE*, char**, int, int, char*); +void openscop_util_strings_idump(FILE*, char**, int, int, char*); void openscop_util_strings_print(FILE*, char**, int, int, char*); char ** openscop_util_strings_read(FILE *, int *); char ** openscop_util_strings_generate(char *, int); diff --git a/include/openscop/vector.h b/include/openscop/vector.h index 4f93b3a..8244f1d 100644 --- a/include/openscop/vector.h +++ b/include/openscop/vector.h @@ -92,7 +92,7 @@ typedef struct openscop_vector * openscop_vector_p; /*+*************************************************************************** * Structure display function * *****************************************************************************/ -void openscop_vector_dump_structure(FILE *, openscop_vector_p, int); +void openscop_vector_idump(FILE *, openscop_vector_p, int); void openscop_vector_dump(FILE *, openscop_vector_p); diff --git a/source/extension.c.in b/source/extension.c.in index d80509a..5005cdc 100644 --- a/source/extension.c.in +++ b/source/extension.c.in @@ -66,18 +66,7 @@ # include -/* - * For each extension called FOO that a programmer wishes to add to - * OpenScop, the following functions must be provided in a dedicated - * file FOO.c (follow the "comment" example): - * - Display function (for internal use) - * - Print function (to OpenScop's file format as a string) - * - Read function (from OpenScop's file format as a string) - * - Malloc function (allocate the extension part in an extension structure) - * - Free function (free the extension part in an extension structure) - * - Copy function - * - Equal function - */ +/* !!!!!!!!! TO ADD A NEW EXTENSION, PLEASE READ AT THE MANUAL !!!!!!!!!!!! */ /*+*************************************************************************** @@ -86,7 +75,7 @@ /** - * openscop_extension_print_structure function: + * openscop_extension_idump function: * this function displays a openscop_extension_t structure (*extensions) into * a file (file, possibly stdout) in a way that trends to be understandable. * It includes an indentation level (level) in order to work with others @@ -95,9 +84,8 @@ * \param extensions The extensions whose information have to be printed. * \param level Number of spaces before printing, for each line. */ -void openscop_extension_dump_structure(FILE * file, - openscop_extension_p extension, - int level) { +void openscop_extension_idump(FILE * file, + openscop_extension_p extension, int level) { int j, first = 1; // Go to the right level. @@ -127,7 +115,7 @@ void openscop_extension_dump_structure(FILE * file, // Go to the right level. for (j = 0; j < level; j++) fprintf(file, "|\t"); - switch (extension->type) { @PRINT_STRUCTURE1@ + switch (extension->type) { @IDUMP1@ default: { fprintf(file, "|\ttype = unsupported (%d)\n", extension->type); } @@ -138,7 +126,7 @@ void openscop_extension_dump_structure(FILE * file, fprintf(file, "|\t"); fprintf(file, "\n"); - switch (extension->type) { @PRINT_STRUCTURE2@ + switch (extension->type) { @IDUMP2@ default: { // A blank line. for (j = 0; j <= level+1; j++) @@ -160,26 +148,25 @@ void openscop_extension_dump_structure(FILE * file, /** - * openscop_extension_print function: + * openscop_extension_dump function: * this function prints the content of a openscop_extension_t structure * (*extension) into a file (file, possibly stdout). * \param file File where informations are printed. * \param extension The extension structure to print. */ void openscop_extension_dump(FILE * file, openscop_extension_p extension) { - openscop_extension_dump_structure(file, extension, 0); + openscop_extension_idump(file, extension, 0); } /** - * openscop_extension_print_openscop function: + * openscop_extension_print function: * this function prints the content of a openscop_extension_t structure * (*extension) into a string (returned) in the OpenScop format. * \param extension The extension structure to print. * \return A string containing the OpenScop dump of the extension structure. */ -void openscop_extension_print(FILE * file, - openscop_extension_p extension) { +void openscop_extension_print(FILE * file, openscop_extension_p extension) { char * string; int ignored; @@ -188,7 +175,7 @@ void openscop_extension_print(FILE * file, while (extension != NULL) { ignored = 0; - switch (extension->type) { @PRINT_OPENSCOP@ + switch (extension->type) { @SPRINT@ default: { ignored = 1; fprintf(stderr, @@ -225,7 +212,7 @@ openscop_extension_p openscop_extension_read(FILE * file) { void * x; extension_string = openscop_util_read_tail(file); - @READ@ + @SREAD@ free(extension_string); return extension; diff --git a/source/extension.sh b/source/extension.sh index 7c953f7..d212f74 100755 --- a/source/extension.sh +++ b/source/extension.sh @@ -70,7 +70,7 @@ EXTENSIONS_OUT='./source/extension.c' # *************************************************************************** TEMPLATE_STRING[0]= -TEMPLATE_SUBSTITUTION[0]='@PRINT_STRUCTURE1@' +TEMPLATE_SUBSTITUTION[0]='@IDUMP1@' TEMPLATE[0]='\ case OPENSCOP_EXTENSION_TEMPLATE: {\ fprintf(file, "|\\\\ttype = OPENSCOP_EXTENSION_TEMPLATE\\\\n");\ @@ -80,10 +80,10 @@ TEMPLATE[0]='\ # *************************************************************************** TEMPLATE_STRING[1]= -TEMPLATE_SUBSTITUTION[1]='@PRINT_STRUCTURE2@' +TEMPLATE_SUBSTITUTION[1]='@IDUMP2@' TEMPLATE[1]='\ case OPENSCOP_EXTENSION_TEMPLATE: {\ - openscop_template_dump_structure(\ + openscop_template_idump(\ file,\ (openscop_template_p)extension->extension,\ level + 1);\ @@ -93,10 +93,10 @@ TEMPLATE[1]='\ # *************************************************************************** TEMPLATE_STRING[2]= -TEMPLATE_SUBSTITUTION[2]='@PRINT_OPENSCOP@' +TEMPLATE_SUBSTITUTION[2]='@SPRINT@' TEMPLATE[2]='\ case OPENSCOP_EXTENSION_TEMPLATE: {\ - string = openscop_template_print(\ + string = openscop_template_sprint(\ (openscop_template_p)extension->extension);\ break;\ }' @@ -104,9 +104,9 @@ TEMPLATE[2]='\ # *************************************************************************** TEMPLATE_STRING[3]= -TEMPLATE_SUBSTITUTION[3]='@READ@' +TEMPLATE_SUBSTITUTION[3]='@SREAD@' TEMPLATE[3]='\ - x = (void *)openscop_template_read(extension_string);\ + x = (void *)openscop_template_sread(extension_string);\ openscop_extension_add(\&extension, OPENSCOP_EXTENSION_TEMPLATE, x);' # *************************************************************************** diff --git a/source/extensions/arrays.c b/source/extensions/arrays.c index ceff19b..696929f 100644 --- a/source/extensions/arrays.c +++ b/source/extensions/arrays.c @@ -82,7 +82,7 @@ * \param arrays The arrays structure whose information has to be printed. * \param level Number of spaces before printing, for each line. */ -void openscop_arrays_dump_structure(FILE * file, openscop_arrays_p arrays, +void openscop_arrays_idump(FILE * file, openscop_arrays_p arrays, int level) { int i, j; @@ -128,7 +128,7 @@ void openscop_arrays_dump_structure(FILE * file, openscop_arrays_p arrays, * \param arrays The arrays structure whose information has to be printed. */ void openscop_arrays_dump(FILE * file, openscop_arrays_p arrays) { - openscop_arrays_dump_structure(file, arrays, 0); + openscop_arrays_idump(file, arrays, 0); } @@ -139,7 +139,7 @@ void openscop_arrays_dump(FILE * file, openscop_arrays_p arrays) { * \param arrays The arrays structure whose information has to be printed. * \return A string containing the OpenScop dump of the arrays structure. */ -char * openscop_arrays_print(openscop_arrays_p arrays) { +char * openscop_arrays_sprint(openscop_arrays_p arrays) { int i; int high_water_mark = OPENSCOP_MAX_STRING; char * string = NULL; @@ -188,7 +188,7 @@ char * openscop_arrays_print(openscop_arrays_p arrays) { * \param extensions The input string where to find an arrays structure. * \return A pointer to the arrays structure that has been read. */ -openscop_arrays_p openscop_arrays_read(char * extensions) { +openscop_arrays_p openscop_arrays_sread(char * extensions) { int i, k, array_id; int nb_names; int * id; diff --git a/source/extensions/comment.c b/source/extensions/comment.c index 2eb493a..91f936a 100644 --- a/source/extensions/comment.c +++ b/source/extensions/comment.c @@ -72,7 +72,7 @@ /** - * openscop_comment_print_structure function: + * openscop_comment_idump function: * this function displays an openscop_comment_t structure (*comment) into a * file (file, possibly stdout) in a way that trends to be understandable. It * includes an indentation level (level) in order to work with others @@ -81,8 +81,8 @@ * \param comment The comment structure whose information has to be printed. * \param level Number of spaces before printing, for each line. */ -void openscop_comment_dump_structure(FILE * file, openscop_comment_p comment, - int level) { +void openscop_comment_idump(FILE * file, openscop_comment_p comment, + int level) { int j; char * tmp; @@ -117,25 +117,25 @@ void openscop_comment_dump_structure(FILE * file, openscop_comment_p comment, /** - * openscop_comment_print function: + * openscop_comment_dump function: * this function prints the content of an openscop_comment_t structure * (*comment) into a file (file, possibly stdout). * \param file The file where the information has to be printed. * \param comment The comment structure whose information has to be printed. */ void openscop_comment_dump(FILE * file, openscop_comment_p comment) { - openscop_comment_dump_structure(file, comment, 0); + openscop_comment_idump(file, comment, 0); } /** - * openscop_comment_print_openscop function: + * openscop_comment_sprint function: * this function prints the content of an openscop_comment_t structure * (*comment) into a string (returned) in the OpenScop textual format. * \param comment The comment structure whose information has to be printed. * \return A string containing the OpenScop dump of the comment structure. */ -char * openscop_comment_print(openscop_comment_p comment) { +char * openscop_comment_sprint(openscop_comment_p comment) { int high_water_mark = OPENSCOP_MAX_STRING; char * string = NULL; char * buffer; @@ -175,14 +175,14 @@ char * openscop_comment_print(openscop_comment_p comment) { *****************************************************************************/ /** - * openscop_comment_read function: + * openscop_comment_sread function: * this function reads a comment structure from a string complying to the * OpenScop textual format and returns a pointer to this comment structure. * The string should contain only one textual format of a comment structure. * \param extensions The input string where to find a comment structure. * \return A pointer to the comment structure that has been read. */ -openscop_comment_p openscop_comment_read(char * extensions) { +openscop_comment_p openscop_comment_sread(char * extensions) { char * content; openscop_comment_p comment; diff --git a/source/extensions/irregular.c b/source/extensions/irregular.c index a1326c4..0666f70 100644 --- a/source/extensions/irregular.c +++ b/source/extensions/irregular.c @@ -72,7 +72,7 @@ /** - * openscop_irregular_print_structure function: + * openscop_irregular_idump function: * this function displays an openscop_irregular_t structure (*irregular) into a * file (file, possibly stdout) in a way that trends to be understandable. It * includes an indentation level (level) in order to work with others @@ -82,8 +82,8 @@ * \param level Number of spaces before printing, for each line. */ void -openscop_irregular_dump_structure(FILE * file, openscop_irregular_p irregular, - int level) +openscop_irregular_idump(FILE * file, openscop_irregular_p irregular, + int level) { int i,j; @@ -130,7 +130,7 @@ openscop_irregular_dump_structure(FILE * file, openscop_irregular_p irregular, /** - * openscop_irregular_print function: + * openscop_irregular_dump function: * this function prints the content of an openscop_irregular_t structure * (*irregular) into a file (file, possibly stdout). * \param file The file where the information has to be printed. @@ -139,19 +139,19 @@ openscop_irregular_dump_structure(FILE * file, openscop_irregular_p irregular, void openscop_irregular_dump(FILE * file, openscop_irregular_p irregular) { - openscop_irregular_dump_structure(file, irregular, 0); + openscop_irregular_idump(file, irregular, 0); } /** - * openscop_irregular_print_openscop function: + * openscop_irregular_sprint function: * this function prints the content of an openscop_irregular_t structure * (*irregular) into a string (returned) in the OpenScop textual format. * \param irregular The irregular structure whose information has to be printed. * \return A string containing the OpenScop dump of the irregular structure. */ char * -openscop_irregular_print(openscop_irregular_p irregular) +openscop_irregular_sprint(openscop_irregular_p irregular) { int high_water_mark = OPENSCOP_MAX_STRING,i,j; char * string = NULL; @@ -213,7 +213,7 @@ openscop_irregular_print(openscop_irregular_p irregular) *****************************************************************************/ /** - * openscop_irregular_read function: + * openscop_irregular_sread function: * this function reads a irregular structure from a string complying to the * OpenScop textual format and returns a pointer to this irregular structure. * The string should contain only one textual format of a irregular structure. @@ -221,7 +221,7 @@ openscop_irregular_print(openscop_irregular_p irregular) * \return A pointer to the irregular structure that has been read. */ openscop_irregular_p -openscop_irregular_read(char * extensions) +openscop_irregular_sread(char * extensions) { char * content,*tok; int i,j; diff --git a/source/extensions/lines.c b/source/extensions/lines.c index b069048..eef1763 100644 --- a/source/extensions/lines.c +++ b/source/extensions/lines.c @@ -72,7 +72,7 @@ /** - * openscop_lines_print_structure function: + * openscop_lines_idump function: * this function displays an openscop_lines_t structure (*lines) into a * file (file, possibly stdout) in a way that trends to be understandable. It * includes an indentation level (level) in order to work with others @@ -81,8 +81,8 @@ * \param lines The lines structure whose information has to be printed. * \param level Number of spaces before printing, for each line. */ -void openscop_lines_dump_structure(FILE * file, openscop_lines_p lines, - int level) { +void openscop_lines_idump(FILE * file, openscop_lines_p lines, + int level) { int j; // Go to the right level. @@ -111,25 +111,25 @@ void openscop_lines_dump_structure(FILE * file, openscop_lines_p lines, /** - * openscop_lines_print function: + * openscop_lines_dump function: * this function prints the content of an openscop_lines_t structure * (*lines) into a file (file, possibly stdout). * \param file The file where the information has to be printed. * \param lines The lines structure whose information has to be printed. */ void openscop_lines_dump(FILE * file, openscop_lines_p lines) { - openscop_lines_dump_structure(file, lines, 0); + openscop_lines_idump(file, lines, 0); } /** - * openscop_lines_print_openscop function: + * openscop_lines_sprint function: * this function prints the content of an openscop_lines_t structure * (*lines) into a string (returned) in the OpenScop textual format. * \param lines The lines structure whose information has to be printed. * \return A string containing the OpenScop dump of the lines structure. */ -char * openscop_lines_print(openscop_lines_p lines) { +char * openscop_lines_sprint(openscop_lines_p lines) { int high_water_mark = OPENSCOP_MAX_STRING; char * string = NULL; char * buffer; @@ -169,14 +169,14 @@ char * openscop_lines_print(openscop_lines_p lines) { *****************************************************************************/ /** - * openscop_lines_read function: + * openscop_lines_sread function: * this function reads a lines structure from a string complying to the * OpenScop textual format and returns a pointer to this lines structure. * The string should contain only one textual format of a lines structure. * \param extensions The input string where to find a lines structure. * \return A pointer to the lines structure that has been read. */ -openscop_lines_p openscop_lines_read(char * extensions) { +openscop_lines_p openscop_lines_sread(char * extensions) { char * content, *tmp; openscop_lines_p lines; diff --git a/source/names.c b/source/names.c index d6b32c2..e91985d 100644 --- a/source/names.c +++ b/source/names.c @@ -72,7 +72,7 @@ /** - * openscop_names_print_structure function: + * openscop_names_idump function: * this function displays an openscop_names_t structure (*names) into a * file (file, possibly stdout) in a way that trends to be understandable. It * includes an indentation level (level) in order to work with others @@ -81,8 +81,7 @@ * \param names The names structure whose information has to be printed. * \param level Number of spaces before printing, for each line. */ -void openscop_names_dump_structure(FILE * file, openscop_names_p names, - int level) { +void openscop_names_idump(FILE * file, openscop_names_p names, int level) { int j; // Go to the right level. @@ -106,29 +105,29 @@ void openscop_names_dump_structure(FILE * file, openscop_names_p names, fprintf(file, "\n"); // Print the original parameter names. - openscop_util_strings_dump_structure(file, names->parameters, - names->nb_parameters, level, - "Parameter strings"); + openscop_util_strings_idump(file, names->parameters, + names->nb_parameters, level, + "Parameter strings"); // Print the iterator names. - openscop_util_strings_dump_structure(file, names->iterators, - names->nb_iterators, level, - "Iterator strings"); + openscop_util_strings_idump(file, names->iterators, + names->nb_iterators, level, + "Iterator strings"); // Print the scattering dimension names. - openscop_util_strings_dump_structure(file, names->scattdims, - names->nb_scattdims, level, - "Scattering dimension strings"); + openscop_util_strings_idump(file, names->scattdims, + names->nb_scattdims, level, + "Scattering dimension strings"); // Print the local dimension names. - openscop_util_strings_dump_structure(file, names->localdims, - names->nb_localdims, level, - "Local dimension strings"); + openscop_util_strings_idump(file, names->localdims, + names->nb_localdims, level, + "Local dimension strings"); // Print the array names. - openscop_util_strings_dump_structure(file, names->arrays, - names->nb_arrays, level, - "Array strings"); + openscop_util_strings_idump(file, names->arrays, + names->nb_arrays, level, + "Array strings"); } // The last line. @@ -139,19 +138,19 @@ void openscop_names_dump_structure(FILE * file, openscop_names_p names, /** - * openscop_names_print function: + * openscop_names_dump function: * this function prints the content of an openscop_names_t structure * (*names) into a file (file, possibly stdout). * \param file The file where the information has to be printed. * \param names The names structure whose information has to be printed. */ void openscop_names_dump(FILE * file, openscop_names_p names) { - openscop_names_dump_structure(file, names, 0); + openscop_names_idump(file, names, 0); } /** - * openscop_names_print_openscop function: + * openscop_names_print function: * this function prints the content of an openscop_names_t structure (*names) * into a file (file, possibly stdout) in the OpenScop textual format. * \param file The file where the information has to be printed. @@ -161,16 +160,16 @@ void openscop_names_print(FILE * file, openscop_names_p names) { int print = ((names != NULL) && (names->textual == 1)); openscop_util_strings_print(file, - names->parameters, names->nb_parameters, - print, "Parameter names"); + names->parameters, names->nb_parameters, + print, "Parameter names"); openscop_util_strings_print(file, - names->iterators, names->nb_iterators, - print, "Iterator names"); + names->iterators, names->nb_iterators, + print, "Iterator names"); openscop_util_strings_print(file, - names->scattdims, names->nb_scattdims, - print, "Scattering dimension names"); + names->scattdims, names->nb_scattdims, + print, "Scattering dimension names"); } diff --git a/source/relation.c b/source/relation.c index 3976466..d315749 100644 --- a/source/relation.c +++ b/source/relation.c @@ -198,7 +198,7 @@ void openscop_relation_print_type(FILE * file, openscop_relation_p relation) { /** - * openscop_relation_print_structure function: + * openscop_relation_idump function: * this function displays a openscop_relation_t structure (*relation) into a * file (file, possibly stdout) in a way that trends to be understandable. * It includes an indentation level (level) in order to work with others @@ -207,9 +207,9 @@ void openscop_relation_print_type(FILE * file, openscop_relation_p relation) { * \param[in] relation The relation whose information has to be printed. * \param[in] level Number of spaces before printing, for each line. */ -void openscop_relation_dump_structure(FILE * file, - openscop_relation_p relation, - int level) { +void openscop_relation_idump(FILE * file, + openscop_relation_p relation, + int level) { int i, j, first = 1; // Go to the right level. @@ -279,14 +279,14 @@ void openscop_relation_dump_structure(FILE * file, /** - * openscop_relation_print function: + * openscop_relation_dump function: * this function prints the content of a openscop_relation_t structure * (*relation) into a file (file, possibly stdout). * \param[in] file File where informations are printed. * \param[in] relation The relation whose information have to be printed. */ void openscop_relation_dump(FILE * file, openscop_relation_p relation) { - openscop_relation_dump_structure(file, relation, 0); + openscop_relation_idump(file, relation, 0); } @@ -693,7 +693,7 @@ void openscop_relation_print_comment(FILE * file, /** - * openscop_relation_print_openscop function: + * openscop_relation_print function: * this function prints the content of a openscop_relation_t structure * (*relation) into a file (file, possibly stdout) in the OpenScop format. * \param[in] file File where informations are printed. @@ -704,8 +704,8 @@ void openscop_relation_print_comment(FILE * file, * comments is not needed. */ void openscop_relation_print(FILE * file, - openscop_relation_p relation, - openscop_names_p names) { + openscop_relation_p relation, + openscop_names_p names) { int i, j; int part, nb_parts; int printable_comments; diff --git a/source/relation_list.c b/source/relation_list.c index 2b7f13d..d4f4003 100644 --- a/source/relation_list.c +++ b/source/relation_list.c @@ -74,7 +74,7 @@ /** - * openscop_relation_list_print_structure function: + * openscop_relation_list_idump function: * Displays a openscop_relation_list_t structure (a list of relations) into a * file (file, possibly stdout). See openscop_relation_print_structure for * more details. @@ -82,9 +82,9 @@ * \param l The list of relations whose information have to be printed. * \param level Number of spaces before printing, for each line. */ -void openscop_relation_list_dump_structure(FILE * file, - openscop_relation_list_p l, - int level) { +void openscop_relation_list_idump(FILE * file, + openscop_relation_list_p l, + int level) { int j, first = 1; // Go to the right level. @@ -112,7 +112,7 @@ void openscop_relation_list_dump_structure(FILE * file, fprintf(file, "\n"); // Print a relation. - openscop_relation_dump_structure(file, l->elt, level+1); + openscop_relation_idump(file, l->elt, level+1); l = l->next; @@ -132,19 +132,19 @@ void openscop_relation_list_dump_structure(FILE * file, /** - * openscop_relation_list_print function: + * openscop_relation_dump function: * This function prints the content of a openscop_relation_list_t into * a file (file, possibly stdout). * \param file File where informations are printed. * \param list The relation whose information have to be printed. */ void openscop_relation_list_dump(FILE * file, openscop_relation_list_p list) { - openscop_relation_list_dump_structure(file, list, 0); + openscop_relation_list_idump(file, list, 0); } /** - * openscop_relation_list_print_openscop function: + * openscop_relation_list_print function: * This function prints the content of a openscop_relation_list_t structure * into a file (file, possibly stdout) in the OpenScop format. It prints * an element of the list only if it is not NULL. @@ -156,8 +156,8 @@ void openscop_relation_list_dump(FILE * file, openscop_relation_list_p list) { * is not needed. */ void openscop_relation_list_print(FILE * file, - openscop_relation_list_p list, - openscop_names_p names) { + openscop_relation_list_p list, + openscop_names_p names) { int i; openscop_relation_list_p head = list; diff --git a/source/scop.c b/source/scop.c index 5cf2404..8b13aed 100644 --- a/source/scop.c +++ b/source/scop.c @@ -73,7 +73,7 @@ /** - * openscop_scop_print_structure function: + * openscop_scop_idump function: * this function displays an openscop_scop_t structure (*scop) into a * file (file, possibly stdout) in a way that trends to be understandable. It * includes an indentation level (level) in order to work with others @@ -82,8 +82,7 @@ * \param scop The scop structure whose information has to be printed. * \param level Number of spaces before printing, for each line. */ -void openscop_scop_dump_structure(FILE * file, openscop_scop_p scop, - int level) { +void openscop_scop_idump(FILE * file, openscop_scop_p scop, int level) { int j; // Go to the right level. @@ -109,16 +108,16 @@ void openscop_scop_dump_structure(FILE * file, openscop_scop_p scop, fprintf(file, "\n"); // Print the context of the scop. - openscop_relation_dump_structure(file, scop->context, level+1); + openscop_relation_idump(file, scop->context, level+1); // Print the names. - openscop_names_dump_structure(file, scop->names, level+1); + openscop_names_idump(file, scop->names, level+1); // Print the statements. - openscop_statement_dump_structure(file, scop->statement, level+1); + openscop_statement_idump(file, scop->statement, level+1); // Print the extensions. - openscop_extension_dump_structure(file, scop->extension, level+1); + openscop_extension_idump(file, scop->extension, level+1); // A blank line. for (j = 0; j <= level+1; j++) @@ -137,14 +136,14 @@ void openscop_scop_dump_structure(FILE * file, openscop_scop_p scop, /** - * openscop_scop_print function: + * openscop_scop_dump function: * this function prints the content of an openscop_scop_t structure (*scop) * into a file (file, possibly stdout). * \param file The file where the information has to be printed. * \param scop The scop structure whose information has to be printed. */ void openscop_scop_dump(FILE * file, openscop_scop_p scop) { - openscop_scop_dump_structure(file, scop, 0); + openscop_scop_idump(file, scop, 0); } @@ -305,7 +304,7 @@ openscop_names_p openscop_scop_full_names(openscop_scop_p scop) { /** - * openscop_scop_print_openscop function: + * openscop_scop_print function: * this function prints the content of an openscop_scop_t structure (*scop) * into a file (file, possibly stdout) in the OpenScop textual format. * \param file The file where the information has to be printed. diff --git a/source/statement.c b/source/statement.c index 3f36edc..84ad243 100644 --- a/source/statement.c +++ b/source/statement.c @@ -74,7 +74,7 @@ /** - * openscop_statement_print_structure function: + * openscop_statement_idump function: * Displays a openscop_statement_t structure (*statement) into a file (file, * possibly stdout) in a way that trends to be understandable without falling * in a deep depression or, for the lucky ones, getting a headache... It @@ -84,9 +84,9 @@ * \param statement The statement whose information have to be printed. * \param level Number of spaces before printing, for each line. */ -void openscop_statement_dump_structure(FILE * file, - openscop_statement_p statement, - int level) { +void openscop_statement_idump(FILE * file, + openscop_statement_p statement, + int level) { int i, j, first = 1, number = 1; // Go to the right level. @@ -114,16 +114,16 @@ void openscop_statement_dump_structure(FILE * file, fprintf(file, "\n"); // Print the domain of the statement. - openscop_relation_dump_structure(file, statement->domain, level+1); + openscop_relation_idump(file, statement->domain, level+1); // Print the scattering of the statement. - openscop_relation_dump_structure(file, statement->scattering, level+1); + openscop_relation_idump(file, statement->scattering, level+1); // Print the array read access informations of the statement. - openscop_relation_list_dump_structure(file, statement->read, level+1); + openscop_relation_list_idump(file, statement->read, level+1); // Print the array write access informations of the statement. - openscop_relation_list_dump_structure(file, statement->write, level+1); + openscop_relation_list_idump(file, statement->write, level+1); // Print the original iterator names. for (i = 0; i <= level; i++) @@ -174,19 +174,19 @@ void openscop_statement_dump_structure(FILE * file, /** - * openscop_statement_print function: + * openscop_statement_dump function: * This function prints the content of a openscop_statement_t structure * (*statement) into a file (file, possibly stdout). * \param file File where informations are printed. * \param statement The statement whose information have to be printed. */ void openscop_statement_dump(FILE * file, openscop_statement_p statement) { - openscop_statement_dump_structure(file, statement, 0); + openscop_statement_idump(file, statement, 0); } /** - * openscop_statement_print_openscop function: + * openscop_statement_print function: * This function prints the content of a openscop_statement_t structure * (*statement) into a file (file, possibly stdout) in the OpenScop format. * \param file File where informations are printed. @@ -197,8 +197,8 @@ void openscop_statement_dump(FILE * file, openscop_statement_p statement) { * is not needed. */ void openscop_statement_print(FILE * file, - openscop_statement_p statement, - openscop_names_p names) { + openscop_statement_p statement, + openscop_names_p names) { int i, switched, number = 1; int tmp_nb_iterators = 0; char ** tmp_iterators = NULL; diff --git a/source/util.c b/source/util.c index 7987b18..b092472 100644 --- a/source/util.c +++ b/source/util.c @@ -73,7 +73,7 @@ /** - * openscop_util_strings_print_structure function: + * openscop_util_strings_idump function: * this function displays an array of strings into a file (file, possibly * stdout) in a way that trends to be understandable. It includes an * indentation level (level) in order to work with others @@ -84,10 +84,10 @@ * \param level Number of spaces before printing, for each line. * \param title A string to use as a title for the array of strings. */ -void openscop_util_strings_dump_structure(FILE * file, - char ** strings, int nb_strings, - int level, - char * title) { +void openscop_util_strings_idump(FILE * file, + char ** strings, int nb_strings, + int level, + char * title) { int i; // Print the original parameter names. @@ -110,7 +110,7 @@ void openscop_util_strings_dump_structure(FILE * file, /** - * openscop_util_strings_print_openscop function: + * openscop_util_strings_print function: * this function prints the content of an array of strings * into a file (file, possibly stdout) in the OpenScop textual format. * \param file The file where the information has to be printed. @@ -120,9 +120,9 @@ void openscop_util_strings_dump_structure(FILE * file, * \param title A string to use as a title for the array of strings. */ void openscop_util_strings_print(FILE * file, - char ** strings, int nb_strings, - int print, - char * title) { + char ** strings, int nb_strings, + int print, + char * title) { int i; if ((print != 0) && (nb_strings > 0)) { diff --git a/source/vector.c b/source/vector.c index fa07bdf..9579d93 100644 --- a/source/vector.c +++ b/source/vector.c @@ -73,7 +73,7 @@ /** - * openscop_vector_print_structure function: + * openscop_vector_idump function: * Displays a openscop_vector_t structure (*vector) into a file (file, possibly * stdout) in a way that trends to be understandable without falling in a deep * depression or, for the lucky ones, getting a headache... It includes an @@ -83,8 +83,7 @@ * \param vector The vector whose information have to be printed. * \param level Number of spaces before printing, for each line. */ -void openscop_vector_dump_structure(FILE * file, openscop_vector_p vector, - int level) { +void openscop_vector_idump(FILE * file, openscop_vector_p vector, int level) { int j; if (vector != NULL) { @@ -125,14 +124,14 @@ void openscop_vector_dump_structure(FILE * file, openscop_vector_p vector, /** - * openscop_vector_print function: + * openscop_vector_dump function: * This function prints the content of a openscop_vector_t structure * (*vector) into a file (file, possibly stdout). * \param file File where informations are printed. * \param vector The vector whose information have to be printed. */ void openscop_vector_dump(FILE * file, openscop_vector_p vector) { - openscop_vector_dump_structure(file,vector,0); + openscop_vector_idump(file,vector,0); } -- 2.11.4.GIT