Skip to content

Commit

Permalink
Add VersionNum file to describe the release.
Browse files Browse the repository at this point in the history
The standard style of VersionNum file can be used to give a
programatically extractable version number in most tools. This is
common in most RISC OS sources in some form. Tools such as the
old RISC OS 'srccommit' tool, my own 'commit' tool, and more
recently the 'riscos-vmanage' tool all use this format.

The syntax output has been updated to match RISC OS tools better,
including correcting the capitalisation of the tool.
  • Loading branch information
gerph committed Dec 12, 2022
1 parent 81b7f02 commit b0f1bc2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
24 changes: 24 additions & 0 deletions src/VersionNum
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* WakeOnLAN (0.02) 01:13:55 12/12/2022
*
* This file is automatically maintained by vmanage, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.02
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 12 Dec 2022

#define Module_MajorVersion "0.02"
#define Module_Version 2
#define Module_MinorVersion ""
#define Module_Date "12 Dec 2022"

#define Module_ApplicationDate2 "12-Dec-22"
#define Module_ApplicationDate4 "12-Dec-2022"

#define Module_ComponentName "WakeOnLAN"
#define Module_ComponentBranch ""
#define Module_ComponentPath "WakeOnLAN"

#define Module_FullVersion "0.02"
#define Module_FullVersionAndDate "0.02 (12 Dec 2022)"
#define Module_HelpVersion "0.02 (12 Dec 2022)"
6 changes: 4 additions & 2 deletions src/c/main
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* WakeOnLAN command for RISC OS
*
* release 0.1
* Copyright 2004 by Paolo Fabio Zaino
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -61,6 +60,8 @@
char *__progname = "WakeOnLan";
#endif

#include "VersionNum"

#include "magic.h"

static verbose_output = 0;
Expand All @@ -71,7 +72,8 @@ int sendMagicPacket(unsigned int mac[6], const char *broadcastAddress);

void show_syntax()
{
printf("Syntax: *wakeonlan -m <mac address> [ -b <broadcast address> ] [-v]\n");
printf("WakeOnLAN %s\n", Module_FullVersionAndDate);
printf("Syntax: *WakeOnLAN -m <mac address> [ -b <broadcast address> ] [-v]\n");
printf(" Where <mac address> has to be the MAC of the device you want to wake up. (MAC syntax: 01:02:03:04:05:06)\n");
printf(" And <broadcast address> is a valid broadcast address for you LAN. (broadcast syntax: xxx.yyy.hhh.zzz\n");
printf(" -v specify you want verbose output\n");
Expand Down

0 comments on commit b0f1bc2

Please sign in to comment.