summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/misc.h b/misc.h
index bcc34f980..4a05db2da 100644
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.h,v 1.81 2019/09/03 08:32:11 djm Exp $ */ 1/* $OpenBSD: misc.h,v 1.84 2020/01/24 23:54:40 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -69,6 +69,8 @@ long convtime(const char *);
69char *tilde_expand_filename(const char *, uid_t); 69char *tilde_expand_filename(const char *, uid_t);
70char *percent_expand(const char *, ...) __attribute__((__sentinel__)); 70char *percent_expand(const char *, ...) __attribute__((__sentinel__));
71char *tohex(const void *, size_t); 71char *tohex(const void *, size_t);
72void xextendf(char **s, const char *sep, const char *fmt, ...)
73 __attribute__((__format__ (printf, 3, 4))) __attribute__((__nonnull__ (3)));
72void sanitise_stdfd(void); 74void sanitise_stdfd(void);
73void ms_subtract_diff(struct timeval *, int *); 75void ms_subtract_diff(struct timeval *, int *);
74void ms_to_timeval(struct timeval *, int); 76void ms_to_timeval(struct timeval *, int);
@@ -178,11 +180,18 @@ int opt_match(const char **opts, const char *term);
178#define RP_ALLOW_EOF 0x0004 180#define RP_ALLOW_EOF 0x0004
179#define RP_USE_ASKPASS 0x0008 181#define RP_USE_ASKPASS 0x0008
180 182
183struct notifier_ctx;
184
181char *read_passphrase(const char *, int); 185char *read_passphrase(const char *, int);
182int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2))); 186int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2)));
187struct notifier_ctx *notify_start(int, const char *, ...)
188 __attribute__((format(printf, 2, 3)));
189void notify_complete(struct notifier_ctx *);
183 190
184#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) 191#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
185#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) 192#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b))
186#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) 193#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y))
187 194
195typedef void (*sshsig_t)(int);
196sshsig_t ssh_signal(int, sshsig_t);
188#endif /* _MISC_H */ 197#endif /* _MISC_H */