Subversion Repositories SvarDOS

Rev

Rev 555 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 555 Rev 556
Line 505... Line 505...
505
    /* if not formatted, propose to format it right away (try to create a directory) */
505
    /* if not formatted, propose to format it right away (try to create a directory) */
506
    snprintf(buff, sizeof(buff), "%c:\\SVWRTEST.123", cselecteddrive);
506
    snprintf(buff, sizeof(buff), "%c:\\SVWRTEST.123", cselecteddrive);
507
    if (mkdir(buff) == 0) {
507
    if (mkdir(buff) == 0) {
508
      rmdir(buff);
508
      rmdir(buff);
509
    } else {
509
    } else {
510
      char *list[] = { "Proceed with formatting", "Quit to DOS", NULL};
510
      char *list[3];
511
      newscreen(0);
511
      newscreen(0);
512
      list[0] = kittengets(0, 6, list[0]);
-
 
513
      list[1] = kittengets(0, 2, list[1]);
-
 
514
      snprintf(buff, sizeof(buff), kittengets(3, 3, "ERROR: Drive %c: seems to be unformated. Do you wish to format it?"), cselecteddrive);
512
      snprintf(buff, sizeof(buff), kittengets(3, 3, "ERROR: Drive %c: seems to be unformated. Do you wish to format it?"), cselecteddrive);
515
      video_putstring(7, 1, COLOR_BODY[mono], buff, -1);
513
      video_putstring(7, 1, COLOR_BODY[mono], buff, -1);
-
 
514
 
-
 
515
      snprintf(buff, sizeof(buff), kittengets(0, 7, "Format drive %c:"), cselecteddrive);
-
 
516
      list[0] = buff;
-
 
517
      list[1] = kittengets(0, 2, "Quit to DOS");
-
 
518
      list[2] = NULL;
-
 
519
 
516
      choice = menuselect(12, -1, 4, list, -1);
520
      choice = menuselect(12, -1, 4, list, -1);
517
      if (choice < 0) return(MENUPREV);
521
      if (choice < 0) return(MENUPREV);
518
      if (choice == 1) return(MENUQUIT);
522
      if (choice == 1) return(MENUQUIT);
519
      video_clear(0x0700, 0, 0);
523
      video_clear(0x0700, 0, 0);
520
      video_movecursor(0, 0);
524
      video_movecursor(0, 0);
Line 534... Line 538...
534
      return(MENUQUIT);
538
      return(MENUQUIT);
535
    }
539
    }
536
    /* is the disk empty? */
540
    /* is the disk empty? */
537
    newscreen(0);
541
    newscreen(0);
538
    if (diskempty(selecteddrive) != 0) {
542
    if (diskempty(selecteddrive) != 0) {
539
      char *list[] = { "Proceed with formatting", "Quit to DOS", NULL};
543
      char *list[3];
540
      int y = 6;
544
      int y = 6;
541
      list[0] = kittengets(0, 6, list[0]);
-
 
542
      list[1] = kittengets(0, 2, list[1]);
-
 
543
      snprintf(buff, sizeof(buff), kittengets(3, 5, "ERROR: Drive %c: is not empty. SvarDOS must be installed on an empty disk.\n\nYou can format the disk now, to make it empty. Note however, that this will ERASE ALL CURRENT DATA on your disk."), cselecteddrive);
545
      snprintf(buff, sizeof(buff), kittengets(3, 5, "ERROR: Drive %c: is not empty. SvarDOS must be installed on an empty disk.\n\nYou can format the disk now, to make it empty. Note however, that this will ERASE ALL CURRENT DATA on your disk."), cselecteddrive);
544
      y += putstringwrap(y, 1, COLOR_BODY[mono], buff);
546
      y += putstringwrap(y, 1, COLOR_BODY[mono], buff);
-
 
547
 
-
 
548
      snprintf(buff, sizeof(buff), kittengets(0, 7, "Format drive %c:"), cselecteddrive);
-
 
549
      list[0] = buff;
-
 
550
      list[1] = kittengets(0, 2, "Quit to DOS");
-
 
551
      list[2] = NULL;
-
 
552
 
545
      choice = menuselect(++y, -1, 4, list, -1);
553
      choice = menuselect(++y, -1, 4, list, -1);
546
      if (choice < 0) return(MENUPREV);
554
      if (choice < 0) return(MENUPREV);
547
      if (choice == 1) return(MENUQUIT);
555
      if (choice == 1) return(MENUQUIT);
548
      video_clear(0x0700, 0, 0);
556
      video_clear(0x0700, 0, 0);
549
      video_movecursor(0, 0);
557
      video_movecursor(0, 0);