"Fossies" - the Fresh Open Source Software Archive

Member "udns-0.4/udns_dntosp.c" (5 Jul 2011, 1125 Bytes) of package /linux/misc/dns/udns-0.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "udns_dntosp.c" see the Fossies "Dox" file reference documentation.

    1 /* udns_dntosp.c
    2    dns_dntosp() = convert DN to asciiz string using static buffer
    3 
    4    Copyright (C) 2005  Michael Tokarev <mjt@corpit.ru>
    5    This file is part of UDNS library, an async DNS stub resolver.
    6 
    7    This library is free software; you can redistribute it and/or
    8    modify it under the terms of the GNU Lesser General Public
    9    License as published by the Free Software Foundation; either
   10    version 2.1 of the License, or (at your option) any later version.
   11 
   12    This library is distributed in the hope that it will be useful,
   13    but WITHOUT ANY WARRANTY; without even the implied warranty of
   14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   15    Lesser General Public License for more details.
   16 
   17    You should have received a copy of the GNU Lesser General Public
   18    License along with this library, in file named COPYING.LGPL; if not,
   19    write to the Free Software Foundation, Inc., 59 Temple Place,
   20    Suite 330, Boston, MA  02111-1307  USA
   21 
   22  */
   23 
   24 #include "udns.h"
   25 
   26 static char name[DNS_MAXNAME];
   27 
   28 const char *dns_dntosp(dnscc_t *dn) {
   29   return dns_dntop(dn, name, sizeof(name)) > 0 ? name : 0;
   30 }