Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/scripts/destatic.sh @ 3:2c135c81b16c
MERGE: upstream PyMuPDF 1.26.4 with MuPDF 1.26.7
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:44:09 +0200 |
| parents | b50eed0cc0ef |
| children |
comparison
equal
deleted
inserted
replaced
| 0:6015a75abc2d | 3:2c135c81b16c |
|---|---|
| 1 # Simple script to make all static functions in the main source | |
| 2 # unstatic. This allows backtracing functions (such as that used | |
| 3 # in Memento, in particular on Android) to pick up symbol names | |
| 4 # nicely. | |
| 5 # | |
| 6 # This script can be reversed using restatic.sh | |
| 7 | |
| 8 # Allow for the fact that mujs might not be present | |
| 9 MUJS_SRC= | |
| 10 test -d thirdparty/mujs && MUJS_SRC=thirdparty/mujs | |
| 11 | |
| 12 # Convert everything | |
| 13 sed -i '/^static inline/b;/^static const/b;s!^static !/\*static \*/!' $(find source platform/android/viewer platform/java $MUJS_SRC -name '*.c') | |
| 14 | |
| 15 # Convert source/tools back again. | |
| 16 sed -i 's!/\*static \*/!static !' $(find source/tools -name '*.c') |
