tcMenu
tcMenuVersion.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 https://www.thecoderscorner.com (Dave Cherry).
3  * This product is licensed under an Apache license, see the LICENSE file in the top-level directory.
4  */
5 
11 #ifndef TCMENU_VERSION_H
12 #define TCMENU_VERSION_H
13 
14 #include "tcUtil.h"
15 
16 namespace tccore {
17 
18 // here we define the version as both a string and a separate field
19 #define TCMENU_MAJOR 4
20 #define TCMENU_MINOR 2
21 #define TCMENU_PATCH 1
22 
26 #define majorminor(maj, min) ((maj * 100) + min)
27 
31 #define API_VERSION majorminor(TCMENU_MAJOR, TCMENU_MINOR)
32 
33  inline void copyTcMenuVersion(char* buffer, size_t bufferSize) {
34  buffer[0] = 'V'; buffer[1]=0;
35  fastltoa(buffer, TCMENU_MAJOR, 3, NOT_PADDED, bufferSize);
36  appendChar(buffer, '.', bufferSize);
37  fastltoa(buffer, TCMENU_MINOR, 3, NOT_PADDED, bufferSize);
38  appendChar(buffer, '.', bufferSize);
39  fastltoa(buffer, TCMENU_PATCH, 3, NOT_PADDED, bufferSize);
40  }
41 
42 
43 }
44 
45 #endif //TCMENU_VERSION_H
A series of utilities that used throughout tcMenu.