PERFORCE change 163458 for review
David Forsythe
dforsyth at FreeBSD.org
Thu Jun 4 02:08:03 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=163458
Change 163458 by dforsyth at squirrel on 2009/06/04 02:07:47
plist creation for clients.
Affected files ...
.. //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkg.h#7 edit
.. //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkg_plist.c#2 edit
.. //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkg_plist.h#2 edit
Differences ...
==== //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkg.h#7 (text+ko) ====
@@ -41,6 +41,8 @@
struct pkg_plist;
-struct pkg_plist *pkg_plist_parse_contents_from_text(const char *text);
+struct pkg_plist *pkg_plist_new(void);
+
+struct pkg_plist *pkg_plist_new_from_text(const char *text);
#endif
==== //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkg_plist.c#2 (text+ko) ====
@@ -33,6 +33,24 @@
};
struct pkg_plist *
+pkg_plist_new()
+{
+ struct pkg_plist *pl;
+
+ pl = calloc(1, sizeof(*pl));
+ return (pl);
+}
+
+struct pkg_plist *
+pkg_plist_new_from_text(const char *text)
+{
+ struct pkg_plist *pl;
+
+ pl = pkg_plist_parse_contents_from_text(text);
+ return (pl);
+}
+
+struct pkg_plist *
pkg_plist_parse_contents_from_text(const char *text)
{
char *p;
@@ -45,7 +63,7 @@
if (text == NULL)
return (NULL);
- pl = calloc(1, sizeof(*pl));
+ pl = pkg_plist_new();
if (pl == NULL)
return (NULL);
==== //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkg_plist.h#2 (text+ko) ====
@@ -31,8 +31,8 @@
};
struct pl_entry;
-struct pkg_plist;
+struct pkg_plist *pkg_plist_parse_contents_from_text(const char *text);
struct pl_entry *pkg_plist_parse_line(char *line);
void pkg_plist_plist_init(struct pkg_plist *pl);
More information about the p4-projects
mailing list