-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Implement support for multiple 'H' ranges in one field #3
Commits on Oct 21, 2024
-
Implement support for multiple 'H' ranges in one field
If no range is specified, they will return the same number. But if different ranges (optionally with different offsets) are specified, different numbers should be returned due to the different modulo and/or offsets of the ranges. Thus, multiple 'H' with ranges in one field should be allowed for convenience.
Configuration menu - View commit details
-
Copy full SHA for 7ec2355 - Browse repository at this point
Copy the full SHA 7ec2355View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97bbc25 - Browse repository at this point
Copy the full SHA 97bbc25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a605c3 - Browse repository at this point
Copy the full SHA 8a605c3View commit details -
Add util to append multiple strings together
Useful for putting the parsed H fields back together
Configuration menu - View commit details
-
Copy full SHA for 76e59e2 - Browse repository at this point
Copy the full SHA 76e59e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb0687b - Browse repository at this point
Copy the full SHA eb0687bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 14bc349 - Browse repository at this point
Copy the full SHA 14bc349View commit details -
Configuration menu - View commit details
-
Copy full SHA for c519bd9 - Browse repository at this point
Copy the full SHA c519bd9View commit details -
Fix replacement of 'H' in lists
The issue was the missed `free()` of the result fields being merged into the final field. As the original subfields are already freed in `replace_hashed()`, this should now happen in the final free for the list subfields. Also removed the `str_append()` utility, as allocating one big string and filling it with the single results (via sprintf) may take more runtime (for looping twice), but simplifies memory management and improves readability.
Configuration menu - View commit details
-
Copy full SHA for a924bd8 - Browse repository at this point
Copy the full SHA a924bd8View commit details -
Simplify H replacement further, avoid extra res_arr
Contents are identical to subfields. Can simply use it instead
Configuration menu - View commit details
-
Copy full SHA for 7cabf1e - Browse repository at this point
Copy the full SHA 7cabf1eView commit details
Commits on Oct 22, 2024
-
Use
strcpy
instead of rewriting the whole field for 'H' replacementIt requires tracking of the substring lens, but it should be more efficient with shorter writes.
Configuration menu - View commit details
-
Copy full SHA for 14c4ef1 - Browse repository at this point
Copy the full SHA 14c4ef1View commit details -
Add more tests for 'H' in lists
Regarding parsability, combinability with other options
Configuration menu - View commit details
-
Copy full SHA for 3989f92 - Browse repository at this point
Copy the full SHA 3989f92View commit details -
Configuration menu - View commit details
-
Copy full SHA for f01bb90 - Browse repository at this point
Copy the full SHA f01bb90View commit details -
fix: concat regular fields mixed with 'W' fields properly
Add commas when needed. Also use strcpy and a tracking pointer to make copying more efficient
Configuration menu - View commit details
-
Copy full SHA for ad5be5d - Browse repository at this point
Copy the full SHA ad5be5dView commit details -
Make errors in H replacement more resilient
Free the accum_field and subfields always if an error occurs during field replacement (in a list) and they were malloced
Configuration menu - View commit details
-
Copy full SHA for 3ccbfcf - Browse repository at this point
Copy the full SHA 3ccbfcfView commit details