lib/vpwentry/new.cc
author "Tomas Zeman <tzeman@volny.cz>"
Sun, 20 Jan 2008 00:22:09 +0100
changeset 2 b3afb9f1e801
permissions -rw-r--r--
Imported vmailmgr-0.97
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     1
// Copyright (C) 1999,2000 Bruce Guenter <bruceg@em.ca>
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     2
//
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     3
// This program is free software; you can redistribute it and/or modify
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     4
// it under the terms of the GNU General Public License as published by
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     5
// the Free Software Foundation; either version 2 of the License, or
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     6
// (at your option) any later version.
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     7
//
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     8
// This program is distributed in the hope that it will be useful,
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    11
// GNU General Public License for more details.
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    12
//
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    13
// You should have received a copy of the GNU General Public License
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    14
// along with this program; if not, write to the Free Software
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    15
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    16
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    17
#include <config.h>
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    18
#include "vpwentry.h"
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    19
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    20
vpwentry* vpwentry::new_from_record(const mystring& name,
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    21
				    const mystring& text)
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    22
{
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    23
  vpwentry* v = new vpwentry;
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    24
  if(!v->from_record(name, text)) {
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    25
    delete v;
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    26
    v = 0;
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    27
  }
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    28
  return v;
b3afb9f1e801 Imported vmailmgr-0.97
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
    29
}