doc: fix clutter_init() usage in examples

Make sure users get the idea that clutter_init()
has a return value that needs to be checked.

These were fixed via sed magic:

sed -i -s -e "s/clutter_init (.*)/\
if (& != CLUTTER_INIT_SUCCESS)\n    return 1/"\
 doc/*/*/*.{c,xml} doc/*/*.xml

http://bugzilla.clutter-project.org/show_bug.cgi?id=2574
This commit is contained in:
nobled
2011-02-22 00:44:55 +00:00
committed by Neil Roberts
parent eb906d85ca
commit aece642adb
44 changed files with 98 additions and 52 deletions

View File

@ -70,10 +70,11 @@ main (int argc, char *argv[])
ClutterActor *top, *bottom;
ClutterState *transitions;
clutter_init_with_args (&argc, &argv,
" - cross-fade", entries,
NULL,
NULL);
if (clutter_init_with_args (&argc, &argv,
" - cross-fade", entries,
NULL,
NULL) != CLUTTER_INIT_SUCCESS)
return 1;
if (source == NULL || target == NULL)
{
@ -81,7 +82,8 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
clutter_init (&argc, &argv);
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
return 1;
stage = clutter_stage_get_default ();
clutter_stage_set_title (CLUTTER_STAGE (stage), "cross-fade");