Ejemplo n.º 1
0
/* /PRI and /PRIO command line options */
void Command_Line_Create_Primary_Partition()
{
  int maximum_possible_percentage;
  int option_count=1;

  long maximum_partition_size_in_MB;

  Partition_Table *pDrive = &part_table[flags.drive_number-0x80];

  if(arg[0].value<=0)
    {
    printf("\n");
    printf(catgets(cat,2,6,"Invalid partition size specifed"));
    printf("\n");
    printf(catgets(cat,2,2,"Program Terminated"));
    printf("\n");
    exit(9);
    }

  Determine_Free_Space();

  maximum_partition_size_in_MB = Max_Pri_Part_Size_In_MB(PRIMARY);

  maximum_possible_percentage
   = Convert_To_Percentage(maximum_partition_size_in_MB
   ,pDrive->total_hard_disk_size_in_MB);


  if(arg[0].extra_value==100)
    {
    /* Set limit on percentage. */
    if(arg[0].value > 100) arg[0].value = 100;
    if(arg[0].value > maximum_possible_percentage)
     arg[0].value = maximum_possible_percentage;

    /* Determine partition size. */
    arg[0].value
     = (arg[0].value * maximum_partition_size_in_MB)
     / maximum_possible_percentage;
    }

  if(0!=strcmp(arg[1].choice,"SPEC"))
    {
    /* If no special partition type is defined. */

    Set_Active_Partition_If_None_Is_Active(
     	Create_Primary_Partition(
     	Partition_Type_To_Create(arg[0].value,0),arg[0].value));
    }
  else
    {
    /* If a special partition type is defined. */
    option_count=2;

    Create_Primary_Partition((int)arg[1].value,arg[0].value);
    }


  Shift_Command_Line_Options(option_count);
}
Ejemplo n.º 2
0
/* /EXT command line options */
void Command_Line_Create_Extended_Partition()
{ 
  int maximum_possible_percentage;

  long maximum_partition_size_in_MB;

  Partition_Table *pDrive = &part_table[flags.drive_number-0x80];

  if(arg[0].value<=0)
    {
    printf("\n");
    printf(catgets(cat,2,6,"Invalid partition size specifed"));
    printf("\n");
    printf(catgets(cat,2,2,"Program Terminated"));
    printf("\n");
    exit(9);
    }

  Determine_Free_Space();

  maximum_partition_size_in_MB = Max_Pri_Part_Size_In_MB(EXTENDED);

  maximum_possible_percentage
   = Convert_To_Percentage(maximum_partition_size_in_MB
   ,pDrive->total_hard_disk_size_in_MB);

//   ,pDrive->ext_part_size_in_MB);

  if(arg[0].extra_value==100)
    {
    /* Set limit on percentage. */
    if(arg[0].value > 100) arg[0].value = 100;
    if(arg[0].value > maximum_possible_percentage)
     arg[0].value = maximum_possible_percentage;

    /* Determine partition size. */
    arg[0].value
     = (arg[0].value * maximum_partition_size_in_MB)
     / maximum_possible_percentage;

/*
    arg[0].value = Convert_Percent_To_MB(arg[0].value
     ,(pDrive->total_cyl+1) );
*/
    }

  Create_Primary_Partition(5,arg[0].value);

  Shift_Command_Line_Options(1);
}
Ejemplo n.º 3
0
/* /LOG and /LOGO command line options */
void Command_Line_Create_Logical_DOS_Drive()
{
  int maximum_possible_percentage;
  int option_count=1;

//  long ext_part_size;
  long maximum_partition_size_in_MB;

  Partition_Table *pDrive = &part_table[flags.drive_number-0x80];

  if(arg[0].value<=0)
    {
    printf("\n");
    printf(catgets(cat,2,6,"Invalid partition size specifed"));
    printf("\n");
    printf(catgets(cat,2,2,"Program Terminated"));
    printf("\n");
    exit(9);
    }

  Determine_Free_Space();

  maximum_partition_size_in_MB = Max_Log_Part_Size_In_MB();

  maximum_possible_percentage
   = Convert_To_Percentage(maximum_partition_size_in_MB
   ,pDrive->ext_part_size_in_MB);

  if(arg[0].extra_value==100)
    {
    /* Set limit on percentage. */
    if(arg[0].value > 100) arg[0].value = 100;
    if(arg[0].value > maximum_possible_percentage)
     arg[0].value = maximum_possible_percentage;

    /* Determine partition size. */
    arg[0].value
     = (arg[0].value * maximum_partition_size_in_MB)
     / maximum_possible_percentage;



    /* Compute the partition size as a percentage. */

//    arg[0].value = Convert_Percent_To_MB(arg[0].value,ext_part_size);
    }

  if(0!=strcmp(arg[1].choice,"SPEC"))
    {
    /* If no special partition type is defined. */

    Create_Logical_Drive(
     Partition_Type_To_Create(arg[0].value,0),arg[0].value);
    }
  else
    {
    /* If a special partition type is defined. */
    option_count=2;

    Create_Logical_Drive((int)arg[1].value,arg[0].value);
    }

  Shift_Command_Line_Options(option_count);
}
Ejemplo n.º 4
0
/* Display Extended Partition Information Sub Screen */
void Display_Extended_Partition_Information_SS()
{
  int column_index=0;
  int index;
  int print_index=4;

  unsigned long usage;
  Partition_Table *pDrive = &part_table[flags.drive_number-0x80];

  Determine_Drive_Letters();

  /* Check to see if there are any drives to display */
  if( (brief_partition_table[(flags.drive_number-128)] [4]>0) || (brief_partition_table[(flags.drive_number-128)] [5]>0) )
    {
    printAt(0,3,"Drv Volume Label  Mbytes  System  Usage");

    /* Display information for each Logical DOS Drive */
    index=4;
    print_index=4;
    do
      {
      if(print_index>15)
	{
	column_index=41;
	print_index=4;

	printAt(41,3,"Drv Volume Label  Mbytes  System  Usage");
	}

      if(brief_partition_table[(flags.drive_number-128)] [index]>0)
	{
	if( IsRecognizedFatPartition(brief_partition_table[(flags.drive_number-128)] [index]))
	  {
	  /* Display drive letter */
	  cprintAt(column_index+0,print_index,"%c",drive_lettering_buffer[(flags.drive_number-128)] [index]);
	  cprintAt(column_index+1,print_index,":");

	  /* Display volume label */
	  printAt(column_index+4,print_index,"%11s",pDrive->log_drive[index-4].vol_label);
	  }
	else
	  {
	  if(flags.del_non_dos_log_drives==TRUE)
	    {
	    /* Display drive number */
	    cprintAt(column_index+0,print_index,"%c",drive_lettering_buffer[(flags.drive_number-128)] [index]);
	    }
	  }

	/* Display size in MB */
	Position_Cursor((column_index+17),print_index);
	Print_UL(pDrive->log_drive[(index-4)].size_in_MB);

	/* Display file system type */
	printAt(column_index+25,print_index,"%s",
	 partition_lookup_table_buffer_short[pDrive->log_drive[(index-4)].num_type]);

	/* Display usage in % */
	usage
	 = Convert_To_Percentage(pDrive->log_drive[index-4].num_sect,
	 pDrive->ext_part_num_sect);

	printAt(column_index+35,print_index,"%3d%%",usage);
	print_index++;
	}
      index++;
      }while(index<27);
    }
  else
    {
    cprintAt(4,10,"No logical drives defined");
    }

  printAt(4,17,"Total Extended DOS Partition size is ");

  if( (flags.version==W95) || (flags.version==W95B) || (flags.version==W98) )
   Print_UL_B(part_table[flags.drive_number-128].ext_part_size_in_MB);
  else cprintf("%4d",(part_table[flags.drive_number-128].ext_part_size_in_MB) );
  printf(" Mbytes (1 Mbyte = 1048576 bytes)");
}
Ejemplo n.º 5
0
void Display_CL_Partition_Table()
{
  int index=0;

  unsigned long usage=0;
  Partition_Table *pDrive = &part_table[flags.drive_number-0x80];

  Determine_Drive_Letters();

  printf("\n\nCurrent fixed disk drive: %1d",(flags.drive_number-127));
  if(flags.extended_options_flag==TRUE)
    {
    printf("                  (TC: %4d",pDrive->total_cyl);
    printf(" TH: %3d",pDrive->total_head);
    printf(" TS: %3d)",pDrive->total_sect);
    }

  printf("\n\nPartition   Status   Mbytes   Description     Usage  ");
  if(flags.extended_options_flag==TRUE) printf("Start Cyl  End Cyl");
  printf("\n");

  index=0;
  do
    {
    if(pDrive->pri_part[index].num_type>0)
      {
      /* Drive Letter of Partition */
      if( IsRecognizedFatPartition(pDrive->pri_part[index].num_type))
        {
        printf(" %1c:",drive_lettering_buffer[(flags.drive_number-128)] [index]);
        }
      else printf("   ");

      /* Partition Number */
      printf(" %1d",(index+1));

      if(flags.extended_options_flag==TRUE)
        {
        /* Partition Type */
        printf(" %3d",(pDrive->pri_part[index].num_type));
        }
      else printf("    ");

      /* Status */
      if(pDrive->pri_part[index].active_status>0)
        {
        printf("      A");
	}
      else printf("       ");

      /* Mbytes */
      printf("    ");
      Print_UL(pDrive->pri_part[index].size_in_MB);

      /* Description */
      printf("   %15s",partition_lookup_table_buffer_long[pDrive->pri_part[index].num_type]);

      /* Usage */
      usage
       = Convert_To_Percentage(pDrive->pri_part[index].size_in_MB,
	pDrive->total_hard_disk_size_in_MB);

      printf("   %3d%%",usage);

      if(flags.extended_options_flag==TRUE)
        {
        /* Starting Cylinder */
        printf("    %4d",pDrive->pri_part[index].start_cyl);

        /* Ending Cylinder */
        printf("      %4d",pDrive->pri_part[index].end_cyl);
        }
      printf("\n");
      }

    index++;
    }while(index<4);

  /* Check to see if there are any drives to display */
  if( (brief_partition_table[(flags.drive_number-128)] [4]>0)
   || (brief_partition_table[(flags.drive_number-128)] [5]>0) )
    {
    printf("\nContents of Extended DOS Partition:\n");
    printf("Drv Volume Label  Mbytes  System  Usage\n");

    /* Display information for each Logical DOS Drive */
    index=4;
    do
      {
      if (brief_partition_table[(flags.drive_number-128)] [index] > 0)
	{
	if (IsRecognizedFatPartition(brief_partition_table[(flags.drive_number-128)] [index]))
	  {
	  /* Display drive letter */
	  printf(" %1c:",drive_lettering_buffer[(flags.drive_number-128)] [index]);

	  /* Display volume label */
	  printf(" %11s",pDrive->log_drive[index-4].vol_label);
	  }
	else printf("               ");

	/* Display size in MB */
	printf("  ");
	Print_UL(pDrive->log_drive[(index-4)].size_in_MB);

	/* Display file system type */
	printf("  %-8s",partition_lookup_table_buffer_short[pDrive->log_drive[(index-4)].num_type]);

	/* Display usage in % */
	usage
	 = Convert_To_Percentage(pDrive->log_drive[index-4].num_sect,
	 pDrive->ext_part_num_sect);

	printf("  %3d%%",usage);

	printf("\n");
	}

      index++;
      }while(index<27);
    }
}
Ejemplo n.º 6
0
/* Display information for all hard drives */
void Display_All_Drives()
{
  int current_column_offset_of_general_drive_information;
  int current_column_offset=4;
  int current_line=3;
  int current_line_of_general_drive_information;
  int drive=1;
  int drive_letter_index=0;
  int index;

  long space_used_on_drive_in_MB;

  unsigned long usage;

  Determine_Drive_Letters();

  printAt(2,2,"Disk   Drv   Mbytes   Free   Usage");

  do
    {
    if(current_line>18)
      {
      current_line=3;
      current_column_offset=45;

      printAt(43,2,"Disk   Drv   Mbytes   Free   Usage");
      }

    /* Print physical drive information */
    current_column_offset_of_general_drive_information=current_column_offset;
    current_line_of_general_drive_information=current_line;
    space_used_on_drive_in_MB=0;

    /* Print drive number */
    Position_Cursor(current_column_offset_of_general_drive_information,current_line);
    cprintf("%d",drive);

    /* Print size of drive */
    Position_Cursor((current_column_offset_of_general_drive_information+10),current_line);
    Print_UL(part_table[drive-1].total_hard_disk_size_in_MB);

    /* Get space_used_on_drive_in_MB */
    index=0;
    do
      {
      if( (part_table[drive-1].pri_part[index].num_type!=5)
       && (part_table[drive-1].pri_part[index].num_type!=15)
       && (part_table[drive-1].pri_part[index].num_type!=0) )
       space_used_on_drive_in_MB
	+= part_table[drive-1].pri_part[index].size_in_MB;

      index++;
      }while(index<=3);

    index=0;
    do
      {
      if(part_table[drive-1].log_drive[index].num_type>0)
       space_used_on_drive_in_MB
	+= part_table[drive-1].log_drive[index].size_in_MB;

      index++;
      }while(index<=22);

    /* Print logical drives on disk, if applicable */

    drive_letter_index=0;
    do
      {
      if(drive_lettering_buffer[drive-1] [drive_letter_index]>0)
        {
        current_line++;

        if(current_line>18)
          {
          current_line=3;
          current_column_offset=45;

          printAt(43,2,"Disk   Drv   Mbytes   Free   Usage");
          }

        /* Print drive letter of logical drive */
        if( ( (drive_lettering_buffer[drive-1] [drive_letter_index]>='C')
         && (drive_lettering_buffer[drive-1] [drive_letter_index]<='Z') )
         || (flags.del_non_dos_log_drives==TRUE) )
          {
	  Position_Cursor((current_column_offset+6),current_line);
          printf("%c:",drive_lettering_buffer[drive-1] [drive_letter_index]);
          }
        else
          {
          Position_Cursor((current_column_offset+8),current_line);
          }

        /* Print size of logical drive */
        Position_Cursor((current_column_offset+10),current_line);

	if(drive_letter_index<4)
	  {
	  Print_UL(part_table[drive-1].pri_part[drive_letter_index].size_in_MB);
	  }
	else
	  {

	  Print_UL(part_table[drive-1].log_drive[(drive_letter_index-4)].size_in_MB);
	  }
	}

      drive_letter_index++;
      }while(drive_letter_index<27);

    /* Print amount of free space on drive */
    if(part_table[drive-1].total_hard_disk_size_in_MB>space_used_on_drive_in_MB)
      {
      Position_Cursor((current_column_offset_of_general_drive_information+18),current_line_of_general_drive_information);
      Print_UL(part_table[drive-1].total_hard_disk_size_in_MB-space_used_on_drive_in_MB);
      }

    /* Print drive usage percentage */
    if(space_used_on_drive_in_MB==0) usage=0;
    else
      {
      usage
       = Convert_To_Percentage(space_used_on_drive_in_MB,
       part_table[drive-1].total_hard_disk_size_in_MB);
      }

    Position_Cursor((current_column_offset_of_general_drive_information+28),current_line_of_general_drive_information);
    printf("%3d%%",usage);

    current_line++;
    drive++;
    }while(drive<=(flags.maximum_drive_number-127));

  printAt(4,20,"(1 Mbyte = 1048576 bytes)");
}
Ejemplo n.º 7
0
/* Returns a 0 if successful and a 1 if unsuccessful */
int Create_Logical_Drive_Interface()
{
  long input=0;

  int drive_created=FALSE;
  int maximum_possible_percentage;
  int numeric_type;

  long maximum_partition_size_in_MB;

  Partition_Table *pDrive = &part_table[flags.drive_number-0x80];

  Determine_Free_Space();

  if(pDrive->ext_part_largest_free_space>=2)
    {
    do
      {
      if(flags.fprmt==TRUE) flags.fat32=TRUE;

      maximum_partition_size_in_MB
       = Max_Log_Part_Size_In_MB();

      Clear_Screen(0);

      if(drive_created==TRUE)
	{
	cprintAt(4,22,"Logical DOS Drive created, drive letters changed or added");
	}

      Print_Centered(1,"Create Logical DOS Drive in the Extended DOS Partition",BOLD);

      Display_Extended_Partition_Information_SS();

      if('Z'==Determine_Drive_Letters())
	{
	printAt(4,22,"                                                           ");
	cprintAt(4,22,"Maximum number of Logical DOS Drives installed.");
	Input(0,0,0,ESC,0,0,ESCC,0,0,NULL,NULL);
	if(flags.fprmt==TRUE) flags.fat32=FALSE;
	return(1);
	}

      printAt(4,17,"Total Extended DOS Partition size is ");

      if( (flags.version==4) || (flags.version==5) || (flags.version==6) )
	cprintf("%4d",pDrive->ext_part_size_in_MB);
      else Print_UL_B(pDrive->ext_part_size_in_MB);

      printf(" Mbytes (1 Mbyte = 1048576 bytes)");

      printAt(4,18,"Maximum space available for partition is ");

      if( (flags.version==4) || (flags.version==5) || (flags.version==6) )
        cprintf("%4d",maximum_partition_size_in_MB);
      else Print_UL_B(maximum_partition_size_in_MB);

      printf(" Mbytes ");

      maximum_possible_percentage
       = Convert_To_Percentage(maximum_partition_size_in_MB
       ,pDrive->ext_part_size_in_MB);

      cprintf("(%3d%%)",maximum_possible_percentage);

      printAt(4,20,"Enter logical drive size in Mbytes or percent of disk space (%)...");

      flags.esc=FALSE;

      if( (flags.version==4) || (flags.version==5) || (flags.version==6) )
       input=Input(4,70,20,NUMP,1,maximum_partition_size_in_MB,ESCR
       ,maximum_partition_size_in_MB,maximum_possible_percentage,NULL,NULL);
      else input=Input(6,70,20,NUMP,1,maximum_partition_size_in_MB,ESCR
       ,maximum_partition_size_in_MB,maximum_possible_percentage,NULL,NULL);

      if(flags.esc==TRUE)
        {
        if(flags.fprmt==TRUE) flags.fat32=FALSE;
        return(1);
        }

      if( (flags.fprmt==TRUE) && (input>=128) && (input<=2048) )
        {
        printAt(4,21,"This drive is a FAT32 by default, switch to FAT16 (Y/N)?    ");
        flags.fat32=!Input(1,61,21,YN,0,0,NONE,1,0,NULL,NULL);
        }

      numeric_type=6;
      numeric_type=Partition_Type_To_Create(input,numeric_type);

      Create_Logical_Drive(numeric_type,input);
      drive_created=TRUE;

      }while(pDrive->ext_part_largest_free_space>=2);
    }

  Clear_Screen(0);
  Print_Centered(1,"Create Logical DOS Drive in the Extended DOS Partition",BOLD);
  Display_Extended_Partition_Information_SS();
  cprintAt(4,22,"All available space in the Extended DOS Partition");
  cprintAt(4,23,"is assigned to logical drives.");
  Input(0,0,0,ESC,0,0,ESCC,0,0,NULL,NULL);

  if(flags.fprmt==TRUE) flags.fat32=FALSE;

  return(0);
}
Ejemplo n.º 8
0
/* Create DOS Partition Interface */
int Create_DOS_Partition_Interface(int type)
{
  int numeric_type;
  int partition_created=FALSE;
  int partition_slot_just_used;

  long maximum_partition_size_in_MB;
  long maximum_possible_percentage;

  unsigned long input=0;
  Partition_Table *pDrive = &part_table[flags.drive_number-0x80];

  maximum_partition_size_in_MB
   = Max_Pri_Part_Size_In_MB(type);

  if(type==PRIMARY)
    {
    Clear_Screen(0);

    Print_Centered(4,"Create Primary DOS Partition",BOLD);

    printAt(4,6,"Current fixed disk drive: ");
    cprintf("%d",(flags.drive_number-127));

    printAt(4,8,"Do you wish to use the maximum available size for a Primary DOS Partition");

    if((flags.drive_number-128)==0)
      {
      printAt(4,9,"and make the partition active (Y/N).....................? ");
      }
    else
      {
      printAt(4,9,"(Y/N)...................................................? ");
      }

    flags.esc=FALSE;
    input=Input(1,62,9,YN,0,0,ESCR,1,0,NULL,NULL);
    if(flags.esc==TRUE) return(1);

    if(input==1)
      {
      input=maximum_partition_size_in_MB;
      numeric_type=6;  /* Set the numeric type to 6 so that it will be    */
                       /* decided by Partition_Type_To_Create().          */

      if( (flags.fprmt==TRUE) && (type==PRIMARY) && (input>=128) && (input<=2048) )
        {
        printAt(4,22,"This drive is a FAT32 by default, switch to FAT16 (Y/N)?    ");
	flags.fat32=!Input(1,61,22,YN,0,0,NONE,1,0,NULL,NULL);
        }

      /* Use the maximum available free space to create a DOS Partition */

      /* Adjust numeric type depending upon partition size and the FDISK */
      /* version emulated.                                               */
      numeric_type=Partition_Type_To_Create(input,numeric_type);

      partition_slot_just_used=Create_Primary_Partition(numeric_type,input);
      if((flags.drive_number-128)==0) Set_Active_Partition(partition_slot_just_used);
      partition_created=TRUE;
      }
    }

  if(partition_created==FALSE)
    {
    Clear_Screen(0);

    if(type==PRIMARY) Print_Centered(4,"Create Primary DOS Partition",BOLD);
    else              Print_Centered(4,"Create Extended DOS Partition",BOLD);

    printAt(4,6,"Current fixed disk drive: ");
    cprintf("%d",(flags.drive_number-127));

    Display_Primary_Partition_Information_SS();

    printAt(4,15,"Maximum space available for partition is ");

    if( (flags.version==W95) || (flags.version==W95B) || (flags.version==W98) )
      Print_UL_B(maximum_partition_size_in_MB);
    else cprintf("%4d",maximum_partition_size_in_MB);

    printf(" Mbytes ");

    maximum_possible_percentage
     = Convert_To_Percentage(maximum_partition_size_in_MB
      ,pDrive->total_hard_disk_size_in_MB);

    cprintf("(%3d%%)",maximum_possible_percentage);

    printAt(4,18,"Enter partition size in Mbytes or percent of disk space (%) to");

    if(type==PRIMARY) printAt(4,19,"create a Primary DOS Partition.................................: ");
    else              printAt(4,19,"create an Extended DOS Partition...............................: ");

    flags.esc=FALSE;

    if( (flags.version==4) || (flags.version==5) || (flags.version==6) )
     input=Input(4,69,19,NUMP,1,maximum_partition_size_in_MB,ESCR
     ,maximum_partition_size_in_MB,maximum_possible_percentage,NULL,NULL);
    else input=Input(6,69,19,NUMP,1,maximum_partition_size_in_MB,ESCR
     ,maximum_partition_size_in_MB,maximum_possible_percentage,NULL,NULL);

    if(flags.esc==TRUE) return(1);

    if( (flags.fprmt==TRUE) && (type==PRIMARY) && (input>=128) && (input<=2048) )
      {
      printAt(4,22,"This drive is a FAT32 by default, switch to FAT16 (Y/N)?    ");
      flags.fat32=!Input(1,61,22,YN,0,0,NONE,1,0,NULL,NULL);
      }

    if(type==PRIMARY) numeric_type=Partition_Type_To_Create(input,0);
    else numeric_type=5;

    Create_Primary_Partition(numeric_type,input);
    }

  if(flags.fprmt==TRUE) flags.fat32=FALSE;

  Clear_Screen(0);

  if(type==PRIMARY) Print_Centered(4,"Create Primary DOS Partition",BOLD);
  else              Print_Centered(4,"Create Extended DOS Partition",BOLD);

  printAt(4,6,"Current fixed disk drive: ");
  cprintf("%d",(flags.drive_number-127));

  Display_Primary_Partition_Information_SS();

  Position_Cursor(4,21);
  if(type==PRIMARY) cprintf("Primary DOS Partition created");
  else              cprintf("Extended DOS Partition created");

  Input(0,0,0,ESC,0,0,ESCC,0,0,NULL,NULL);

  if(type==EXTENDED) Create_Logical_Drive_Interface();

  return(0);
}
Ejemplo n.º 9
0
/* Display Primary Partition information Sub-screen */
void Display_Primary_Partition_Information_SS()
{
  int cursor_offset=0;
  int index=0;
  char *type;

  unsigned long usage=0;
  Partition_Table *pDrive = &part_table[flags.drive_number-0x80];

  Determine_Drive_Letters();

  printAt(4,6,"Current fixed disk drive: ");
  cprintf("%d",(flags.drive_number-127));

  if( (pDrive->pri_part[0].num_type>0) ||
      (pDrive->pri_part[1].num_type>0) ||
      (pDrive->pri_part[2].num_type>0) ||
      (pDrive->pri_part[3].num_type>0) )
    {
    if(flags.extended_options_flag==FALSE)
      {
      printAt(4,8,"Partition  Status   Type    Volume Label  Mbytes   System   Usage");

      for (index=0; index < 4; index++)
        {
        if(pDrive->pri_part[index].num_type>0)
          {
          /* Drive Letter of Partition */

          if( IsRecognizedFatPartition(pDrive->pri_part[index].num_type) )
            {
            printAt(5,(cursor_offset+9),"%c:",drive_lettering_buffer[(flags.drive_number-128)] [index]);
            }

          /* Partition Number */
          cprintAt(8,(cursor_offset+9),"%d",(index+1));

          /* Status */
          if(pDrive->pri_part[index].active_status>0)
            {
            printAt(18,(cursor_offset+9),"A");
            }

          /* Type */
          type  = "Non-DOS";
          if( IsRecognizedFatPartition(pDrive->pri_part[index].num_type) )
            {
            type = "PRI DOS";
            }
          else if(pDrive->pri_part[index].num_type==5)
            {
            type = "EXT DOS";
            }
          else if( (pDrive->pri_part[index].num_type==0x0f) && 
          			( flags.version==W95 || flags.version==W95B || flags.version==W98 ) )
            {
            type = "EXT DOS";
            }
          printAt(23,(cursor_offset+9),type);


          /* Volume Label */
          printAt(33,(cursor_offset+9),"%11s",pDrive->pri_part[index].vol_label);

          /* Mbytes */
          Position_Cursor(45,(cursor_offset+9));
          Print_UL(pDrive->pri_part[index].size_in_MB);

          /* System */
          printAt(54,(cursor_offset+9),"%s",partition_lookup_table_buffer_short[pDrive->pri_part[index].num_type]);

          /* Usage */
	  usage
	   = Convert_To_Percentage(pDrive->pri_part[index].size_in_MB,
	   pDrive->total_hard_disk_size_in_MB);

          printAt(65,(cursor_offset+9),"%3d%%",usage);

          cursor_offset++;
          }
        } /* while(index<4);*/
      }
    else
      {
      printAt(4,8,"Partition   Status   Mbytes    Description    Usage  Start Cyl  End Cyl");

	  for (index=0; index < 4; index++)
        {
        if(pDrive->pri_part[index].num_type>0)
          {
          /* Drive Letter of Partition */
          if (IsRecognizedFatPartition (pDrive->pri_part[index].num_type))
            {
            printAt(5,(cursor_offset+9),"%c:",drive_lettering_buffer[flags.drive_number-128] [index]);
            }
          
          /* Partition Number */
          cprintAt(8,(cursor_offset+9),"%d",index+1);

          /* Partition Type */
          printAt(10,(cursor_offset+9),"%3d",pDrive->pri_part[index].num_type);

          /* Status */
          if(pDrive->pri_part[index].active_status>0)
            {
            printAt(19,(cursor_offset+9),"A");
            }

          /* Mbytes */
          Position_Cursor(24,(cursor_offset+9));
          Print_UL(pDrive->pri_part[index].size_in_MB);

          /* Description */
          printAt(33,(cursor_offset+9),"%15s",partition_lookup_table_buffer_long[pDrive->pri_part[index].num_type]);

          /* Usage */
	  usage
	   = Convert_To_Percentage(pDrive->pri_part[index].size_in_MB,
	   pDrive->total_hard_disk_size_in_MB);

          printAt(51,(cursor_offset+9),"%3d%%",usage);

          /* Starting Cylinder */
          printAt(59,(cursor_offset+9),"%4d",pDrive->pri_part[index].start_cyl);

          /* Ending Cylinder */
          printAt(69,(cursor_offset+9),"%4d",pDrive->pri_part[index].end_cyl);

          cursor_offset++;
          }

        } /*while(index<4);*/
      }
    }
  else
    {
    cprintAt(4,21,"No partitions defined");
    }

  printAt(4,14,"Total disk space is ");

  if( (flags.version==W95) || (flags.version==W95B) || (flags.version==W98) )
    Print_UL_B(pDrive->total_hard_disk_size_in_MB);
  else cprintf("%4d",pDrive->total_hard_disk_size_in_MB);

  printf(" Mbytes (1 Mbyte = 1048576 bytes)");
}