]>
git.ipfire.org Git - thirdparty/cups.git/blob - ppdc/ppdc-string.cxx
2 // Shared string class for the CUPS PPD Compiler.
4 // Copyright 2007-2012 by Apple Inc.
5 // Copyright 2002-2005 by Easy Software Products.
7 // These coded instructions, statements, and computer programs are the
8 // property of Apple Inc. and are protected by Federal copyright
9 // law. Distribution and use rights are outlined in the file "LICENSE.txt"
10 // which should have been included with this file. If this file is
11 // missing or damaged, see the license at "http://www.cups.org/".
15 // Include necessary headers...
18 #include "ppdc-private.h"
22 // 'ppdcString::ppdcString()' - Create a shared string.
25 ppdcString::ppdcString(const char *v
) // I - String
32 size_t vlen
= strlen(v
);
34 value
= new char[vlen
+ 1];
35 memcpy(value
, v
, vlen
+ 1);
43 // 'ppdcString::~ppdcString()' - Destroy a shared string.
46 ppdcString::~ppdcString()
48 PPDC_DELETEVAL(value
);