\doxysubsection{command.\+c}
\label{command_8c_source}\index{command.c@{command.c}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001 \textcolor{comment}{/*= -\/*-\/ c-\/basic-\/offset: 4; indent-\/tabs-\/mode: nil; -\/*-\/}}
\DoxyCodeLine{00002 \textcolor{comment}{ *}}
\DoxyCodeLine{00003 \textcolor{comment}{ * librsync -\/-\/ the library for network deltas}}
\DoxyCodeLine{00004 \textcolor{comment}{ *}}
\DoxyCodeLine{00005 \textcolor{comment}{ * Copyright (C) 2000 by Martin Pool <mbp@sourcefrog.net>}}
\DoxyCodeLine{00006 \textcolor{comment}{ *}}
\DoxyCodeLine{00007 \textcolor{comment}{ * This program is free software; you can redistribute it and/or}}
\DoxyCodeLine{00008 \textcolor{comment}{ * modify it under the terms of the GNU Lesser General Public License}}
\DoxyCodeLine{00009 \textcolor{comment}{ * as published by the Free Software Foundation; either version 2.1 of}}
\DoxyCodeLine{00010 \textcolor{comment}{ * the License, or (at your option) any later version.}}
\DoxyCodeLine{00011 \textcolor{comment}{ *}}
\DoxyCodeLine{00012 \textcolor{comment}{ * This program is distributed in the hope that it will be useful, but}}
\DoxyCodeLine{00013 \textcolor{comment}{ * WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{00014 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU}}
\DoxyCodeLine{00015 \textcolor{comment}{ * Lesser General Public License for more details.}}
\DoxyCodeLine{00016 \textcolor{comment}{ *}}
\DoxyCodeLine{00017 \textcolor{comment}{ * You should have received a copy of the GNU Lesser General Public}}
\DoxyCodeLine{00018 \textcolor{comment}{ * License along with this program; if not, write to the Free Software}}
\DoxyCodeLine{00019 \textcolor{comment}{ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.}}
\DoxyCodeLine{00020 \textcolor{comment}{ */}}
\DoxyCodeLine{00021 }
\DoxyCodeLine{00022 \textcolor{preprocessor}{\#include "{}config.h"{}}             \textcolor{comment}{/* IWYU pragma: keep */}}
\DoxyCodeLine{00023 \textcolor{preprocessor}{\#include <stddef.h>}}
\DoxyCodeLine{00024 \textcolor{preprocessor}{\#include "{}command.h"{}}}
\DoxyCodeLine{00025 }
\DoxyCodeLine{00026 \textcolor{comment}{/* For debugging purposes, here are some human-\/readable forms. */}}
\DoxyCodeLine{00027 \textcolor{keyword}{struct }rs\_op\_kind\_name const rs\_op\_kind\_names[] = \{}
\DoxyCodeLine{00028     \{\textcolor{stringliteral}{"{}END"{}}, RS\_KIND\_END\},}
\DoxyCodeLine{00029     \{\textcolor{stringliteral}{"{}COPY"{}}, RS\_KIND\_COPY\},}
\DoxyCodeLine{00030     \{\textcolor{stringliteral}{"{}LITERAL"{}}, RS\_KIND\_LITERAL\},}
\DoxyCodeLine{00031     \{\textcolor{stringliteral}{"{}SIGNATURE"{}}, RS\_KIND\_SIGNATURE\},}
\DoxyCodeLine{00032     \{\textcolor{stringliteral}{"{}CHECKSUM"{}}, RS\_KIND\_CHECKSUM\},}
\DoxyCodeLine{00033     \{\textcolor{stringliteral}{"{}INVALID"{}}, RS\_KIND\_INVALID\},}
\DoxyCodeLine{00034     \{NULL, 0\}}
\DoxyCodeLine{00035 \};}
\DoxyCodeLine{00036 \textcolor{comment}{}}
\DoxyCodeLine{00037 \textcolor{comment}{/** Return a human-\/readable name for KIND. */}}
\DoxyCodeLine{00038 \textcolor{keywordtype}{char} \textcolor{keyword}{const} *rs\_op\_kind\_name(\textcolor{keyword}{enum} rs\_op\_kind kind)}
\DoxyCodeLine{00039 \{}
\DoxyCodeLine{00040     \textcolor{keyword}{const} \textcolor{keyword}{struct }rs\_op\_kind\_name *k;}
\DoxyCodeLine{00041 }
\DoxyCodeLine{00042     \textcolor{keywordflow}{for} (k = rs\_op\_kind\_names; k-\/>kind; k++) \{}
\DoxyCodeLine{00043         \textcolor{keywordflow}{if} (k-\/>kind == kind) \{}
\DoxyCodeLine{00044             \textcolor{keywordflow}{return} k-\/>name;}
\DoxyCodeLine{00045         \}}
\DoxyCodeLine{00046     \}}
\DoxyCodeLine{00047 }
\DoxyCodeLine{00048     \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{00049 \}}

\end{DoxyCode}
