diff --git a/Makefile b/Makefile index 910aa62f6..64dbea4eb 100644 --- a/Makefile +++ b/Makefile @@ -145,12 +145,12 @@ style: # Make sure astyle is installed @which astyle >/dev/null || ( echo "Please install 'astyle' package first" ; exit 1 ) # Remove spaces & tabs at EOL, add LF at EOF if needed on *.c, *.h, *.cpp. *.lua, *.py, *.pl, Makefile - find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "Makefile" \) \ + find . \( -name "*.[ch]" -or \( -name "*.cpp" -and -not -name "*.moc.cpp" \) -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "Makefile" \) \ -exec perl -pi -e 's/[ \t]+$$//' {} \; \ -exec sh -c "tail -c1 {} | xxd -p | tail -1 | grep -q -v 0a$$" \; \ -exec sh -c "echo >> {}" \; # Apply astyle on *.c, *.h, *.cpp - find . \( -name "*.[ch]" -or -name "*.cpp" \) -exec astyle --formatted --mode=c --suffix=none \ + find . \( -name "*.[ch]" -or \( -name "*.cpp" -and -not -name "*.moc.cpp" \) \) -exec astyle --formatted --mode=c --suffix=none \ --indent=spaces=4 --indent-switches \ --keep-one-line-blocks --max-instatement-indent=60 \ --style=google --pad-oper --unpad-paren --pad-header \ diff --git a/client/fpga_compress.c b/client/fpga_compress.c index 7cd4652e1..a030afe81 100644 --- a/client/fpga_compress.c +++ b/client/fpga_compress.c @@ -375,7 +375,7 @@ static void print_version_info_preamble(FILE *outfile, int num_infiles) { fprintf(outfile, "\n"); fprintf(outfile, "\n"); fprintf(outfile, "const int fpga_bitstream_num = %d;\n", num_infiles); - fprintf(outfile, "const char* const fpga_version_information[%d] = {\n", num_infiles); + fprintf(outfile, "const char *const fpga_version_information[%d] = {\n", num_infiles); } static int generate_fpga_version_info(FILE *infile[], char *infile_names[], int num_infiles, FILE *outfile) { @@ -386,7 +386,7 @@ static int generate_fpga_version_info(FILE *infile[], char *infile_names[], int for (int i = 0; i < num_infiles; i++) { FpgaGatherVersion(infile[i], infile_names[i], version_string, sizeof(version_string)); - fprintf(outfile, "\t\" %s\"", version_string); + fprintf(outfile, " \" %s\"", version_string); if (i != num_infiles - 1) { fprintf(outfile, ","); }