9fe98f701d
function old new delta read_base64 - 378 +378 uudecode_main 306 315 +9 parse 953 958 +5 read_stduu 250 254 +4 base64_main 217 219 +2 read_base64 358 - -358 decode_base64 371 - -371 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 4/0 up/down: 398/-729) Total: -331 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
35 lines
962 B
C
35 lines
962 B
C
|
|
struct globals {
|
|
pid_t helper_pid;
|
|
unsigned timeout;
|
|
unsigned opts;
|
|
char *user;
|
|
char *pass;
|
|
FILE *fp0; // initial stdin
|
|
char *opt_charset;
|
|
char *content_type;
|
|
};
|
|
|
|
#define G (*ptr_to_globals)
|
|
#define timeout (G.timeout )
|
|
#define opts (G.opts )
|
|
//#define user (G.user )
|
|
//#define pass (G.pass )
|
|
//#define fp0 (G.fp0 )
|
|
//#define opt_charset (G.opt_charset)
|
|
//#define content_type (G.content_type)
|
|
#define INIT_G() do { \
|
|
SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
|
|
G.opt_charset = (char *)CONFIG_FEATURE_MIME_CHARSET; \
|
|
G.content_type = (char *)"text/plain"; \
|
|
} while (0)
|
|
|
|
//char FAST_FUNC *parse_url(char *url, char **user, char **pass);
|
|
|
|
void FAST_FUNC launch_helper(const char **argv);
|
|
void FAST_FUNC get_cred_or_die(int fd);
|
|
|
|
const FAST_FUNC char *command(const char *fmt, const char *param);
|
|
|
|
void FAST_FUNC encode_base64(char *fname, const char *text, const char *eol);
|