Somewhat improve code uniformity.
[neverball] / ball / main.c
index 8db8ebc..3e22d45 100644 (file)
@@ -321,11 +321,8 @@ int main(int argc, char *argv[])
     {
         if (!level_replay(replay_path))
         {
-            fprintf(stderr, _("Replay file '%s': "), replay_path);
-            if (errno)
-                perror(NULL);
-            else
-                fprintf(stderr, _("Not a replay file\n"));
+            fprintf(stderr, _("Replay file '%s':  %s\n"), replay_path,
+                    errno ? strerror(errno) : _("Not a replay file"));
             return 1;
         }
         else if (display_info)
@@ -423,10 +420,12 @@ int main(int argc, char *argv[])
     /* Initialize the run state. */
 
     init_state(&st_null);
-    if (replay_path != NULL)
+
+    if (replay_path)
     {
         level_replay(replay_path);
-        goto_demo_play(1);
+        demo_play_goto(1);
+        goto_state(&st_demo_play);
     }
     else if (level_path != NULL)
     {