aboutsummaryrefslogtreecommitdiff
path: root/lib/libfigpar/figpar.c
Commit message (Collapse)AuthorAgeFilesLines
* Refactor error handling in lseek operationsFaraz Vahedi2024-09-211-18/+12
| | | | | | | | | | | | | | | | | | | | | | | | 1. Subtraction was performed on the current position regardless of the success of the lseek operation. In the event of an error, this resulted in the current position being erroneously set to -2, which bypassed the intended error handling mechanism. The proposed change performs error checking immediately following the lseek operation, prior to any modification of the current position. This ensures that a failed lseek operation will correctly trigger the appropriate error handling. 2. The error checking logic was based on the assumption that lseek would return `offset - 1` upon failure. However, this is not consistent with the behaviour of lseek as specified in the POSIX standard, which stipulates that lseek shall return -1 in case of an error. The code has been updated to reflect this standard, improving reliability and compliance. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1392
* Remove unused includes, migrate to stdint.h for uintXX_t types.Faraz Vahedi2024-09-211-1/+0
| | | | | Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1392
* lib: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Make figpar(3) types/macros [more] unique (s/fp_/figpar_/gi)Devin Teske2015-11-021-21/+26
| | | | Notes: svn path=/head/; revision=290275
* Add new libraries/utilities for data throughput visualization.Devin Teske2014-11-041-0/+469
dpv(3): dialog progress view library dpv(1): stream data from stdin or multiple paths with dialog progress view figpar(3): configuration file parsing library Reviews: D714 Reviewed by: jelischer, shurd Discussed at: MeetBSD California 2014 Vendor/Dev Summit Discussed on: -current MFC after: 21 days X-MFC-to: stable/10 stable/9 Notes: svn path=/head/; revision=274116