[packagekit] C dude needed

Richard Hughes hughsient at gmail.com
Wed Feb 20 14:51:05 PST 2008


On Wed, 2008-02-20 at 23:37 +0100, Adrien BUSTANY wrote:
> Well, some bare code could be like :
> #include <stdio.h>
> 
> int main(int argc, char **argv) {
>         char answer;
>         printf("Would you like to plop ? [N/y] ");
>         scanf("%c", &answer);
> 
>         switch (answer) {
>                 case 'y':
>                         printf("Cool, let's go plopping\n");
>                         break;
>                 default:
>                         printf("Too bad, maybe another time\n");
>         }
>         return 0;
> }
> 
> of course this could be wrapped into a neat function

That'll do nicely, thanks.

Richard.





More information about the PackageKit mailing list