Skip to content

Instantly share code, notes, and snippets.

@h1romas4
Created April 20, 2025 01:27
Show Gist options
  • Save h1romas4/b84f21f990f8af350998df74a13a377f to your computer and use it in GitHub Desktop.
Save h1romas4/b84f21f990f8af350998df74a13a377f to your computer and use it in GitHub Desktop.
[pletter.cpp](https://www.xl2s.tk/) for GCC
$ tree
.
├── CMakeLists.txt
├── linux-gcc.patch
└── src
    └── pletter.cpp
$ patch -p1 < linux-gcc.patch
$ mkdir build && cd build
$ cmake ..
$ make
$ ls -laF pletter
-rwxrwxr-x 1 hiromasa hiromasa 28440  4月 20 10:24 pletter*
$ ./pletter

Pletter v0.5c1 - www.xl2s.tk

Usage:
pletter [-s[ave_length]] sourcefile [[offset [length]] [destinationfile]]
cmake_minimum_required(VERSION 3.10)
project(Pletter)
set(CMAKE_CXX_STANDARD 11)
include_directories(src)
add_executable(pletter src/pletter.cpp)
diff --git a/src/pletter.cpp b/src/pletter.cpp
index b1cc197..9fa070c 100644
--- a/src/pletter.cpp
+++ b/src/pletter.cpp
@@ -9,6 +9,7 @@
#include <stdlib.h>
#include <string>
#include <iostream>
+#include <cstring>
using namespace std;
unsigned char *d;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment