\doxysubsection{hex.\+c}
\label{hex_8c_source}\index{hex.c@{hex.c}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001 \textcolor{comment}{/*= -\/*-\/ c-\/basic-\/offset: 4; indent-\/tabs-\/mode: nil; -\/*-\/}}
\DoxyCodeLine{00002 \textcolor{comment}{ *}}
\DoxyCodeLine{00003 \textcolor{comment}{ * Copyright (C) 2000, 2001 by Martin Pool <mbp@sourcefrog.net>}}
\DoxyCodeLine{00004 \textcolor{comment}{ *}}
\DoxyCodeLine{00005 \textcolor{comment}{ * This program is free software; you can redistribute it and/or modify}}
\DoxyCodeLine{00006 \textcolor{comment}{ * it under the terms of the GNU Lesser General Public License as published by}}
\DoxyCodeLine{00007 \textcolor{comment}{ * the Free Software Foundation; either version 2.1 of the License, or}}
\DoxyCodeLine{00008 \textcolor{comment}{ * (at your option) any later version.}}
\DoxyCodeLine{00009 \textcolor{comment}{ *}}
\DoxyCodeLine{00010 \textcolor{comment}{ * This program is distributed in the hope that it will be useful,}}
\DoxyCodeLine{00011 \textcolor{comment}{ * but WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{00012 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the}}
\DoxyCodeLine{00013 \textcolor{comment}{ * GNU Lesser General Public License for more details.}}
\DoxyCodeLine{00014 \textcolor{comment}{ *}}
\DoxyCodeLine{00015 \textcolor{comment}{ * You should have received a copy of the GNU Lesser General Public License}}
\DoxyCodeLine{00016 \textcolor{comment}{ * along with this program; if not, write to the Free Software}}
\DoxyCodeLine{00017 \textcolor{comment}{ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.}}
\DoxyCodeLine{00018 \textcolor{comment}{ */}}
\DoxyCodeLine{00019 }
\DoxyCodeLine{00020 \textcolor{preprocessor}{\#include "{}config.h"{}}             \textcolor{comment}{/* IWYU pragma: keep */}}
\DoxyCodeLine{00021 \textcolor{preprocessor}{\#include "{}librsync.h"{}}}
\DoxyCodeLine{00022 }
\DoxyCodeLine{00023 \textcolor{keywordtype}{void} rs\_hexify(\textcolor{keywordtype}{char} *to\_buf, \textcolor{keywordtype}{void} \textcolor{keyword}{const} *from, \textcolor{keywordtype}{int} from\_len)}
\DoxyCodeLine{00024 \{}
\DoxyCodeLine{00025     \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} hex\_chars[] = \textcolor{stringliteral}{"{}0123456789abcdef"{}};}
\DoxyCodeLine{00026     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} \textcolor{keyword}{const} *from\_buf = (\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} \textcolor{keyword}{const} *)from;}
\DoxyCodeLine{00027 }
\DoxyCodeLine{00028     \textcolor{keywordflow}{while} (from\_len-\/-\/ > 0) \{}
\DoxyCodeLine{00029         *(to\_buf++) = hex\_chars[((*from\_buf) >> 4) \& 0xf];}
\DoxyCodeLine{00030         *(to\_buf++) = hex\_chars[(*from\_buf) \& 0xf];}
\DoxyCodeLine{00031         from\_buf++;}
\DoxyCodeLine{00032     \}}
\DoxyCodeLine{00033 }
\DoxyCodeLine{00034     *to\_buf = 0;}
\DoxyCodeLine{00035 \}}

\end{DoxyCode}
