🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.lib.bug
Article #49

iostream bug/fix on Sequent Symmetry

#49
From: Jason Merrill
Date: Sat, 28 Mar 1992 23:24
65 lines
1717 bytes
sbufvscan.C uses strol to read in integers, but the Sequent doesn't have
strtol in libc.

Since the strtoul which comes with iostream checks for unary minus and seems
to process it correctly, just changing all references to strtol into
references to strtoul works fine.

Diffs:

*** sbufvscan.C~	Sat Mar 28 15:22:30 1992
--- sbufvscan.C	Sat Mar 28 15:23:00 1992
***************
*** 178,184
  			/* FALLTHROUGH */
  		case 'd':
  			c = CT_INT;
! 			ccfn = (u_long (*)(const char, char**, int))strtol;
  			base = 10;
  			break;
  

--- 178,184 -----
  			/* FALLTHROUGH */
  		case 'd':
  			c = CT_INT;
! 			ccfn = strtoul;
  			base = 10;
  			break;
  
***************
*** 184,190
  
  		case 'i':
  			c = CT_INT;
! 			ccfn = (u_long (*)(const char, char**, int))strtol;
  			base = 0;
  			break;
  

--- 184,190 -----
  
  		case 'i':
  			c = CT_INT;
! 			ccfn = strtoul;
  			base = 0;
  			break;
  
***************
*** 266,272
  			if (isupper(c))
  				flags |= LONG;
  			c = CT_INT;
! 			ccfn = (u_long (*)(const char, char**, int))strtol;
  			base = 10;
  			break;
  		}

--- 266,272 -----
  			if (isupper(c))
  				flags |= LONG;
  			c = CT_INT;
! 		        ccfn = strtoul;
  			base = 10;
  			break;
  		}
Technical Details
Message-ID: <1992Mar28.232443.6635@muddcs.claremont.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!jarthur.claremont.edu!jason

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.lib.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!jarthur.claremont.edu!jason
From: jason@jarthur.claremont.edu (Jason Merrill)
Subject: iostream bug/fix on Sequent Symmetry
Message-ID: <1992Mar28.232443.6635@muddcs.claremont.edu>
Sender: gnulists@ai.mit.edu
Organization: Harvey Mudd College
Distribution: gnu
Date: Sat, 28 Mar 1992 23:24:43 GMT
Approved: bug-lib-g++@prep.ai.mit.edu
Lines: 69