3 * Copyright (C) 2003-2010 Jim Evins <evins@snaught.com>.
5 * This file is part of libglabels.
7 * libglabels is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * libglabels is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with libglabels. If not, see <http://www.gnu.org/licenses/>.
23 #include "lgl-vendor.h"
25 #include <glib/gi18n.h>
29 #include "libglabels-private.h"
31 /*===========================================*/
33 /*===========================================*/
36 /*===========================================*/
38 /*===========================================*/
41 /*===========================================*/
42 /* Local function prototypes */
43 /*===========================================*/
46 /*===========================================*/
48 /*===========================================*/
52 * @name: Localized name of vendor.
54 * Allocates and constructs a new #lglVendor structure.
56 * Returns: a pointer to a newly allocated #lglVendor structure.
60 lgl_vendor_new (gchar *name)
64 vendor = g_new0 (lglVendor,1);
66 vendor->name = g_strdup (name);
74 * @orig: #lglVendor structure to be duplicated.
76 * Duplicates an existing #lglVendor structure.
78 * Returns: a pointer to a newly allocated #lglVendor structure.
81 lglVendor *lgl_vendor_dup (const lglVendor *orig)
85 g_return_val_if_fail (orig, NULL);
87 vendor = g_new0 (lglVendor,1);
89 vendor->name = g_strdup (orig->name);
90 vendor->url = g_strdup (orig->url);
98 * @vendor: pointer to #lglVendor structure to be freed.
100 * Free all memory associated with an existing #lglVendor structure.
103 void lgl_vendor_free (lglVendor *vendor)
106 if ( vendor != NULL )
108 g_free (vendor->name);
111 g_free (vendor->url);
122 * Local Variables: -- emacs
124 * c-basic-offset: 8 -- emacs
125 * tab-width: 8 -- emacs
126 * indent-tabs-mode: nil -- emacs