blob: 668fd60d3bb7883a66bb5228ad39266a9e659108 [file] [log] [blame]
Damien Miller398e1cf2002-02-05 11:52:13 +11001/* $OpenBSD: misc.h,v 1.11 2002/01/24 21:09:25 stevesk Exp $ */
Ben Lindstrom36579d32001-01-29 07:39:26 +00002
Ben Lindstrom226cfa02001-01-22 05:34:40 +00003/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
5 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
6 * All rights reserved
7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
13 */
Ben Lindstrom226cfa02001-01-22 05:34:40 +000014
Kevin Stevesd009ae32001-07-04 17:25:54 +000015char *chop(char *);
16char *strdelim(char **);
17void set_nonblock(int);
18void unset_nonblock(int);
Damien Miller398e1cf2002-02-05 11:52:13 +110019void set_nodelay(int);
Kevin Stevesd009ae32001-07-04 17:25:54 +000020int a2port(const char *);
21char *cleanhostname(char *);
22char *colon(char *);
23long convtime(const char *);
24
25struct passwd *pwcopy(struct passwd *);
Ben Lindstrom226cfa02001-01-22 05:34:40 +000026
Ben Lindstrom387c4722001-05-08 20:27:25 +000027typedef struct arglist arglist;
28struct arglist {
29 char **list;
30 int num;
31 int nalloc;
32};
Kevin Stevesd009ae32001-07-04 17:25:54 +000033void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3)));
Ben Lindstrom387c4722001-05-08 20:27:25 +000034
Kevin Stevesb6e773a2001-02-04 13:20:36 +000035/* wrapper for signal interface */
36typedef void (*mysig_t)(int);
37mysig_t mysignal(int sig, mysig_t act);