Comments (6)
Thanks. In a few decades, this may work out ;-)
from leptonica.
We're talking about changing 500 files in src and prog !
Furthermore, the current naming scheme is simple and consistent with both ints and floats. Because the fixed width float typedefs would not be changed, the naming scheme would end up inconsistent between ints and floats.
from leptonica.
We're talking about changing 500 files in src and prog !
This task can be done by a few lines script.
#344 also had hundreds of replacements.
Furthermore, the current naming scheme is simple and consistent with both ints and floats. Because the fixed width float typedefs would not be changed, the naming scheme would end up inconsistent between ints and floats.
It's true that it will be inconsistent.
As a note, the upcoming C++23 standard solves this inconstancy. It adds a new header <stdfloat>. This will probably be adopted by C sometime in the future...
Since you do not like this idea. I'll close this issue.
from leptonica.
I have patience :-)
from leptonica.
We're talking about changing 500 files in src and prog !
As Amit has written this can be scripted (that change just took less than 15 minutes including a test build). The good news is that l_int32
and int32_t
(and all other integer types) have the same number of characters, so there is no need to reformat any comments.
And for compatibility the current integer types can still be provided in environ.h as typedefs of POSIX types.
from leptonica.
I agree that there are some things we can do easily, however ...
I set this all up in 2000 so we'd never have to make any widespread changes, either in the
library or in programs that use it.
See Section 5. Typedefs in README.html for how I viewed compatibility and customization.
This was, as stated there, my approach to handling the lack of standardized C typedefs for built-ins.
It's interesting that here we are, 22 years later, and that issue is still with us.
In any event, I was expecting that any necessary modification could still use the leptonica l_* typedefs.
I'm probably a bit old-fashioned (hey, leptonica is still in C), but as I see it, the current approach
is simple, it will continue to work no matter what future typedef standards (if any) for C are created,
the typedefs in environ.h will continue to be necessary to support legacy code using leptonica,
and "if it ain't broke, don't fix it" seems appropriate.
from leptonica.
Related Issues (20)
- My. net6 program uses the Tesseract library, which works fine under Windows, but fails under Linux HOT 1
- Security binary scan reports XZ Utils library but unable to detect the version HOT 2
- Build fails under Windows HOT 27
- 1.83.1: test suite fails in `ioformats_reg` unit HOT 7
- JPEG decompression is not unique, which can cause colorcontent_reg to fail on the number of colors in wyom.jpg HOT 1
- Suggest noting that libtiff must have been compiled with JPEG compression support for tests to run correctly HOT 4
- Leptonica 1.84 release schedule HOT 28
- How to detect the four corners of paper or ID card HOT 8
- 1.84.0 fails to build in FreeBSD 14.0 due missing reference to libm using CMake HOT 24
- CMake build in 1.84.0 adds include to non-existant path
- 1.84.1: compile time warnings HOT 3
- pixWriteJp2k: unexpected strong color artifacts on featureless image HOT 7
- pixOrientDetect with .bmp file HOT 6
- Logic error in pixcmapIsValid() HOT 5
- Regression: file not found on MacOS when opening /tmp file HOT 2
- Identifying and removing asterisks HOT 8
- pixDeskewGeneral(...) failing to detect a 45 degree skew? HOT 2
- Application crashing while disposing Pix.Create object HOT 5
- get minarea-rotated box of a skew area HOT 2
- pixRead() can't read png images HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leptonica.