]> bicyclesonthemoon.info Git - ott/enhance/blob - online-core.1.h
t-1 online. That's all tools!
[ott/enhance] / online-core.1.h
1 /*
2 online-core.h is autogenerated from online-core.1.h
3 Common parts of the online interface
4 03.12.2022
5
6 Copyright (C) 2022  Balthasar SzczepaƄski
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU Affero General Public License as
10 published by the Free Software Foundation, either version 3 of the
11 License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU Affero General Public License for more details.
17
18 You should have received a copy of the GNU Affero General Public License
19 along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
21 Requires cgilib (http://www.infodrom.org/projects/cgilib/)
22 */
23
24 #include <stdint.h>
25 #include <cgi.h>
26
27 // ###C_USERAGENT: #define USERAGENT "enhance"
28
29 // ###C_CP_PATH:   #define CP_PATH   "cp"
30 // ###C_WGET_PATH: #define WGET_PATH "wget"
31 // ###C_RM_PATH:   #define RM_PATH   "rm"
32
33 // ###C_TEMP_PATH: #define TEMP_PATH "/botm/tmp/enhance"
34
35 // ###C_BLUENH_PATH:      #define NPB_PATH         "/botm/bin/bluenh"
36 // ###C_DIFF_PATH:        #define DIFF_PATH        "/botm/bin/diff"
37 // ###C_NOFADING_PATH:    #define NOFADING_PATH    "/botm/bin/nofading"
38 // ###C_NPB_PATH:         #define NPB_PATH         "/botm/bin/npb"
39 // ###C_PAL_MIX_PATH:     #define PAL_MIX_PATH     "/botm/bin/pal_mix"
40 // ###C_PAL_MIXDIFF_PATH: #define PAL_MIXDIFF_PATH "/botm/bin/pal_mixdiff"
41 // ###C_PAL_UNMIX_PATH:   #define PAL_UNMIX_PATH   "/botm/bin/pal_unmix"
42 // ###C_REVEAL_PATH:      #define REVEAL_PATH      "/botm/bin/reveal"
43 // ###C_REMAP_T_1_PATH:   #define REMAP_T_1_PATH   "/botm/bin/remap_t_1"
44
45 int cp (char *src, char *dst);
46 int wget (char *url, char *dst);
47 int rm (char *dst);
48 void make_tmp_path(char *str, size_t n, unsigned int i, char *ext);
49 int get_file(s_cgi *cgi, char *name, char *dest, char **path);
50 int send_file (char *path, char *content_type, unsigned status);
51 int send_data (const uint8_t *address, size_t size, char *content_type, unsigned status);