summaryrefslogtreecommitdiff
path: root/rsync/msg.c
Unidiff
Diffstat (limited to 'rsync/msg.c') (more/less context) (ignore whitespace changes)
-rw-r--r--rsync/msg.c75
1 files changed, 75 insertions, 0 deletions
diff --git a/rsync/msg.c b/rsync/msg.c
new file mode 100644
index 0000000..aad2eb5
--- a/dev/null
+++ b/rsync/msg.c
@@ -0,0 +1,75 @@
1/*= -*- c-basic-offset: 4; indent-tabs-mode: nil; -*-
2 *
3 * librsync -- the library for network deltas
4 * $Id$
5 *
6 * Copyright (C) 2000, 2001 by Martin Pool <mbp@samba.org>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23
24 /*
25 | Welcome to Arco AM/PM Mini-Market. We
26 | would like to advise our customers
27 | that any individual who offers to
28 | pump gas, wash windows or solicit
29 | products is not employed by or
30 | associated with this facility. We
31 | discourage any contact with these
32 | individuals and ask that you report
33 | any problems to uniformed personal
34 | inside. Thankyou for shopping at
35 | Arco, and have a nice day.
36 */
37
38#include <config_rsync.h>
39
40#include <stdlib.h>
41#include <stdio.h>
42
43#include "rsync.h"
44
45
46/** \brief Translate from rs_result to human-readable messages. */
47char const *rs_strerror(rs_result r)
48{
49 switch (r) {
50 case RS_DONE:
51 return "OK";
52 case RS_RUNNING:
53 return "still running";
54 case RS_BAD_MAGIC:
55 return "bad magic number at start of stream";
56 case RS_BLOCKED:
57 return "blocked waiting for input or output buffers";
58 case RS_INPUT_ENDED:
59 return "unexpected end of input";
60 case RS_CORRUPT:
61 return "stream corrupt";
62 case RS_UNIMPLEMENTED:
63 return "unimplemented case";
64 case RS_MEM_ERROR:
65 return "out of memory";
66 case RS_IO_ERROR:
67 return "IO error";
68 case RS_SYNTAX_ERROR:
69 return "bad command line syntax";
70 case RS_INTERNAL_ERROR:
71 return "library internal error";
72 default:
73 return "unexplained problem";
74 }
75}