summaryrefslogtreecommitdiff
path: root/ppdc/ppdc-array.cxx
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-01-27 10:47:25 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-01-27 10:47:52 +0900
commitef9b26ed48ff777f0ac2e84e92aa54a382d2b37e (patch)
tree13a008c6165a5ce4bd06a3b1dd53df91c8b01485 /ppdc/ppdc-array.cxx
parent4daab3758f62250691d3994850ddd3a7faf80d5e (diff)
downloadcups-ef9b26ed48ff777f0ac2e84e92aa54a382d2b37e.tar.gz
cups-ef9b26ed48ff777f0ac2e84e92aa54a382d2b37e.tar.bz2
cups-ef9b26ed48ff777f0ac2e84e92aa54a382d2b37e.zip
Imported Upstream version 2.1.2upstream/2.1.2
Change-Id: Ia36f5862c3fcaa1f053ad69ed961e1fb9043e20b Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'ppdc/ppdc-array.cxx')
-rw-r--r--ppdc/ppdc-array.cxx35
1 files changed, 13 insertions, 22 deletions
diff --git a/ppdc/ppdc-array.cxx b/ppdc/ppdc-array.cxx
index 603ceb6..5b5bacc 100644
--- a/ppdc/ppdc-array.cxx
+++ b/ppdc/ppdc-array.cxx
@@ -1,25 +1,16 @@
//
-// "$Id: ppdc-array.cxx 11173 2013-07-23 12:31:34Z msweet $"
+// "$Id: ppdc-array.cxx 11558 2014-02-06 18:33:34Z msweet $"
//
-// Array class for the CUPS PPD Compiler.
+// Array class for the CUPS PPD Compiler.
//
-// Copyright 2007-2009 by Apple Inc.
-// Copyright 2002-2005 by Easy Software Products.
+// Copyright 2007-2014 by Apple Inc.
+// Copyright 2002-2005 by Easy Software Products.
//
-// These coded instructions, statements, and computer programs are the
-// property of Apple Inc. and are protected by Federal copyright
-// law. Distribution and use rights are outlined in the file "LICENSE.txt"
-// which should have been included with this file. If this file is
-// file is missing or damaged, see the license at "http://www.cups.org/".
-//
-// Contents:
-//
-// ppdcArray::ppdcArray() - Create a new array.
-// ppdcArray::~ppdcArray() - Destroy an array.
-// ppdcArray::add() - Add an element to an array.
-// ppdcArray::first() - Return the first element in the array.
-// ppdcArray::next() - Return the next element in the array.
-// ppdcArray::remove() - Remove an element from the array.
+// These coded instructions, statements, and computer programs are the
+// property of Apple Inc. and are protected by Federal copyright
+// law. Distribution and use rights are outlined in the file "LICENSE.txt"
+// which should have been included with this file. If this file is
+// file is missing or damaged, see the license at "http://www.cups.org/".
//
//
@@ -48,7 +39,7 @@ ppdcArray::ppdcArray(ppdcArray *a)
// Make a copy of the array...
data = new ppdcShared *[count];
- memcpy(data, a->data, count * sizeof(ppdcShared *));
+ memcpy(data, a->data, (size_t)count * sizeof(ppdcShared *));
for (int i = 0; i < count; i ++)
data[i]->retain();
@@ -98,7 +89,7 @@ ppdcArray::add(ppdcShared *d)
alloc += 10;
temp = new ppdcShared *[alloc];
- memcpy(temp, data, count * sizeof(ppdcShared *));
+ memcpy(temp, data, (size_t)count * sizeof(ppdcShared *));
delete[] data;
data = temp;
@@ -159,10 +150,10 @@ ppdcArray::remove(ppdcShared *d) // I - Data element
d->release();
if (i < count)
- memmove(data + i, data + i + 1, (count - i) * sizeof(ppdcShared *));
+ memmove(data + i, data + i + 1, (size_t)(count - i) * sizeof(ppdcShared *));
}
//
-// End of "$Id: ppdc-array.cxx 11173 2013-07-23 12:31:34Z msweet $".
+// End of "$Id: ppdc-array.cxx 11558 2014-02-06 18:33:34Z msweet $".
//