From 1b7402ee3f1b8034458b63ae8c47334c3d49f0e5 Mon Sep 17 00:00:00 2001 From: qorg11 Date: Tue, 29 Jun 2021 14:34:02 +0200 Subject: Fulfill Richard Stallman's demands --- src/asprintf.c | 17 +++++++++++++++++ src/asprintf.h | 22 +++++++++++++++++++--- src/config.h | 17 +++++++++++++++++ src/login.c | 17 +++++++++++++++++ src/login.h | 20 +++++++++++++++++++- src/main.c | 17 +++++++++++++++++ src/post.c | 17 +++++++++++++++++ src/post.h | 17 +++++++++++++++++ src/upload_file.c | 17 +++++++++++++++++ src/upload_file.h | 17 +++++++++++++++++ src/util.c | 17 +++++++++++++++++ src/util.h | 27 ++++++++++++++++++++++++--- 12 files changed, 215 insertions(+), 7 deletions(-) diff --git a/src/asprintf.c b/src/asprintf.c index 5120335..8026c52 100644 --- a/src/asprintf.c +++ b/src/asprintf.c @@ -1,3 +1,20 @@ +/* + This file is part of demiurge. + + demiurge is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + demiurge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with demiurge. If not, see . +*/ + #include #include #include diff --git a/src/asprintf.h b/src/asprintf.h index 54b6403..76f1f4f 100644 --- a/src/asprintf.h +++ b/src/asprintf.h @@ -1,8 +1,24 @@ +/* + This file is part of demiurge. + + demiurge is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + demiurge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with demiurge. If not, see . +*/ + #include int -asprintf(char **restrict strp, const char *restrict fmt,... ); +asprintf(char **restrict strp, const char *restrict fmt, ...); int -vasprintf(char **restrict strp, const char *restrict fmt, - va_list ap); +vasprintf(char **restrict strp, const char *restrict fmt, va_list ap); diff --git a/src/config.h b/src/config.h index d4f440b..c6fe1ee 100644 --- a/src/config.h +++ b/src/config.h @@ -1,3 +1,20 @@ +/* + This file is part of demiurge. + + demiurge is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + demiurge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with demiurge. If not, see . +*/ + /* Compilation options */ #define __USE_EDITLINE diff --git a/src/login.c b/src/login.c index 25e2f1c..66e9a9b 100644 --- a/src/login.c +++ b/src/login.c @@ -1,3 +1,20 @@ +/* + This file is part of demiurge. + + demiurge is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + demiurge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with demiurge. If not, see . +*/ + #include "config.h" #include #include diff --git a/src/login.h b/src/login.h index 77cc39a..f2252d5 100644 --- a/src/login.h +++ b/src/login.h @@ -1 +1,19 @@ -int setup(); /* Log into the account */ +/* + This file is part of demiurge. + + demiurge is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + demiurge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with demiurge. If not, see . +*/ + +int +setup(); /* Log into the account */ diff --git a/src/main.c b/src/main.c index 6de525b..ab9794b 100644 --- a/src/main.c +++ b/src/main.c @@ -1,3 +1,20 @@ +/* + This file is part of demiurge. + + demiurge is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + demiurge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with demiurge. If not, see . +*/ + #include #include #include diff --git a/src/post.c b/src/post.c index c4683c1..573ba8f 100644 --- a/src/post.c +++ b/src/post.c @@ -1,3 +1,20 @@ +/* + This file is part of demiurge. + + demiurge is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + demiurge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with demiurge. If not, see . +*/ + #include #include #include diff --git a/src/post.h b/src/post.h index 988edac..bca0da5 100644 --- a/src/post.h +++ b/src/post.h @@ -1,2 +1,19 @@ +/* + This file is part of demiurge. + + demiurge is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + demiurge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with demiurge. If not, see . +*/ + int post_status(const char *status, const char *scope, const char *media_id); diff --git a/src/upload_file.c b/src/upload_file.c index e64f450..01ec791 100644 --- a/src/upload_file.c +++ b/src/upload_file.c @@ -1,3 +1,20 @@ +/* + This file is part of demiurge. + + demiurge is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + demiurge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with demiurge. If not, see . +*/ + #include #include #include diff --git a/src/upload_file.h b/src/upload_file.h index 5ac0cf0..50b3d28 100644 --- a/src/upload_file.h +++ b/src/upload_file.h @@ -1,2 +1,19 @@ +/* + This file is part of demiurge. + + demiurge is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + demiurge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with demiurge. If not, see . +*/ + int upload_file(const char *path, const char *description, char **id_ptr); diff --git a/src/util.c b/src/util.c index 21a9067..04c8d25 100644 --- a/src/util.c +++ b/src/util.c @@ -1,3 +1,20 @@ +/* + This file is part of demiurge. + + demiurge is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + demiurge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with demiurge. If not, see . +*/ + #include #include #include diff --git a/src/util.h b/src/util.h index 3eda25e..f457e64 100644 --- a/src/util.h +++ b/src/util.h @@ -1,15 +1,36 @@ +/* + This file is part of demiurge. + + demiurge is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + demiurge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with demiurge. If not, see . +*/ + #include int -get_tokens_from_file(char *filename, char *instance,char *client_id, - char *client_secret, char *access_token); +get_tokens_from_file(char *filename, + char *instance, + char *client_id, + char *client_secret, + char *access_token); size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp); void eputs(const char *s); -struct memory { +struct memory +{ char *response; size_t size; }; -- cgit v1.2.3