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
102 changes: 85 additions & 17 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,17 +1,85 @@
*.c linguist-language=C
*.cmake linguist-vendored
*.cmd linguist-detectable=false
*.cpp linguist-language=C++
*.cxx linguist-language=C++
*.dsp linguist-detectable=false
*.dsw linguist-detectable=false
*.h linguist-language=C
*.hpp linguist-language=C++
*.html linguist-detectable=false
*.hxx linguist-language=C++
*.sh linguist-detectable=false
*.sln linguist-detectable=false
*.vcxproj linguist-detectable=false
*.vimrc linguist-detectable=false
CMakeLists.txt linguist-vendored
makefile linguist-detectable=false
# .gitattributes — C (GitHub-hosted)
#
# Sources: GitHub Docs (line endings), git-scm gitattributes (diff=cpp),
# gitattributes/gitattributes C++.gitattributes + Common.gitattributes,
# github-linguist overrides.

# Default: detect text, normalize to LF in the repository
* text=auto

# --- Source ---
*.c text diff=cpp
*.h text diff=cpp
*.inc text
*.inl text

# --- Build / config ---
*.am text
*.cmake text
*.m4 text
*.mak text
*.mk text
*akefile text
CMakeLists.txt text
configure text eol=lf
configure.ac text

# --- Scripts ---
*.bash text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
*.sh text eol=lf
*.zsh text eol=lf

# --- Docs / meta ---
*.adoc text
*.markdown text diff=markdown
*.md text diff=markdown
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
LICENSE text
NEWS text
README text
TODO text
.gitattributes text
.gitignore text

# --- Serialisation ---
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# --- Compiled / binary artefacts ---
*.a binary
*.dll binary
*.dylib binary
*.exe binary
*.gch binary
*.lib binary
*.o binary
*.obj binary
*.out binary
*.pch binary
*.so binary

# --- Archives / images (common) ---
*.gif binary
*.gz binary
*.ico binary
*.jpeg binary
*.jpg binary
*.png binary
*.tar binary
*.zip binary

# --- GitHub Linguist ---
# Object / build trees if committed (prefer .gitignore; mark if present)
**/build/** linguist-generated
**/cmake-build-*/** linguist-generated
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ on:
push:
branches:
- master
- dev
- boilerplate
- idiomatic
- rc1
- rc2
- rc3
pull_request:

concurrency:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/_internal/

/bin/
/doc/
/include/
/lib/
/node_modules/
Expand Down
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"editor.tabSize": 4,
},
"[c]": {
"editor.defaultFormatter": "ms-vscode.cpptools",
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.rulers": [ 60, 64, 68, 72, 76 ],
"editor.tabSize": 4,
Expand All @@ -14,6 +16,8 @@
"editor.tabSize": 4,
},
"[cpp]": {
"editor.defaultFormatter": "ms-vscode.cpptools",
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.rulers": [ 60, 64, 68, 72, 76 ],
"editor.tabSize": 4,
Expand Down Expand Up @@ -49,7 +53,17 @@
"editor.insertSpaces": true,
"editor.tabSize": 2,
},
"C_Cpp.autocompleteAddParentheses": true,
"C_Cpp.clang_format_fallbackStyle": "none",
"C_Cpp.clang_format_style": "file",
"C_Cpp.default.cStandard": "c17",
"C_Cpp.default.cppStandard": "c++17",
"C_Cpp.enhancedColorization": "enabled",
"C_Cpp.errorSquiggles": "enabled",
"C_Cpp.formatting": "clangFormat",
"C_Cpp.intelliSenseEngine": "default",
"cmake.configureOnOpen": false,
"debug.allowBreakpointsEverywhere": true,
"editor.detectIndentation": false,
"editor.insertSpaces": false,
"editor.renderWhitespace": "all",
Expand Down Expand Up @@ -128,6 +142,7 @@
"numeric": "cpp",
"optional": "cpp",
"ostream": "cpp",
"print": "cpp",
"queue": "cpp",
"random": "cpp",
"ranges": "cpp",
Expand Down
13 changes: 12 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# **WriteDebugString** Changes <!-- omit in toc -->
# WriteDebugString - Changes <!-- omit in toc -->


## 0.0.2 - 24th August 2026

* Updated the CMake configuration to honour caller-supplied C and C++ standards and report the build type;
* Normalised the CMake executable target name to **writedebugstring**;
* Improved CMake helper scripts with safer path handling, project identity, coloured status diagnostics, and configurable C standards;
* Expanded repository metadata and Visual Studio Code C/C++ configuration;
* Expanded GitHub Actions push-branch coverage;
* Updated the executable version to 0.0.2;
* Added a section-1 reference page and installed it with CMake;


## 0.0.1 - 3rd August 2026
Expand Down
27 changes: 19 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Purpose: Top-level CMake lists file for WriteDebugString
#
# Created: 3rd August 2026
# Updated: 3rd August 2026
# Updated: 24th August 2026
#
# ######################################################################## #

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

# adhere strictly to C and C++ standards plus extensions. These are actually
# useless since we do not compile anything; they merely state our intention.
set(CMAKE_C_STANDARD 17)
if(NOT CMAKE_C_STANDARD)

set(CMAKE_C_STANDARD 17)
endif()
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON) # GNU extensions and POSIX standard
set(CMAKE_CXX_STANDARD 17)
if(NOT CMAKE_CXX_STANDARD)

set(CMAKE_CXX_STANDARD 17)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)

Expand Down Expand Up @@ -181,11 +187,11 @@ include(GNUInstallDirs)
# ##########################################################
# tool

add_executable(${PROJECT_NAME}
add_executable(${PROJECT_NAME_LOWER}
main.c
)

target_compile_options(${PROJECT_NAME}
target_compile_options(${PROJECT_NAME_LOWER}
PRIVATE
$<$<OR:$<C_COMPILER_ID:Clang>,$<C_COMPILER_ID:AppleClang>,$<C_COMPILER_ID:GNU>>:
-Werror -Wall -Wextra -pedantic
Expand All @@ -199,14 +205,19 @@ target_compile_options(${PROJECT_NAME}
>
)

target_link_libraries(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME_LOWER}
$<$<STREQUAL:${STLSOFT_INCLUDE_DIR},>:STLSoft::STLSoft>
)

install(TARGETS ${PROJECT_NAME}
install(TARGETS ${PROJECT_NAME_LOWER}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

install(FILES
doc/${PROJECT_NAME_LOWER}.1
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
)


# ################################################
# examples
Expand All @@ -227,7 +238,7 @@ endif(BUILD_TESTING)
# ##########################################################
# completion

message(NOTICE "Generating CMake build scripts for ${PROJECT_NAME} ${PROJECT_VERSION}, for C${CMAKE_C_STANDARD} C++${CMAKE_CXX_STANDARD}")
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}")


# ############################## end of file ############################# #
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ The primary choice for installation is by use of **CMake**.

```bash
$ cd ~/open-source/WriteDebugString
$ ./_build/WriteDebugString.exe --help
$ ./_build/writedebugstring.exe --help
```

You should see usage output naming **WriteDebugString**.
You should see usage output naming **writedebugstring**.

5. Install (optional), as in:

Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

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


Expand Down
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Windows CLI that writes messages to the debugger via **OutputDebugString**


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

```plaintext
> WriteDebugString.exe hello world
> writedebugstring.exe hello world
wrote 2 message(s) to debug stream

> WriteDebugString.exe --sleep-after-writes "hold for listener"
> writedebugstring.exe --sleep-after-writes "hold for listener"
wrote 1 message(s) to debug stream
```

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

### Related projects

Other (similar) projects include:

* [**ReadDebugString**](https://github.com/sistools/ReadDebugString)
* [**realpath**](https://github.com/sistools/realpath)
Other **sistools** projects include:

* [**chomp**](https://github.com/sistools/chomp);
* [**errni**](https://github.com/sistools/errni) (errno on all platforms, and also GetLastError codes on Windows);
* [**lnunique**](https://github.com/sistools/lnunique);
* [**lslocales**](https://github.com/sistools/lslocales);
* [**lstrip**](https://github.com/sistools/lstrip);
* [**mksock**](https://github.com/sistools/mksock) (Unix-only);
* [**ReadDebugString**](https://github.com/sistools/ReadDebugString) (Windows-only);
* [**realpath**](https://github.com/sistools/realpath) (Windows-only);
* [**rstrip**](https://github.com/sistools/rstrip);


### License
Expand Down
Loading
Loading