Skip to content

Commit

Permalink
7.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum-leaps committed Jun 21, 2024
1 parent 56e1e65 commit 9569a6a
Show file tree
Hide file tree
Showing 23 changed files with 1,318 additions and 843 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@
*.tmp
*.log
*.chm
*.log
*.csv
*.html
*.zip
*.tar.gz
*.avrsuo
*.vcxproj.user
version-*

.vs/
html/
latex/
test_priv/
Expand Down
23 changes: 13 additions & 10 deletions qcalc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@ for Windows and is typically included with other operating systems, such as
Linux and MacOS.


Usage without Installation
==========================
Installation
============
The `qcalc.py` script can be used standalone, **without** any
installation (see Using "qcalc" below).

Installing with `pip`
=====================
You can **install** `qcalc.py` with the standard `pip` package manager
from [PyPi package index](https://pypi.org) by executing the following command:
Alternatively, you can **install** `qcalc.py` with `pip` from PyPi by
executing the following command:


`pip install qcalc`


Or directly from the sources directory (e.g., `/qp/qtools/qcalc`):

`pip install /qp/qtools/qcalc/qcalc.tar.gz`

`python setup.py install --install-dir=/qp/qtools/qcalc`


Using "qcalc"
Expand Down Expand Up @@ -69,7 +70,7 @@ supports all mathematical functions (`sin()`, `cos()`, `tan()`,


- `((0xBEEF << 16) | 1280) & ~0xFF` -- binary operators, mixed hex and decimal numbers
- `($1011 << 24) | (1280 >> 8) ^ 0xFFF0` -- mixed binary, dec and hex numbers
- `($1011 << 24) | (1280 >> 8) ^ 0xFFF0` -- mixed @ref qcalc_bin "binary", dec and hex numbers
- `(1234 % 55) + 4321//33` -- remainder, integer division (note the `//` integer division operator
- `pi/6` -- pi-constant
- `pow(sin(ans),2) + pow(cos(ans),2)` -- scientific floating-point calculations, **ans-variable**
Expand Down Expand Up @@ -116,8 +117,8 @@ The ans Variable
"qcalc" stores the result of the last computation in the `ans` variable.
Here are some examples of expressions with the `ans` variable:

- `1/ans` -- find the inverse of the last computation
- `log(ans)/log(2)` -- find log-base-2 of the last computation
- `1/ans` -- find the inverse of the last computation@n
- `log(ans)/log(2)` -- find log-base-2 of the last computation@n


64-bit Range
Expand Down Expand Up @@ -169,3 +170,5 @@ More information about the QTools collection is available
online at:

- https://www.state-machine.com/qtools/


6 changes: 3 additions & 3 deletions qspy/include/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
* <[email protected]>
============================================================================*/
/*!
* @date Last updated on: 2023-12-12
* @version Last updated for version: 7.3.1
* @date Last updated on: 2024-06-21
* @version Last updated for version: 7.4.0
*
* @file
* @brief Platform Abstraction Layer (PAL)
Expand Down Expand Up @@ -94,7 +94,7 @@ void PAL_updateReadySet(int targetConn);
#define Q_ASSERT(test_) ((test_) \
? (void)0 : Q_onError(__FILE__, __LINE__))

void Q_onError(char const * const module, int const id);
_Noreturn void Q_onError(char const * const module, int const id);
#endif

#endif /* PAL_H_ */
8 changes: 4 additions & 4 deletions qspy/include/qspy.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
* <[email protected]>
============================================================================*/
/*!
* @date Last updated on: 2024-02-16
* @version Last updated for version: 7.3.3
* @date Last updated on: 2024-06-21
* @version Last updated for version: 7.4.0
*
* @file
* @brief Host API
*/
#ifndef QSPY_H_
#define QSPY_H_

#define QSPY_VER "7.3.3"
#define QSPY_VER "7.4.0"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -333,7 +333,7 @@ char const* QSPY_getMatDict(char const* s);

void QSEQ_configFile(void *seqFile);
bool QSEQ_isActive(void);
void QSEQ_config(void* seqFile, const char* seqList);
void QSEQ_config(void* seqFile, char const* seqList);
void QSEQ_updateDictionary(char const* name, KeyType key);
int QSEQ_find(KeyType key);
void QSEQ_genHeader(void);
Expand Down
26 changes: 13 additions & 13 deletions qspy/include/safe_std.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
// <www.state-machine.com>
// <[email protected]>
//============================================================================
//! @date Last updated on: 2022-07-30
//! @version Last updated for: @ref qpc_7_1_3
//! @date Last updated on: 2024-06-21
//! @version Last updated for: @ref qtools_7_4_0
//!
//! @file
//! @brief "safe" <stdio.h> and <string.h> facilities
Expand All @@ -37,29 +37,29 @@
#ifdef _WIN32 // Windows OS?

#define MEMMOVE_S(dest_, num_, src_, count_) \
memmove_s(dest_, num_, src_, count_)
(void)memmove_s(dest_, num_, src_, count_)

#define STRNCPY_S(dest_, destsiz_, src_) \
strncpy_s(dest_, destsiz_, src_, _TRUNCATE)
(void)strncpy_s(dest_, destsiz_, src_, _TRUNCATE)

#define STRCAT_S(dest_, destsiz_, src_) \
strcat_s(dest_, destsiz_, src_)
(void)strcat_s(dest_, destsiz_, src_)

#define SNPRINTF_S(buf_, bufsiz_, format_, ...) \
_snprintf_s(buf_, bufsiz_, _TRUNCATE, format_, __VA_ARGS__)

#define PRINTF_S(format_, ...) \
printf_s(format_, __VA_ARGS__)
(void)printf_s(format_, __VA_ARGS__)

#define FPRINTF_S(fp_, format_, ...) \
fprintf_s(fp_, format_, __VA_ARGS__)
(void)fprintf_s(fp_, format_, __VA_ARGS__)

#ifdef _MSC_VER
#define FREAD_S(buf_, bufsiz_, elsiz_, count_, fp_) \
fread_s(buf_, bufsiz_, elsiz_, count_, fp_)
#else
#define FREAD_S(buf_, bufsiz_, elsiz_, count_, fp_) \
fread(buf_, elsiz_, count_, fp_)
(void)fread(buf_, elsiz_, count_, fp_)
#endif // _MSC_VER

#define FOPEN_S(fp_, fName_, mode_) \
Expand All @@ -73,24 +73,24 @@ if (fopen_s(&fp_, fName_, mode_) != 0) { \
#else // other OS (Linux, MacOS, etc.) .....................................

#define MEMMOVE_S(dest_, num_, src_, count_) \
memmove(dest_, src_, count_)
(void)memmove(dest_, src_, count_)

#define STRNCPY_S(dest_, destsiz_, src_) do { \
strncpy(dest_, src_, destsiz_); \
(void)strncpy(dest_, src_, destsiz_); \
dest_[(destsiz_) - 1] = '\0'; \
} while (false)

#define STRCAT_S(dest_, destsiz_, src_) \
strcat(dest_, src_)
(void)strcat(dest_, src_)

#define SNPRINTF_S(buf_, bufsiz_, format_, ...) \
snprintf(buf_, bufsiz_, format_, __VA_ARGS__)

#define PRINTF_S(format_, ...) \
printf(format_, __VA_ARGS__)
(void)printf(format_, __VA_ARGS__)

#define FPRINTF_S(fp_, format_, ...) \
fprintf(fp_, format_, __VA_ARGS__)
(void)fprintf(fp_, format_, __VA_ARGS__)

#define FREAD_S(buf_, bufsiz_, elsiz_, count_, fp_) \
fread(buf_, elsiz_, count_, fp_)
Expand Down
3 changes: 3 additions & 0 deletions qspy/lint-plus/32bit/cpu.lnt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Size Options for 32bit CPU (e.g., ARM Cortex-M)
-si8 -sl8 -sll8 -ss2 -sw8 -sp8 -sf8 -sd8 -sld8

3 changes: 3 additions & 0 deletions qspy/lint-plus/64bit/cpu.lnt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Size Options for 32bit CPU (e.g., ARM Cortex-M)
-si4 -sl4 -sll8 -ss2 -sw4 -sp4 -sf4 -sd8 -sld8

21 changes: 21 additions & 0 deletions qspy/lint-plus/au-ds.lnt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// au-ds.lnt -- Author options - Dan Saks

/*
This options file can be used to explicitly activate those
checks advocated by Dan Saks in his series of presentations on
"C++ Gotchas".

You can use this file directly when linting your programs as in:

lin au-ds files

*/

+fsc // consider string constants as const char *
+e1933 // turn on "virtual call from member detection"

// The rationale for the following two options are fully described
// in Dan Saks' article "const T vs. T const". Visit his web site
// at www.dansaks.com and click "Published Articles".
//
-fqb +e963 // require T const rather than const T
Loading

0 comments on commit 9569a6a

Please sign in to comment.