Subversion Repositories SvarDOS

Rev

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

Rev 79 Rev 81
Line 163... Line 163...
163
    }*/
163
    }*/
164
  }
164
  }
165
}
165
}
166
 
166
 
167
static void newscreen(int statusbartype) {
167
static void newscreen(int statusbartype) {
168
  int x;
-
 
169
  char *msg;
168
  char *msg;
170
  msg = kittengets(0, 0, "SVAROG386 INSTALLATION");
169
  msg = kittengets(0, 0, "SVAROG386 INSTALLATION");
171
  for (x = 0; x < 80; x++) video_putchar(0, x, COLOR_TITLEBAR[mono], ' ');
170
  video_putcharmulti(0, 0, COLOR_TITLEBAR[mono], ' ', 80, 1);
172
  video_putstring(0, 40 - (strlen(msg) >> 1), COLOR_TITLEBAR[mono], msg, -1);
171
  video_putstring(0, 40 - (strlen(msg) >> 1), COLOR_TITLEBAR[mono], msg, -1);
173
  video_clear(COLOR_BODY[mono], 80);
172
  video_clear(COLOR_BODY[mono], 80, -80);
174
  switch (statusbartype) {
173
  switch (statusbartype) {
175
    case 1:
174
    case 1:
176
      msg = kittengets(0, 11, "Up/Down = Select entry | Enter = Validate your choice | ESC = Quit to DOS");
175
      msg = kittengets(0, 11, "Up/Down = Select entry | Enter = Validate your choice | ESC = Quit to DOS");
177
      break;
176
      break;
178
    case 2:
177
    case 2:
Line 365... Line 364...
365
      switch (menuselect(14, -1, 5, list, -1)) {
364
      switch (menuselect(14, -1, 5, list, -1)) {
366
        case 0:
365
        case 0:
367
          system("FDISK /AUTO");
366
          system("FDISK /AUTO");
368
          break;
367
          break;
369
        case 1:
368
        case 1:
370
          video_clear(0x0700, 0);
369
          video_clear(0x0700, 0, 0);
371
          video_movecursor(0, 0);
370
          video_movecursor(0, 0);
372
          system("FDISK");
371
          system("FDISK");
373
          break;
372
          break;
374
        case 2:
373
        case 2:
375
          return(MENUQUIT);
374
          return(MENUQUIT);
Line 401... Line 400...
401
      snprintf(buff, sizeof(buff), kittengets(3, 3, "ERROR: Drive %c: seems to be unformated. Do you wish to format it?"), cselecteddrive);
400
      snprintf(buff, sizeof(buff), kittengets(3, 3, "ERROR: Drive %c: seems to be unformated. Do you wish to format it?"), cselecteddrive);
402
      video_putstring(7, 1, COLOR_BODY[mono], buff, -1);
401
      video_putstring(7, 1, COLOR_BODY[mono], buff, -1);
403
      choice = menuselect(12, -1, 4, list, -1);
402
      choice = menuselect(12, -1, 4, list, -1);
404
      if (choice < 0) return(MENUPREV);
403
      if (choice < 0) return(MENUPREV);
405
      if (choice == 1) return(MENUQUIT);
404
      if (choice == 1) return(MENUQUIT);
406
      video_clear(0x0700, 0);
405
      video_clear(0x0700, 0, 0);
407
      video_movecursor(0, 0);
406
      video_movecursor(0, 0);
408
      snprintf(buff, sizeof(buff), "FORMAT %c: /Q /U /Z:seriously /V:SVAROG386", cselecteddrive);
407
      snprintf(buff, sizeof(buff), "FORMAT %c: /Q /U /Z:seriously /V:SVAROG386", cselecteddrive);
409
      system(buff);
408
      system(buff);
410
      continue;
409
      continue;
411
    }
410
    }
Line 430... Line 429...
430
      snprintf(buff, sizeof(buff), kittengets(3, 5, "ERROR: Drive %c: is not empty. Svarog386 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);
429
      snprintf(buff, sizeof(buff), kittengets(3, 5, "ERROR: Drive %c: is not empty. Svarog386 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);
431
      y += putstringwrap(y, 1, COLOR_BODY[mono], buff);
430
      y += putstringwrap(y, 1, COLOR_BODY[mono], buff);
432
      choice = menuselect(++y, -1, 4, list, -1);
431
      choice = menuselect(++y, -1, 4, list, -1);
433
      if (choice < 0) return(MENUPREV);
432
      if (choice < 0) return(MENUPREV);
434
      if (choice == 1) return(MENUQUIT);
433
      if (choice == 1) return(MENUQUIT);
435
      video_clear(0x0700, 0);
434
      video_clear(0x0700, 0, 0);
436
      video_movecursor(0, 0);
435
      video_movecursor(0, 0);
437
      snprintf(buff, sizeof(buff), "FORMAT %c: /Q /U /Z:seriously /V:SVAROG386", cselecteddrive);
436
      snprintf(buff, sizeof(buff), "FORMAT %c: /Q /U /Z:seriously /V:SVAROG386", cselecteddrive);
438
      system(buff);
437
      system(buff);
439
      continue;
438
      continue;
440
    } else {
439
    } else {
Line 733... Line 732...
733
  /*netcfg();*/ /* basic networking config */
732
  /*netcfg();*/ /* basic networking config */
734
  finalreboot(); /* remove the CD and reboot */
733
  finalreboot(); /* remove the CD and reboot */
735
 
734
 
736
 Quit:
735
 Quit:
737
  kittenclose(); /* close NLS support */
736
  kittenclose(); /* close NLS support */
738
  video_clear(0x0700, 0);
737
  video_clear(0x0700, 0, 0);
739
  video_movecursor(0, 0);
738
  video_movecursor(0, 0);
740
  return(0);
739
  return(0);
741
}
740
}