We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
getline()
*
,
When trying to convert to V using ./c2v on Neved4/twc.c#L85
./c2v
while ((read = getline(&line, &len, fp)) != -1) {
C to V translator 0.4.0 translating wcs.c ... wcs.v:4:25: error: unexpected token `*`, expecting `,` 2 | module main 3 | 4 | fn getline(__linep Char **restrict, __linecapp Size_t *restrict, __stream FILE *restrict) Ssize_t | ^ 5 | 6 | struct Lldiv_t { Internal vfmt error while formatting file: wcs.v. Encountered a total of: 1 errors. took 121 ms ; output .v file: wcs.v Translated 1 files in 122 ms.
Can reproduce with:
#include <stdio.h> #include <stdlib.h> int main() { char *input = NULL; size_t len = 0; ssize_t read; printf("Enter text (Ctrl+D to quit):\n"); read = getline(&input, &len, stdin); if (read != -1) { printf("Entered: %s", input); return 0; } printf("error reading input\n"); free(input); return 0; }
The text was updated successfully, but these errors were encountered:
error: unexpected token
, expecting
expecting
error
&Type
*Type
strftime()
Char
Successfully merging a pull request may close this issue.
When trying to convert to V using
./c2v
on Neved4/twc.c#L85Code
Output
MWE
Can reproduce with:
The text was updated successfully, but these errors were encountered: