aboutsummaryrefslogtreecommitdiff
path: root/plugins/readability
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/readability')
-rw-r--r--plugins/readability/readability.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/plugins/readability/readability.c b/plugins/readability/readability.c
index 2afc63b..bc2f02f 100644
--- a/plugins/readability/readability.c
+++ b/plugins/readability/readability.c
@@ -1,22 +1,23 @@
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
+#include <string.h>
#define READABILITY_N 85133 + 1000
-void read_readability_js(char* string){
- FILE *fp=fopen("/home/loki/Documents/core/software/fresh/C/rose-browser/rosenrot/plugins/readability/readability.js", "r");
- if (!fp) { // fp is NULL, fopen failed
- fprintf(stderr, "Failed to open file\n");
- string=NULL;
- return;
- }
- int i=0;
- int c;
- while ((c = fgetc(fp)) != EOF){
- string[i++] = c;
- }
- string[i]='\0';
- fclose(fp);
+void read_readability_js(char* string)
+{
+ FILE* fp = fopen("/home/loki/Documents/core/software/fresh/C/rose-browser/rosenrot/plugins/readability/readability.js", "r");
+ if (!fp) { // fp is NULL, fopen failed
+ fprintf(stderr, "Failed to open file\n");
+ string = NULL;
+ return;
+ }
+ int i = 0;
+ int c;
+ while ((c = fgetc(fp)) != EOF) {
+ string[i++] = c;
+ }
+ string[i] = '\0';
+ fclose(fp);
}
/*