Formatting gui module.

This commit is contained in:
louib
2020-01-07 19:46:59 -05:00
parent 3089a78f72
commit 4071e5f66a
5 changed files with 2227 additions and 1998 deletions

View File

@@ -23,4 +23,4 @@ jobs:
- name: verifying code style
# TODO use check-format when all the code has been formatted.
# run: export PATH=$PATH:/usr/lib/llvm-5.0/bin && make check-format
run: export PATH=$PATH:/usr/lib/llvm-5.0/bin && clang-format -i -style=file src/context.h src/device.h src/device.c src/logging.c src/logging.h src/nwipe.c src/nwipe.h src/options.c src/options.h src/version.h src/version.c src/method.h src/method.c src/pass.c src/pass.h src/prng.c src/prng.h && git diff-index --quiet HEAD
run: export PATH=$PATH:/usr/lib/llvm-5.0/bin && clang-format -i -style=file src/context.h src/device.h src/device.c src/logging.c src/logging.h src/nwipe.c src/nwipe.h src/options.c src/options.h src/gui.h src/gui.c src/version.h src/version.c src/method.h src/method.c src/pass.c src/pass.h src/prng.c src/prng.h && git diff-index --quiet HEAD

View File

@@ -23,4 +23,4 @@ jobs:
- name: verifying code style
# TODO use check-format when all the code has been formatted.
# run: export PATH=$PATH:/usr/lib/llvm-5.0/bin && make check-format
run: export PATH=$PATH:/usr/lib/llvm-5.0/bin && clang-format -i -style=file src/context.h src/device.h src/device.c src/logging.c src/logging.h src/nwipe.c src/nwipe.h src/options.c src/options.h src/version.h src/version.c src/method.h src/method.c src/pass.c src/pass.h src/prng.c src/prng.h && git diff-index --quiet HEAD
run: export PATH=$PATH:/usr/lib/llvm-5.0/bin && clang-format -i -style=file src/context.h src/device.h src/device.c src/logging.c src/logging.h src/nwipe.c src/nwipe.h src/options.c src/options.h src/gui.h src/gui.c src/version.h src/version.c src/method.h src/method.c src/pass.c src/pass.h src/prng.c src/prng.h && git diff-index --quiet HEAD

4189
src/gui.c

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
* gui.h: An ncurses GUI for nwipe.
*
* Copyright Darik Horn <dajhorn-dban@vanadac.com>.
*
*
* Modifications to original dwipe Copyright Andy Beverley <andy@andybev.com>
*
* This program is free software; you can redistribute it and/or modify it under
@@ -16,29 +16,25 @@
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#ifndef GUI_H_
#define GUI_H_
void nwipe_gui_free( void ); /* Stop the GUI. */
void nwipe_gui_init( void ); /* Start the GUI. */
void nwipe_gui_select( int count, nwipe_context_t** c ); /* Select devices to wipe. */
void *nwipe_gui_status( void *ptr ); /* Update operation progress. */
void nwipe_gui_method( void ); /* Change the method option. */
void nwipe_gui_options( void ); /* Update the options window. */
void nwipe_gui_prng( void ); /* Change the prng option. */
void nwipe_gui_rounds( void ); /* Change the rounds option. */
void nwipe_gui_verify( void ); /* Change the verify option. */
void nwipe_gui_noblank( void ); /* Change the noblank option. */
void nwipe_gui_free( void ); // Stop the GUI.
void nwipe_gui_init( void ); // Start the GUI.
void nwipe_gui_select( int count, nwipe_context_t** c ); // Select devices to wipe.
void* nwipe_gui_status( void* ptr ); // Update operation progress.
void nwipe_gui_method( void ); // Change the method option.
void nwipe_gui_options( void ); // Update the options window.
void nwipe_gui_prng( void ); // Change the prng option.
void nwipe_gui_rounds( void ); // Change the rounds option.
void nwipe_gui_verify( void ); // Change the verify option.
void nwipe_gui_noblank( void ); // Change the noblank option.
int compute_stats(void *ptr);
int compute_stats( void* ptr );
void nwipe_update_speedring( nwipe_speedring_t* speedring, u64 speedring_done, time_t speedring_now );
#endif /* GUI_H_ */
/* eof */

View File

@@ -678,7 +678,7 @@ int cleanup()
{
free( log_lines[i] );
}
log_elements_allocated = 0; /* zeroed just in case cleanup is called twice */
log_elements_allocated = 0; // zeroed just in case cleanup is called twice.
free( log_lines );
}