Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=cfpm.git;a=commitdiff;h=e0149bc67b1d6cc64de7e30ab2552970ca0b405c

commit e0149bc67b1d6cc64de7e30ab2552970ca0b405c
Author: James Buren <r...@frugalware.org>
Date:   Thu Jun 4 11:22:36 2009 -0500

main.m
* update

diff --git a/main.m b/main.m
index e57c6f4..3c6160d 100644
--- a/main.m
+++ b/main.m
@@ -1,5 +1,5 @@
-#include <objpak/ocstring.h>
#include "pm.h"
+#include "util.h"

int main(void)
{
@@ -23,9 +23,7 @@ int main(void)

puts("Input a package name to test:");

-       str = [String new:16];
-
-       scanf("%15s",[str str]);
+       str = [UString fscanf:stdin count:16];

/* query the database */
pkg = [db ReadPackage: [str str]];
@@ -34,13 +32,14 @@ int main(void)
printf ("Error, no such package.\n");
return 1;
}
+
/* Print some info about the package */
printf ("Name: %s\n", [pkg Name]);
printf ("Description: %s\n", [pkg Description]);
printf ("Version: %s\n", [pkg Version]);
printf ("URL: %s\n", [pkg URL]);
printf ("Packager: %s\n", [pkg Packager]);
-
+
/* release memory */
[pkg free];
[db free];
@@ -48,6 +47,6 @@ int main(void)

/* release libpacman */
pacman_release();
-
+
return 0;
}
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to