Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update stb #885

Merged
merged 1 commit into from
Dec 23, 2023
Merged

Update stb #885

merged 1 commit into from
Dec 23, 2023

Conversation

mataha
Copy link
Contributor

@mataha mataha commented Aug 14, 2023

This PR attempts to update stb in the most straightforward way possible as well as include fixes from main repo's unmerged PRs for cases rearing their ugly heads during everyday usage:

  • stb#1299: stb_rect_pack: Make rect_height_compare a stable sort
  • stb#1402: stb_image: Fix "unused invalid_chunk" with STBI_FAILURE_USERMSG
  • stb#1404: stb_image: Fix gif two_back memory address
  • stb#1420: stb_image: Improve error reporting if file operations fail within *_from_file functions
  • stb#1445: stb_vorbis: Few static analyzers fixes
  • stb#1487: stb_vorbis: Fix residue classdata bounding for f->temp_memory_required
  • stb#1490: stb_vorbis: Fix broken clamp in codebook_decode_deinterleave_repeat
  • stb#1496: stb_image: Fix pnm only build
  • stb#1497: stb_image: Fix memory leaks if stbi__convert failed
  • stb#1498: stb_vorbis: Fix memory leaks in stb_vorbis
  • stb#1499: stb_vorbis: Minor change to prevent the undefined behavior - left shift of a negative value
  • stb#1500: stb_vorbis: Fix signed integer overflow

Includes additional small fixes that I felt didn't warrant a separate PR.

PR note: the attached image should display correctly when using printimage.com built from this branch; version from master spews errors and crashes.

Image

media_Ej4qfYzXYAA69S1

@mataha mataha force-pushed the stb branch 7 times, most recently from de86ca5 to 3e8300e Compare August 15, 2023 18:33
@mataha mataha marked this pull request as ready for review August 15, 2023 18:37
Copy link
Owner

@jart jart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for your contribution.

I just need one process hurdle from you first before I can merge. Can
you please send an email to [email protected] saying "I intend to assign
you the copyright to the changes I contribute to Cosmopolitan"? It only
applies to the changes you choose to contribute. It only needs to happen
once. If your employer owns everything you do, then you'll need to clear
it with them first. Please do that if you need to and get it on the
record. Thanks!

@mataha
Copy link
Contributor Author

mataha commented Aug 22, 2023

Looks good to me. Thanks for your contribution.

I just need one process hurdle from you first before I can merge. Can you please send an email to [email protected] saying "I intend to assign you the copyright to the changes I contribute to Cosmopolitan"? It only applies to the changes you choose to contribute. It only needs to happen once. If your employer owns everything you do, then you'll need to clear it with them first. Please do that if you need to and get it on the record. Thanks!

Already done; did it land in spam?

(force-pushing as I forgot to remove two instances of STBV_NOTUSED)

│ │
│ stb_truetype │
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you put the copyright of the original authors back? Even though this is a public domain library, it's a bad look for me to impose further restrictions on its use, even if they are as minor as the ISC license. My intent is for the STB code in this folder of the cosmopolitan repo to keep being public domain.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I've reverted my changes.

@mataha mataha force-pushed the stb branch 2 times, most recently from 746b7d5 to 73451d5 Compare November 8, 2023 20:35
@mataha mataha force-pushed the stb branch 2 times, most recently from ead2ac3 to 106f016 Compare December 23, 2023 00:36
This commit and, by extension, PR attempts to update `stb` in the most
straightforward way possible as well as include fixes from main repo's
unmerged PRs for cases rearing their ugly heads during everyday usage:

 - stb#1299: stb_rect_pack: Make rect_height_compare a stable sort
 - stb#1402: stb_image: Fix "unused invalid_chunk" with STBI_FAILURE_USERMSG
 - stb#1404: stb_image: Fix gif two_back memory address
 - stb#1420: stb_image: Improve error reporting if file operations fail
   within *_from_file functions
 - stb#1445: stb_vorbis: Few static analyzers fixes
 - stb#1487: stb_vorbis: Fix residue classdata bounding for
   f->temp_memory_required
 - stb#1490: stb_vorbis: Fix broken clamp in codebook_decode_deinterleave_repeat
 - stb#1496: stb_image: Fix pnm only build
 - stb#1497: stb_image: Fix memory leaks if stbi__convert failed
 - stb#1498: stb_vorbis: Fix memory leaks in stb_vorbis
 - stb#1499: stb_vorbis: Minor change to prevent the undefined behavior -
   left shift of a negative value
 - stb#1500: stb_vorbis: Fix signed integer overflow

Includes additional small fixes that I felt didn't warrant a separate PR.
@jart jart merged commit 1bc48bc into jart:master Dec 23, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants