Skip to content

Commit

Permalink
add version string
Browse files Browse the repository at this point in the history
  • Loading branch information
rusq committed Jul 24, 2022
1 parent 296122d commit c57f6f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ project ("jpegrip")

# Add source to this project's executable.
add_executable (jpegrip "main.c" "jpegrip.c" "jpegrip.h" "log.c" "log.h" "jpeg.c" "jpeg.h")
add_executable (jpeghdr "jpeghdr.c" "jpeg.c" "jpeg.h" "log.c" "log.h")

if (CMAKE_VERSION VERSION_GREATER 3.12)
set_property(TARGET jpegrip PROPERTY CXX_STANDARD 20)
# set_property(TARGET jpegrip PROPERTY CXX_STANDARD 20)
set_property(TARGET jpegrip PROPERTY C_STANDARD 90)
endif()

# TODO: Add tests and install targets if needed.
2 changes: 2 additions & 0 deletions jpegrip.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define _JR_JPEGRIP2
#include <stdio.h>

#define JPEGRIP_VERSION "v0.3.1"

int rip_jpeg(FILE *hFile);

#endif
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ int main(int argc, char **argv) {
}

void usage(const char *me) {
printf("jpegrip - find and extract jpeg files in binary files.\n");
printf("jpegrip %s - find and extract jpeg files in binary files.\n", JPEGRIP_VERSION);
printf("Usage: %s [-v|-vv] <mess.ext>\n", me);
printf("\t-v\t- verbose mode\n\t-vv\t- very verbose mode\n");
}
Expand Down

0 comments on commit c57f6f8

Please sign in to comment.