LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-24-2018, 11:19 AM   #16
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512

linuxxer --

GazL has shown you the issue.

And this is still incorrect:
Code:
buff[1024]= '\0'
Maybe refer to K&R ( online first edition ) -- Section 1.9, page 25 ?

This is as old as it gets but arrays of char haven't changed in all these years

HTH.

-- kjh

EDIT: I see this was marked [SOLVED] while I looked for the K&R Link ...

Last edited by kjhambrick; 02-24-2018 at 11:21 AM. Reason: Marked [SOLVED] while I looked for K&R
 
2 members found this post helpful.
Old 02-24-2018, 01:29 PM   #17
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Quote:
Originally Posted by kjhambrick View Post
And this is still incorrect:
Code:
buff[1024]= '\0'
Well, it may be correct if one wanted to right pad each line with spaces to fill the entire buffer and then terminate it, but it's probably not what the OP was intending.

Anyway, I've given up trying to second guess his intentions at this point. I was sure he was trying to replace the \n earlier because it was the only thing that made sense to me and I kind of got tunnel vision on that, but it seems that he was intentionally if mistakenly removing the string terminator, which obviously isn't going to end well.

Oh well, at least we needn't worry about bugs in ncurses.
 
1 members found this post helpful.
Old 02-25-2018, 03:03 AM   #18
linuxxer
Member
 
Registered: Apr 2011
Location: I have my own planet
Distribution: SlackwareŽ
Posts: 257

Original Poster
Rep: Reputation: Disabled
@kjhambrick
Thank you for the link.

@GazL
Thanks for your suggestions.
 
Old 02-25-2018, 06:11 AM   #19
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
You're welcome.

Keep at it. You'll get there.
 
1 members found this post helpful.
Old 02-25-2018, 06:23 AM   #20
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Quote:
Originally Posted by GazL View Post
Well, it may be correct if one wanted to right pad each line with spaces to fill the entire buffer and then terminate it, but it's probably not what the OP was intending.

<<snip>>
Thanks GazL.

You're absolutely correct !

-- kjh
 
  


Reply

Tags
bug, ncurses, slackware current



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NetworkManager-1.0.10-x86_64-1 on -current has a bug with openvpn plugin pasquall Slackware 2 01-07-2016 10:04 PM
Maybe a bug in dhcpcd-6.0.5-x86_64-2 on Slackware64-current jhw Slackware 1 10-02-2013 06:08 AM
[SOLVED] Get current location of window in ncurses flyinggeorge Programming 6 07-26-2013 06:51 AM
[SOLVED] Ncurses bug or ncurses program error. errigour Programming 2 01-24-2013 08:36 AM
[BUG] Current pkgtools installpkg bug jazzor Slackware 7 04-16-2009 05:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration