GQueue2.c 537 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
/*!
 * GQueue2.c
 *
 *  Created :   2012. 09. 16. (일) 19:20:43 KST
 *
 *****************************************************************************
 *  Etc.
 *
 */

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <glib.h>

int
main (int argc, char* argv[])
{
    int i;
    GQueue *queue = g_queue_new();

    for (i=0; i<argc; i++)
    {
        g_queue_push_head (queue, argv[i]);
    }

    while (!g_queue_is_empty(queue))
    {
        printf ("%s\n", (char*) g_queue_pop_head(queue));
    }

    return 0;
}