Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  sendopts.c

  Sprache: C
 

/*++
/* NAME
/* sendopts 3
/* SUMMARY
/* Support for SMTPUTF8, REQUIRETLS, etc.
/* SYNOPSIS
/* #include <sendopts.h>
/*
/* const char *sendopts_strflags(
/* int flags,
/* int delim)
/* DESCRIPTION
/* Postfix queue files and IPC messages contain a sendopts field
/* with flags that control SMTPUTF8, REQUIRETLS, etc. support. The
/* flags are documented in sendopts(3h), and are based on information
/* received with ESMTP requests or with message content.
/*
/* The SMTPUTF8 flags life cycle is documented in smtputf8(3h).
/*
/* sendopts_strflags() maps a sendopts flag value to printable
/* string. The result is overwritten upon each call.
/*
/* Arguments:
/* .IP flags
/* A bitmask that is to be converted to text.
/* .IP delim
/* The character to separate output words with: one of ' ,|'.
/* DIAGNOSTICS
/* Panic: invalid delimiter. Fatal error: invalid flag.
/* LICENSE
/* .ad
/* .fi
/* The Secure Mailer license must be distributed with this software.
/* AUTHOR(S)
/* Wietse Venema
/* porcupine.org
/*--*/


/* System library. */

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

 /*
  * Utility library.
  */

#include <msg.h>
#include <vstring.h>
#include <name_mask.h>

 /*
  * Global library.
  */

#include <sendopts.h>

 /*
  * Mapping from flags to printable string.
  */

static NAME_MASK sendopts_flag_map[] = {
    "smtputf8_requested", SOPT_SMTPUTF8_REQUESTED,
    "smtputf8_header", SOPT_SMTPUTF8_HEADER,
    "smtputf8_sender", SOPT_SMTPUTF8_SENDER,
    "smtputf8_recipient", SOPT_SMTPUTF8_RECIPIENT,
    "requiretls_header", SOPT_REQUIRETLS_HEADER,
    "requiretls_esmtp", SOPT_REQUIRETLS_ESMTP,
    0,
};

/* sendopts_strflags - map flags code to printable string */

const char *sendopts_strflags(unsigned flags, int delim)
{
    const char myname[] = "sendopts_strflags";
    static const char delims[] = " ,|";
    static const int dflags[] = {0, NAME_MASK_COMMA, NAME_MASK_PIPE};
    static VSTRING *result;
    const char *cp;

    if (flags == 0)
 return ("none");

    if (result == 0)
 result = vstring_alloc(20);
    else
 VSTRING_RESET(result);

    if ((cp = strchr(delims, delim)) == 0)
 msg_panic("%s: bad delimiter: '%c'", myname, delim);

    return (str_name_mask_opt(result, "sendopts_strflags", sendopts_flag_map,
         flags, NAME_MASK_FATAL | dflags[cp - delims]));
}

Messung V0.5 in Prozent
C=57 H=100 G=81

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

*© 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=141584
#Domains=752002