Browse Source

Cosmetics

Piotr Czajkowski 6 years ago
parent
commit
8f09302056
2 changed files with 4 additions and 7 deletions
  1. 3 3
      comments.c
  2. 1 4
      comments.h

+ 3 - 3
comments.c

@@ -3,7 +3,7 @@
 #include "comments.h"
 #include "stopif.h"
 
-char* anonymizeAuthor(dictionary *authors, xmlChar const *authorName) {
+char* anonymizeAuthor(dictionary *authors, const xmlChar *authorName) {
 	char *name = (char*)authorName;
 	char *newName = (char*)dictionary_find(authors, name);
 
@@ -16,12 +16,12 @@ char* anonymizeAuthor(dictionary *authors, xmlChar const *authorName) {
 	return (char*)dictionary_find(authors, name);
 }
 
-void printAuthors(dictionary *authors) {
+void printAuthors(const dictionary *authors) {
 	for (int i=0; i<authors->length; i++)
 		printf("\"%s\" is now \"%s\"\n", authors->pairs[i]->key, (char*)authors->pairs[i]->value);
 }
 
-int processAuthors(xmlXPathObjectPtr authors) {
+int processAuthors(const xmlXPathObjectPtr authors) {
 	dictionary *anonAuthors = dictionary_new();
 	
 	for (int i=0; i < authors->nodesetval->nodeNr; i++){

+ 1 - 4
comments.h

@@ -3,7 +3,4 @@
 #include "dict.h"
 #include "xmlbuff.h"
 
-char* anonymizeAuthor(dictionary *authors, xmlChar const *authorName);
-void printAuthors(dictionary *authors);
-int processAuthors(xmlXPathObjectPtr authors);
-int anonymizeComments(XMLBuff *infile);
+int anonymizeComments(XMLBuff *infile);