IBM Knowledge Center
After trying mmap, fileno, raw read/write and all the rest, I had to face it. They said IMMPOSIBLE! Then I stop. Anyway, my problem is solved. I just realize hours ago...
Type: Posts; User: fat32
IBM Knowledge Center
After trying mmap, fileno, raw read/write and all the rest, I had to face it. They said IMMPOSIBLE! Then I stop. Anyway, my problem is solved. I just realize hours ago...
Thank you christop. I been working on it! Since I read your reply, I did some serious reading about pointers. For what people say, you can’t master it in a day. I figure a month or two. All day,...
UNBELIEVABLE!
After all these days I’m getting a bit closer: getchar vs getc
https://cboard.cprogramming.com/c-programming/139887-mistake-k-r-bible.html
Heres the output re-formated:
(/ccode/Arrays)$ ./a.out
This is the file on disk. The goal is to read it into
a Array-Buffer. From that point we only use same...
Hello Everybody,
If it’s not one thing, it’s another. .. Just by reading, all of a sudden I want to code for the stack safely/efficiently as possible. However at this moment, my problem is the...
15569
Malloc is getting interesting. I know it is not no play-toy.
Was the original example based on casting to void or did I just do that? Or did I create a memory leak? It happen when I...
Finally trying something that I can recognize:
char *buf2=malloc(len1+1),*p2=buf2;
for (char *b = buf1; *b; b++)
if (!isspace(*b))
*p2++ = *b;
*p2 = '\0';
...
John.c, your code does everything I need as is. That is what I was afraid of. I know how insert code between its main and return. However, the most important thing to do was to include laserlight...
laserlight, the reason why my format is so ugly is by design. Everything is going into a single file. I test every detail to the point of knowing it will never fail. The sample below is what I see...
laserlight, atrocious, could you have use a nicer word. lol
I be trying too speak tech but it don't work. I think I better stick with what I know like that thing-a-ma-jig or that other thang. ...
john.c, what you done is exactly what I am after, again. I can now create additional buffers, in memory, and make calls to functions in the c library, including setting up my own inline loops and...
This is first of many things done in my application. It is written the standard way. I/O to disk. It's not pretty. It's a easy pop-in. All it does is remove spaces.
char ch01;
...
I forgot, I did something like this to copy from buffer to buffer by accident and then I lost it. I was using a for-loop. Anyway, it goes something like this:
buf2 = calloc(*len + 1, 1);
...
I forgot to indicate what I was getting at. When I first started, first thing that came to mind was to copy two files into two separate buffers and from there I thought it would be all I needed to...
The Real Thang - john.c.c
Thank you
_1.txt
123456789_ABCDEFGHI
This line has spaces.
This line has a tab space
How do I remove all leading tabs and spaces
to shift all strings to the left using char...
I’m having a problem copying text from one buffer to another buffer. At the same time I trying to give these buffers something more advance to do because I need to know all limitation as I go. ...
tabstop, It took a minute, now I see your point. I had been doing it along until I started lining up the code and realized that it did not complete the job as expected. In the back of my mind I...
tabstop, you hit the nail on the head about the C Parser. That is why I been trying to learn C since September 2018. It was like yesterday when I read about the weak points of the C parser. I...
Rstanley, no offence but since the invention of INTERNET, from universities to coding forums, people have been sharing code long before you crawled out your diapers. If you need my biography,...
The title says it all. Since following suggestions and studying laserlight code and Googling like crazy since last week, I can now modify C code design for terminal to work for files input/output I...
Laserlight I was just pointing out where I found the example since I jack it all up. I wanted to edit that post yesterday but the edit feature was removed. Too long, I guess. Maybe the...
Kernelpanic is right! Something is wrong with the code itself and the modifications to use files must have brought out the bug. It was working as I stated. I complie and ran it at least 15 or more...
Kernelpanic, for me it works perfectly in all cases. If NO word it works, If one word it works, if one word on 9 lines it works. If four of the same word on one line with another word inbetween...
Tonight I just reduced my HTML file down from a whopping 76K to a tiny 560 bytes with my shiny new c program. All I have to dig out is approx 90% of perfect text. All tags and such are gone!
I’m...