@@ -19,16 +19,16 @@ HANDLE g_hConsole;
1919SHORT g_console_width ;
2020WORD g_original_attributes ;
2121char g_search_drive = 'C' ; /** Pre-load with C: drive */
22- //char g_search_string[MAX_PATH];
23- //char g_search_path[MAX_PATH];
22+ /*/ /char g_search_string[MAX_PATH];
23+ //char g_search_path[MAX_PATH];*/
2424
2525/** Console variables: */
2626CONSOLE_SCREEN_BUFFER_INFO
2727 g_screen_info_t ;
2828WIN32_FIND_DATA
2929 g_file_data_t ;
3030INT g_console_height = 24 ;
31- // HANDLE g_search_handle;
31+ /*// HANDLE g_search_handle;*/
3232SHORT g_line_count = 3 ; /** Preload w/ num lines in header */
3333DWORD g_dwAttrib ;
3434
@@ -58,17 +58,17 @@ append_horizontal_line(char string[], unsigned int console_width)
5858{
5959 (void ) string ;
6060 (void ) console_width ;
61- //unsigned int i = 0;
61+ /*/ /unsigned int i = 0;
6262 //SHORT console_width = csbi.srWindow.Right + 1;
63- //const char horizontal_line_character[] = { (char)196, '\0' };
64- //
63+ //const char horizontal_line_character[] = { (char)196, '\0' };*/
64+ /*/ /
6565// sprintf(glyph, "%c", 196);
6666//
6767// for (i=0; i <= console_width; ++i) {
6868// strcat(string, glyph);
6969// }
7070//
71- // strcat(string, "\n");
71+ // strcat(string, "\n");*/
7272 return 0 ;
7373}
7474
@@ -82,29 +82,29 @@ create_horizontal_line(char * result, CONSOLE_SCREEN_BUFFER_INFO csbi)
8282
8383 /** Draw line in result string */
8484 for (i = 0 ; i < console_width ; ++ i ) {
85- //if (i == console_width / 2) {
85+ /* //if (i == console_width / 2) {
8686 // strcat(string, "%c", );
8787 //} else {
88- strncat (result , horizontal_line_character , 2 );
89- //}
88+ */ strncat (result , horizontal_line_character , 2 );
89+ /* //}*/
9090 }
9191
9292 return result ;
9393}
9494
9595
9696char *
97- compact_size_with_suffix (long long size_bytes , char * suffixed_size )
97+ compact_size_with_suffix (double size_bytes , char * suffixed_size )
9898{
9999 if (size_bytes >= 1024LL ) /** KB */
100100 if ((size_bytes /= 1024LL ) >= 1024LL ) /** MB */
101101 if ((size_bytes /= 1024LL ) >= 1024LL ) /** GB */
102102 if ((size_bytes /= 1024LL ) >= 1024LL ) /** TB */
103- sprintf (suffixed_size , "%lld TB" , size_bytes /1024LL );
104- else sprintf (suffixed_size , "%lld GB" , size_bytes );
105- else sprintf (suffixed_size , "%lld MB" , size_bytes );
106- else sprintf (suffixed_size , "%lld KB" , size_bytes );
107- else sprintf (suffixed_size , "%lld B" , size_bytes );
103+ sprintf (suffixed_size , "%lu TB" , ( unsigned long ) ( size_bytes /1024LL ) );
104+ else sprintf (suffixed_size , "%u GB" , ( unsigned ) size_bytes );
105+ else sprintf (suffixed_size , "%u MB" , ( unsigned ) size_bytes );
106+ else sprintf (suffixed_size , "%u KB" , ( unsigned ) size_bytes );
107+ else sprintf (suffixed_size , "%u B" , ( unsigned ) size_bytes );
108108
109109 return suffixed_size ;
110110}
@@ -144,7 +144,7 @@ display_footer()
144144 FG_LIGHT_GREEN (); printf (" \t\t Volume label: " );
145145
146146 g_root_path [0 ] = g_search_drive ;
147- // GetVolumeInformation(g_root_path, g_volume_name, ARRAYSIZE(g_volume_name), &serial_number, &max_component_length, &filesystem_flags, filesystem_name, ARRAYSIZE(filesystem_name));
147+ /*// GetVolumeInformation(g_root_path, g_volume_name, ARRAYSIZE(g_volume_name), &serial_number, &max_component_length, &filesystem_flags, filesystem_name, ARRAYSIZE(filesystem_name));*/
148148 GetVolumeInformation (g_root_path , g_volume_name , ARRAYSIZE (g_volume_name ), NULL , NULL , NULL , NULL , 0 );
149149
150150 FG_LIGHT_RED (); printf ("%s\n" , g_volume_name );
@@ -368,12 +368,12 @@ int process_files(HANDLE search_handle, char * search_path)
368368 return -1 ;
369369
370370 }
371- // else if (search_handle == ERROR_FILE_NOT_FOUND) {
371+ /*/ / else if (search_handle == ERROR_FILE_NOT_FOUND) {
372372// puts("\nNo file or folder found.");
373373//
374374// restore_console();
375375// return -1;
376- // }
376+ // }*/
377377
378378 do {
379379 /** File is directory ? */
@@ -492,8 +492,8 @@ int process_files(HANDLE search_handle, char * search_path)
492492 || strcmp (g_file_ext , ".deb" ) == 0 || strcmp (g_file_ext , ".rpm" ) == 0 || strcmp (g_file_ext , ".mdf" ) == 0
493493 || strcmp (g_file_ext , ".cue" ) == 0 || strcmp (g_file_ext , ".bin" ) == 0 || strcmp (g_file_ext , ".apk" ) == 0 )
494494 FG_YELLOW ();
495- else FG_GRAY (); // (everything else)
496- } else FG_GRAY (); // (no extension)
495+ else FG_GRAY (); /** (everything else) */
496+ } else FG_GRAY (); /** (no extension) */
497497 } /** First if/else */
498498
499499 /** Pause if console screen is full */
@@ -535,7 +535,7 @@ int process_files(HANDLE search_handle, char * search_path)
535535 else printf ("% 5.1f KB" , g_file_size );
536536 else printf ("% 5d B " , (int )g_file_size );
537537
538- //g_total_consumed += (float)((*lpFileSizeHigh * (MAXDWORD+1)) + GetCompressedFileSize(g_file_data_t.cFileName, lpFileSizeHigh));
538+ /* //g_total_consumed += (float)((*lpFileSizeHigh * (MAXDWORD+1)) + GetCompressedFileSize(g_file_data_t.cFileName, lpFileSizeHigh));*/
539539 }
540540
541541 FG_AQUA (); printf ("\263 \n" ); // Print |
0 commit comments