Skip to content

Commit 2e1ce05

Browse files
0.0.2 (#4)
* Boilerplate (#2) * .gitattributes * .gitignore * .vimrc * settings * chore: project helper scripts * chore: added project markdown files * LICENSE * chore: CMake updates * CI * .vscode/settings.json * .gitattributes * ci * README.md "related projects" * README.md operating-system badge * README.md * chore: harmonize CMake standards and install targets * chore: standardise helper project identity handling * chore: standardize shell-script color output * chore: canonicalised helper scripts * CMake * CMake * fix: helper scripts (#3) * chore: fixed colour terminal check * Release WriteDebugString 0.0.2 Update version metadata and documentation, install the new section-1 man page, and align executable naming with the CMake target. --------- Co-authored-by: Matt Wilson <152443343+mwsis@users.noreply.github.com>
1 parent ea2505b commit 2e1ce05

16 files changed

Lines changed: 360 additions & 106 deletions

‎.gitattributes‎

Lines changed: 85 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,85 @@
1-
*.c linguist-language=C
2-
*.cmake linguist-vendored
3-
*.cmd linguist-detectable=false
4-
*.cpp linguist-language=C++
5-
*.cxx linguist-language=C++
6-
*.dsp linguist-detectable=false
7-
*.dsw linguist-detectable=false
8-
*.h linguist-language=C
9-
*.hpp linguist-language=C++
10-
*.html linguist-detectable=false
11-
*.hxx linguist-language=C++
12-
*.sh linguist-detectable=false
13-
*.sln linguist-detectable=false
14-
*.vcxproj linguist-detectable=false
15-
*.vimrc linguist-detectable=false
16-
CMakeLists.txt linguist-vendored
17-
makefile linguist-detectable=false
1+
# .gitattributes — C (GitHub-hosted)
2+
#
3+
# Sources: GitHub Docs (line endings), git-scm gitattributes (diff=cpp),
4+
# gitattributes/gitattributes C++.gitattributes + Common.gitattributes,
5+
# github-linguist overrides.
6+
7+
# Default: detect text, normalize to LF in the repository
8+
* text=auto
9+
10+
# --- Source ---
11+
*.c text diff=cpp
12+
*.h text diff=cpp
13+
*.inc text
14+
*.inl text
15+
16+
# --- Build / config ---
17+
*.am text
18+
*.cmake text
19+
*.m4 text
20+
*.mak text
21+
*.mk text
22+
*akefile text
23+
CMakeLists.txt text
24+
configure text eol=lf
25+
configure.ac text
26+
27+
# --- Scripts ---
28+
*.bash text eol=lf
29+
*.bat text eol=crlf
30+
*.cmd text eol=crlf
31+
*.ps1 text eol=crlf
32+
*.sh text eol=lf
33+
*.zsh text eol=lf
34+
35+
# --- Docs / meta ---
36+
*.adoc text
37+
*.markdown text diff=markdown
38+
*.md text diff=markdown
39+
*.txt text
40+
AUTHORS text
41+
CHANGELOG text
42+
CHANGES text
43+
CONTRIBUTING text
44+
COPYING text
45+
LICENSE text
46+
NEWS text
47+
README text
48+
TODO text
49+
.gitattributes text
50+
.gitignore text
51+
52+
# --- Serialisation ---
53+
*.json text
54+
*.toml text
55+
*.xml text
56+
*.yaml text
57+
*.yml text
58+
59+
# --- Compiled / binary artefacts ---
60+
*.a binary
61+
*.dll binary
62+
*.dylib binary
63+
*.exe binary
64+
*.gch binary
65+
*.lib binary
66+
*.o binary
67+
*.obj binary
68+
*.out binary
69+
*.pch binary
70+
*.so binary
71+
72+
# --- Archives / images (common) ---
73+
*.gif binary
74+
*.gz binary
75+
*.ico binary
76+
*.jpeg binary
77+
*.jpg binary
78+
*.png binary
79+
*.tar binary
80+
*.zip binary
81+
82+
# --- GitHub Linguist ---
83+
# Object / build trees if committed (prefer .gitignore; mark if present)
84+
**/build/** linguist-generated
85+
**/cmake-build-*/** linguist-generated

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ on:
44
push:
55
branches:
66
- master
7+
- dev
78
- boilerplate
9+
- idiomatic
10+
- rc1
11+
- rc2
12+
- rc3
813
pull_request:
914

1015
concurrency:

‎.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
/_internal/
99

1010
/bin/
11-
/doc/
1211
/include/
1312
/lib/
1413
/node_modules/

‎.vscode/settings.json‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"editor.tabSize": 4,
66
},
77
"[c]": {
8+
"editor.defaultFormatter": "ms-vscode.cpptools",
9+
"editor.formatOnSave": true,
810
"editor.insertSpaces": true,
911
"editor.rulers": [ 60, 64, 68, 72, 76 ],
1012
"editor.tabSize": 4,
@@ -14,6 +16,8 @@
1416
"editor.tabSize": 4,
1517
},
1618
"[cpp]": {
19+
"editor.defaultFormatter": "ms-vscode.cpptools",
20+
"editor.formatOnSave": true,
1721
"editor.insertSpaces": true,
1822
"editor.rulers": [ 60, 64, 68, 72, 76 ],
1923
"editor.tabSize": 4,
@@ -49,7 +53,17 @@
4953
"editor.insertSpaces": true,
5054
"editor.tabSize": 2,
5155
},
56+
"C_Cpp.autocompleteAddParentheses": true,
57+
"C_Cpp.clang_format_fallbackStyle": "none",
58+
"C_Cpp.clang_format_style": "file",
59+
"C_Cpp.default.cStandard": "c17",
60+
"C_Cpp.default.cppStandard": "c++17",
61+
"C_Cpp.enhancedColorization": "enabled",
62+
"C_Cpp.errorSquiggles": "enabled",
63+
"C_Cpp.formatting": "clangFormat",
64+
"C_Cpp.intelliSenseEngine": "default",
5265
"cmake.configureOnOpen": false,
66+
"debug.allowBreakpointsEverywhere": true,
5367
"editor.detectIndentation": false,
5468
"editor.insertSpaces": false,
5569
"editor.renderWhitespace": "all",
@@ -128,6 +142,7 @@
128142
"numeric": "cpp",
129143
"optional": "cpp",
130144
"ostream": "cpp",
145+
"print": "cpp",
131146
"queue": "cpp",
132147
"random": "cpp",
133148
"ranges": "cpp",

‎CHANGES.md‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
# **WriteDebugString** Changes <!-- omit in toc -->
1+
# WriteDebugString - Changes <!-- omit in toc -->
2+
3+
4+
## 0.0.2 - 24th August 2026
5+
6+
* Updated the CMake configuration to honour caller-supplied C and C++ standards and report the build type;
7+
* Normalised the CMake executable target name to **writedebugstring**;
8+
* Improved CMake helper scripts with safer path handling, project identity, coloured status diagnostics, and configurable C standards;
9+
* Expanded repository metadata and Visual Studio Code C/C++ configuration;
10+
* Expanded GitHub Actions push-branch coverage;
11+
* Updated the executable version to 0.0.2;
12+
* Added a section-1 reference page and installed it with CMake;
213

314

415
## 0.0.1 - 3rd August 2026

‎CMakeLists.txt‎

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Purpose: Top-level CMake lists file for WriteDebugString
55
#
66
# Created: 3rd August 2026
7-
# Updated: 3rd August 2026
7+
# Updated: 24th August 2026
88
#
99
# ######################################################################## #
1010

@@ -56,10 +56,16 @@ set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT
5656

5757
# adhere strictly to C and C++ standards plus extensions. These are actually
5858
# useless since we do not compile anything; they merely state our intention.
59-
set(CMAKE_C_STANDARD 17)
59+
if(NOT CMAKE_C_STANDARD)
60+
61+
set(CMAKE_C_STANDARD 17)
62+
endif()
6063
set(CMAKE_C_STANDARD_REQUIRED ON)
6164
set(CMAKE_C_EXTENSIONS ON) # GNU extensions and POSIX standard
62-
set(CMAKE_CXX_STANDARD 17)
65+
if(NOT CMAKE_CXX_STANDARD)
66+
67+
set(CMAKE_CXX_STANDARD 17)
68+
endif()
6369
set(CMAKE_CXX_STANDARD_REQUIRED ON)
6470
set(CMAKE_CXX_EXTENSIONS ON)
6571

@@ -181,11 +187,11 @@ include(GNUInstallDirs)
181187
# ##########################################################
182188
# tool
183189

184-
add_executable(${PROJECT_NAME}
190+
add_executable(${PROJECT_NAME_LOWER}
185191
main.c
186192
)
187193

188-
target_compile_options(${PROJECT_NAME}
194+
target_compile_options(${PROJECT_NAME_LOWER}
189195
PRIVATE
190196
$<$<OR:$<C_COMPILER_ID:Clang>,$<C_COMPILER_ID:AppleClang>,$<C_COMPILER_ID:GNU>>:
191197
-Werror -Wall -Wextra -pedantic
@@ -199,14 +205,19 @@ target_compile_options(${PROJECT_NAME}
199205
>
200206
)
201207

202-
target_link_libraries(${PROJECT_NAME}
208+
target_link_libraries(${PROJECT_NAME_LOWER}
203209
$<$<STREQUAL:${STLSOFT_INCLUDE_DIR},>:STLSoft::STLSoft>
204210
)
205211

206-
install(TARGETS ${PROJECT_NAME}
212+
install(TARGETS ${PROJECT_NAME_LOWER}
207213
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
208214
)
209215

216+
install(FILES
217+
doc/${PROJECT_NAME_LOWER}.1
218+
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
219+
)
220+
210221

211222
# ################################################
212223
# examples
@@ -227,7 +238,7 @@ endif(BUILD_TESTING)
227238
# ##########################################################
228239
# completion
229240

230-
message(NOTICE "Generating CMake build scripts for ${PROJECT_NAME} ${PROJECT_VERSION}, for C${CMAKE_C_STANDARD} C++${CMAKE_CXX_STANDARD}")
241+
message(NOTICE "Generating CMake build scripts for ${PROJECT_NAME} ${PROJECT_VERSION}, for C${CMAKE_C_STANDARD} C++${CMAKE_CXX_STANDARD}, with build type ${CMAKE_BUILD_TYPE}")
231242

232243

233244
# ############################## end of file ############################# #

‎INSTALL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ The primary choice for installation is by use of **CMake**.
6868

6969
```bash
7070
$ cd ~/open-source/WriteDebugString
71-
$ ./_build/WriteDebugString.exe --help
71+
$ ./_build/writedebugstring.exe --help
7272
```
7373

74-
You should see usage output naming **WriteDebugString**.
74+
You should see usage output naming **writedebugstring**.
7575

7676
5. Install (optional), as in:
7777

‎NEWS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
| Date | News Item |
55
| -------------------- | -------------------------------------------------- |
6+
| 24th August 2026 | [0.0.2 released](https://github.com/sistools/WriteDebugString/releases/tag/0.0.2) |
67
| 3rd August 2026 | 0.0.1 released |
78

89

‎README.md‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Windows CLI that writes messages to the debugger via **OutputDebugString**
44

55

66
![C](https://img.shields.io/badge/C-00599C?style=flat&logo=c&logoColor=white)
7+
![Windows](https://img.shields.io/badge/OS-Windows-0078D6?style=flat&logo=windows&logoColor=white)
78
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
89
[![GitHub release](https://img.shields.io/github/v/release/sistools/WriteDebugString.svg)](https://github.com/sistools/WriteDebugString/releases/latest)
910
[![Last Commit](https://img.shields.io/github/last-commit/sistools/WriteDebugString)](https://github.com/sistools/WriteDebugString/commits/master)
@@ -45,10 +46,10 @@ The project creates a single executable program, **WriteDebugString**.
4546
## Examples
4647

4748
```plaintext
48-
> WriteDebugString.exe hello world
49+
> writedebugstring.exe hello world
4950
wrote 2 message(s) to debug stream
5051
51-
> WriteDebugString.exe --sleep-after-writes "hold for listener"
52+
> writedebugstring.exe --sleep-after-writes "hold for listener"
5253
wrote 1 message(s) to debug stream
5354
```
5455

@@ -75,10 +76,17 @@ Defect reports, feature requests, and pull requests are welcome on [the **WriteD
7576

7677
### Related projects
7778

78-
Other (similar) projects include:
79-
80-
* [**ReadDebugString**](https://github.com/sistools/ReadDebugString)
81-
* [**realpath**](https://github.com/sistools/realpath)
79+
Other **sistools** projects include:
80+
81+
* [**chomp**](https://github.com/sistools/chomp);
82+
* [**errni**](https://github.com/sistools/errni) (errno on all platforms, and also GetLastError codes on Windows);
83+
* [**lnunique**](https://github.com/sistools/lnunique);
84+
* [**lslocales**](https://github.com/sistools/lslocales);
85+
* [**lstrip**](https://github.com/sistools/lstrip);
86+
* [**mksock**](https://github.com/sistools/mksock) (Unix-only);
87+
* [**ReadDebugString**](https://github.com/sistools/ReadDebugString) (Windows-only);
88+
* [**realpath**](https://github.com/sistools/realpath) (Windows-only);
89+
* [**rstrip**](https://github.com/sistools/rstrip);
8290

8391

8492
### License

0 commit comments

Comments
 (0)