Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  get_domainname.c

  Sprache: C
 

/*++
/* NAME
/* get_domainname 3
/* SUMMARY
/* network domain name lookup
/* SYNOPSIS
/* #include <get_domainname.h>
/*
/* const char *get_domainname()
/* DESCRIPTION
/* get_domainname() returns the local domain name as obtained
/* by stripping the hostname component from the result from
/* get_hostname().  The result is the hostname when get_hostname()
/* does not return a FQDN form ("foo"), or its result has only two
/* components ("foo.com").
/* DIAGNOSTICS
/* Fatal errors: no hostname, invalid hostname.
/* SEE ALSO
/* get_hostname(3)
/* LICENSE
/* .ad
/* .fi
/* The Secure Mailer license must be distributed with this software.
/* AUTHOR(S)
/* Wietse Venema
/* IBM T.J. Watson Research
/* P.O. Box 704
/* Yorktown Heights, NY 10598, USA
/*--*/


/* System library. */

#include <sys_defs.h>
#include <string.h>

/* Utility library. */

#include "mymalloc.h"
#include "get_hostname.h"
#include "get_domainname.h"

/* Local stuff. */

static char *my_domain_name;

/* get_domainname - look up my domain name */

const char *get_domainname(void)
{
    const char *host;
    const char *dot;

    /*
     * Use the hostname when it is not a FQDN ("foo"), or when the hostname
     * actually is a domain name ("foo.com").
     */

    if (my_domain_name == 0) {
 host = get_hostname();
 if ((dot = strchr(host, '.')) == 0 || strchr(dot + 1'.') == 0) {
     my_domain_name = mystrdup(host);
 } else {
     my_domain_name = mystrdup(dot + 1);
 }
    }
    return (my_domain_name);
}

Messung V0.5 in Prozent
C=72 H=94 G=83

¤ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet am  2026-08-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002