Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: C/C++ CI

on:
push:
branches: [ dev, stable, dev-0.9.2, dev-0.9.3, dev-0.9.4, dev-0.9.5, dev-0.9.9, dev-1.0.0]
branches: [ dev, stable, dev-0.9.2, dev-0.9.3, dev-0.9.4, dev-0.9.5, dev-0.9.5-hf1, dev-0.9.9, dev-1.0.0]
pull_request:
branches: [ dev, stable, dev-0.9.2, dev-0.9.3, dev-0.9.4, dev-0.9.5, dev-0.9.9, dev-1.0.0]
branches: [ dev, stable, dev-0.9.2, dev-0.9.3, dev-0.9.4, dev-0.9.5, dev-0.9.5-hf1, dev-0.9.9, dev-1.0.0]

jobs:
build:
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ This version is liberally based on the [**CMS Pipelines User's Guide and Referen

News
====
03-Jan-2025: Version 0.9.5-HF1 is here
What's new:
* Fixes a bug where `RECNO` within a loop returned the number of iterations of the loop rather than the numbers of records read.

NOTE: This is a non-backwards-compatible change.


29-Dec-2024: Version 0.9.5 is here
What's New:
* The `exact()` function prototype for compatibility.
Expand All @@ -22,13 +29,6 @@ What's New:
* A new `--progress` command-line switch to allow the user to monitor progress in reading records.
* Bug fixes

10-May-2024: Version 0.9.2 is here
What's New:
* An unthreaded mode of operation
* Compound `SET` statements
* Reduced necessity of quoting complex conditions for `if` and `while`
* Bug fixes


Sources
=======
Expand All @@ -40,7 +40,7 @@ Building
========
If you have downloaded a git repository, first make sure to check out a stable tag such as v0.9.5:
```
git checkout v0.9.5
git checkout dev-0.9.5-hf1
```
A simple way to get the latest stable release is to check out the `stable` branch and rebase to its tip:
```
Expand Down
2 changes: 1 addition & 1 deletion manpage
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" Manpage for specs.
.\" Open an issue at https://github.com/yoavnir/specs2016 to correct errors or typos
.mso www.tmac
.TH man 1 "1 Jan 2025" "0.9.5" "specs man page"
.TH man 1 "1 Jan 2025" "0.9.5-HF1" "specs man page"
.SH NAME
specs \- a text processing tool
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion specs/src/specitems/InputPart.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ std::string NumberPart::Debug()

PSpecString NumberPart::getStr(ProcessingState& pState)
{
std::string s = std::to_string(++m_Num);
std::string s = std::to_string(pState.getRecordCount());
s = std::string(NUMBER_PART_FIELD_LEN - s.length(), ' ') + s;
return std::make_shared<std::string>(s);
}
Expand Down
4 changes: 1 addition & 3 deletions specs/src/specitems/item.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,11 @@ typedef std::shared_ptr<SubstringPart> PSubstringPart;
#define CLOCKDIFF_PART_FIELD_LEN 12
class NumberPart : public InputPart {
public:
NumberPart() {m_Num = 0;}
virtual ~NumberPart() {}
NumberPart() {}
virtual std::string Debug();
virtual PSpecString getStr(ProcessingState& pState);
virtual bool readsLines() {return true;}
private:
unsigned long m_Num;
};

typedef std::shared_ptr<NumberPart> PNumberPart;
Expand Down
5 changes: 5 additions & 0 deletions specs/src/test/ProcessingTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,11 @@ int main(int argc, char** argv)
spec = "SUBSTR WS / WORD 3 of FS i FIELD 2";
VERIFY2(spec, "The Epic: 1/Jan/1970 at midnight", "1970 at m"); // Test #186

// RECNO - Issue #277
spec = "WORD 1 a: IF a%2==0 THEN RECNO 1";
VERIFY2(spec, "1\n2\n3\n4\n5", " 2\n 4"); // Test #187


if (errorCount) {
std::cout << '\n' << errorCount << '/' << testCount << " tests failed.\n";
std::cout << "Failed tests: ";
Expand Down
2 changes: 1 addition & 1 deletion specs/tests/valgrind_unit_tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys, memcheck, argparse

count_ALU_tests = 749
count_processing_tests = 186
count_processing_tests = 187
count_token_tests = 17

# Parse the one command line options
Expand Down