rem: nexttrack = get_track(++tracknum, argc, argv); if (nexttrack != NULL) { eci_cleanup_r(eci); initialize_chainsetup_for_playback(&eci, nexttrack); }  else {  if (ecaplay_mode == ECAPLAY_MODE_PL_PLAY) {  tracknum = 1;  nexttrack = get_track(tracknum, argc, argv);  if (nexttrack != NULL) { eci_cleanup_r(eci); initialize_chainsetup_for_playback(&eci, nexttrack); }  } else {   break; } }
add: ++tracknum; nexttrack = get_next_track(tracknum, argc, argv, &eci); printf("Next track is %s.\n", nexttrack);
context: static int play_tracks(int argc, char *argv[]){  eci_handle_t eci = NULL;  int tracknum = 1, stop = 0;  const char* nexttrack = NULL;  assert(ecaplay_mode == ECAPLAY_MODE_NORMAL || 	 ecaplay_mode == ECAPLAY_MODE_PL_PLAY);  tracknum += ecaplay_skip;  if (tracknum <= argc) {    nexttrack = get_track(tracknum, argc, argv);  }  if (nexttrack != NULL) {    setup_signal_handling();    initialize_chainsetup_for_playback(&eci, nexttrack);    while(nexttrack != NULL) {      unsigned int timeleft = ECAPLAY_TIMEOUT;      while(timeleft > 0) {	timeleft = sleep(timeleft);	if (timeleft > 0 && ecaplay_skip_flag > 1) {	  fprintf(stderr, "\n(ecaplay) Interrupted, exiting...\n");	  eci_cleanup_r(eci);	  stop = 1;	  break;	}      }      /* see above while() loop */      if (stop) break;      if (ecaplay_skip_flag == 0) {	eci_command_r(eci, "engine-status");      }      else {	printf("(ecaplay) Skipping...\n");      }      if (ecaplay_skip_flag != 0 || strcmp(eci_last_string_r(eci), "running") != 0) {	ecaplay_skip_flag = 0;	/* FIXME: segment A1 to separate function (5 lines): */	nexttrack = get_track(++tracknum, argc, argv);	if (nexttrack != NULL) {	  eci_cleanup_r(eci);	  initialize_chainsetup_for_playback(&eci, nexttrack);	}	/* /A1 */	else {	  /* no more files to play */	  if (ecaplay_mode == ECAPLAY_MODE_PL_PLAY) {	    /* if in playlist mode, loop from beginning */	    tracknum = 1;	    /* FIXME: segment A1 to separate function (5 lines): */	    nexttrack = get_track(tracknum, argc, argv);	    /* printf("(ecaplay) Looping back to start of playlist...(%s)\n", nexttrack); */	    if (nexttrack != NULL) {	      eci_cleanup_r(eci);	      initialize_chainsetup_for_playback(&eci, nexttrack);	    }	    /* /A1 */	  }	  else {	    /* printf("(ecaplay) No more files...\n"); */	    /* end processing */	    break;	  }	}      }    }      fprintf(stderr, "exiting...\n");    /* see while() loop above */    if (stop == 0) {      eci_cleanup_r(eci);    }  }  return 0;}