f



Resetting IOS Flags

I'd be very grateful if anyone could tell me what's wrong with the
following code.

The line "os.setf( oldflags, ios::basefield);"
gives 2 compilation errors:
"invalid conversion from 'long int' to 'std::_Ios_Fmtflags'"
&
"initializing argument 1 of 'std::_Ios_Fmtflags
std::ios_base::setf(std::_Ios_Fmtflags,std::_Ios_Fmtflags)"

/*
 * friend output operator
 * Parameters:
 *   os   - output stream to write to
 *   bigi - Big_int to print value of
 * Return value:
 *   reference to os
 */
ostream & operator << ( ostream &os,
                        const Big_int & bigi )
{
  long oldflags = os.setf( ios::hex, ios::basefield);

  char old_fill = os.fill('0');
  bool leading_zero = true;

  for( int i = bigi.size_ - 1; i >= 0; i-- ) {
    if ( ! leading_zero )
      os.width(8);
    if ( bigi.number_[i] != 0)
      leading_zero = false;
    else if (i != 0 && leading_zero)
      continue;
    os << bigi.number_[i];
  }

  os.fill(old_fill);
  os.setf( oldflags, ios::basefield);

  return os;
}

	Mark Hinchcliffe
0
8/26/2003 5:48:59 PM
comp.os.msdos.djgpp 3308 articles. 2 followers. tigrepotrazosalvaje (34) is leader. Post Follow

0 Replies
216 Views

Similar Articles

[PageSpeed] 0

Reply:

Similar Artilces:

ios steram flags vs ios_base stream flags
Hi all. I found this page when I googled for help with fstreams: http://www.functionx.com/cpp/articles/filestreaming.htm Some of these flags are really useful, ios::nocreate, for instance. But my compiler doesn't like any of the variations on that page. It prefers ios_base::in instead of ios::in. Why is this? Which of these variations are standardised (ANSI/ISO)? How does one achieve what, say, the ios::nocreate flag does, with only the ios_base set of flags available? Rune -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. Fi...

Problem with ios::flags
Hi! Please consider the following fragment std::cin.exceptions(std::ios::failbit); .... try { is.getline(p,ILEN); ... } catch (std::ios::failure const &problem) { if (WHAT HERE?) { // '\n' not found yet } else { // Real failure } } How do I tell a real failure from just ILEN-2 chars already read but not yet '\n'? Thanks for any help. Paulo da Silva wrote: > Hi! > Please consider the following fragment > > std::cin.exceptions(std::ios::failbit); > ... > try &...

MSDOS 6.21 and djgpp
Is there a way to run djgpp in msdos 6.21 16 bit I know. Bill > Is there a way to run djgpp in msdos 6.21 16 bit I know. Sure. That's what I run DJGPP under. Bill Cunningham wrote: "Is there a way to run djgpp in msdos 6.21 16 bit I know." DJ Delorie wrote: "Sure. That's what I run DJGPP under." Nice. What PC do you have ? M$-DOS does NOT WORK on mine, and it is definitely not a high-end product: only 1 CPU, only 32 bit, <1GHz, HD's <10GB, <1GB RAM, ... But there are other good DOSes working on newer PC's: DR-DOS, FreeDOS, PTS-DOS, ... :-) > Nice. What PC do you have ? M$-DOS does NOT WORK on mine, > and it is definitely not a high-end product: only 1 CPU, > only 32 bit, <1GHz, HD's <10GB, <1GB RAM, ... Well, DJGPP was originally written on a 4Mb 20 MHz 386 running DOS 6.2 and a pair of 1Gb scsi disks, but currently I run it on a 266MHz pentiumII laptop and linux's DOSEMU. DJ Delorie wrote: >>Nice. What PC do you have ? M$-DOS does NOT WORK on mine, >>and it is definitely not a high-end product: only 1 CPU, >>only 32 bit, <1GHz, HD's <10GB, <1GB RAM, ... > > > Well, DJGPP was originally written on a 4Mb 20 MHz 386 running DOS 6.2 > and a pair of 1Gb scsi disks, but currently I run it on a 266MHz > pentiumII laptop and linux's DOSEMU. Isn't it scary out there on the bleeding edge of technology? :-) -- Joe Wright "...

Rocket IO reset problem
Hello, I currently work on Rocket IO in vertex II pro with eval board. I succeed loopback test in parallel mode, but when I extend to the serial path, it didn't work quite well. In particular, When push the reset button, everything become chaos. So, I have to push it several times to get the system back. Once it get back, it receives data correctly. I couldn't find the mistake. I terminated SMA and gave reset signal after dcm phase is locked. Does anybody has any reference code to start with ? Any inputs will be appreciated. Jdon. How are you doing your byte alignment and your ...

reset without reset
Well not DSP actually but... Given a clock and set of flip-flops and gates is it possible to produce just one pulse? Flip-flops can start at random state. After a while I came to conclusion that it is not possible. Reasoning: 1) There can be only 2^N states where N is number of flip-flops Then we have two possibilities a) there is a loop. If the system starts at state inside the loop we get repeated sequence. That is many pulses. b) there is no loop. Then there must exist some final state. If the system starts at the final state we get no pulse at all. What do you think ? Actu...

To Flag or Not To Flag? That is the question....
Hello I am working on a database to track sales reps involved on a sale. I would like to flag the sales rep that initiated the sale but read that creating fields used to flag are not recommended. Can anyone provide a suggestion of another way to track this information? Below is how my db is structured (and thank you Roger from this news group with all your help with creating this structure) tblOrder salesOrderID salesAmount customerName tblOrderRep salesOrderID repID flag (this is the field i was going to add to flag which rep initiated the sale) tblRep repID repName tier upline Thank you in advance for your time and advice. Matt On Oct 14, 3:13=A0pm, spima05 <mspilot...@gmail.com> wrote: > Hello > > I am working on a database to track sales reps involved on a sale. I > would like to flag the sales rep that initiated the sale but read that > creating fields used to flag are not recommended. Can anyone provide a > suggestion of another way to track this information? > > Below is how my db is structured (and thank you Roger from this news > group with all your help with creating this structure) > > tblOrder > =A0 =A0salesOrderID > =A0 =A0salesAmount > =A0 =A0customerName > > tblOrderRep > =A0 =A0salesOrderID > =A0 =A0repID > =A0 =A0flag (this is the field i was going to add to flag which rep > initiated the sale) > > tblRep > =A0 =A0repID > =A0 =A0repName > =A0 ...

iPhone OS becomes iOS
This is from ipodnn.com. Back in April, Jobs said it would be available for the iPad this fall. In an unexpected turn, Apple has announced that it is renaming the iPhone OS. It will now simply be called iOS, reflecting its use on devices like the iPad. As previously revealed, the iOS 4 firmware brings several important changes including multitasking, app folders, a universal inbox and e-mail threading. Newly disclosed though is integration with the iPhone 4 retina display, and updated Camera and Photos apps. As rumored, Bing has been added as a web search option alongside Go...

IO::Seekable::getpos missing (auto/IO/IO.so not loading) ?
Greetings, I just did a fresh install of Solaris 10 on Sparc. The OS ships with perl_5.8.4. When I run some of my scripts that run fine on Linux, I get this: IO::Seekable::getpos missing at /usr/local/lib/perl5/5.8.6/FileHandle.pm line 59. Compilation failed in require at /home/steve/Development/Tools/common/putil/Eq/Util/FileHandleObj.pm line 6. Looking around in various discussion groups, I see that others have had similar problems on other platforms, and in two cases it has been suggested that auto/IO/IO.so is not loading. I guess IO.so must contain the missing getpos method. ...

OS X Dock Resets to Default
I have had this to me every now and then with my Dock and Favorites. The dock reverts back to its default icons, and my favorites get wiped out. I have done the repair permissions a hundred times and this still happens. What can I do? jimohagan <jimohagan@hotmail.com> wrote: > I have had this to me every now and then with my Dock and Favorites. > The dock reverts back to its default icons, and my favorites get wiped > out. I have done the repair permissions a hundred times and this still > happens. What can I do? When you figure out why this happens, let me know; I see it...

DJGPP, OS/2 and LFN-Support
Hello, is it possible to create long filenames on OS/2 with a DJGPP program? Thanks, Hans-Juergen > From: Hans-Juergen Taenzer <Hans-Juergen.Taenzer@t-online.de> > Newsgroups: comp.os.msdos.djgpp > Date: 29 Oct 2003 21:04:00 +0100 > > is it possible to create long filenames on OS/2 with a DJGPP program? Does OS/2 support the LFN API via Int 21h? Eli Zaretskii (eliz@elta.co.il) wrote: >> From: Hans-Juergen Taenzer <Hans-Juergen.Taenzer@t-online.de> >> Newsgroups: comp.os.msdos.djgpp >> Date: 29 Oct 2003 21:04:00 +0100 >> >> is it possible to create long filenames on OS/2 with a DJGPP >> program? > Does OS/2 support the LFN API via Int 21h? I don't know. I want to port a *ix program (using SQLite) to OS/2 without having access to OS/2. I think i have to ask the OS/2 gurus. Thank you for your response! Hans-Juergen From Hans-Juergen Taenzer <Hans-Juergen.Taenzer@t-online.de>: > is it possible to create long filenames on OS/2 with a DJGPP program? Eli Zaretskii responded: > Does OS/2 support the LFN API via Int 21h? Hans-Juergen Taenzer: > I don't know. I want to port a *ix program (using SQLite) to OS/2 without > having access to OS/2. > I think i have to ask the OS/2 gurus. I used OS/2 through Warp 4 until it bombed out mysteriously and trashed my hard drive data on or about April 6, 2001. OS/2 supported long file names on HPFS but not on FAT, and there was...

How to reset Mac OS 9.2
Hi, Warning: I am totally neewbie to Mac. The other day I found an iMac on the tip which I brought home. It was complete with mouse and keyboard. When I started it up, it seem to be working, but the user accounts are all password protected. Is there any way of resetting the machine to clear the old user accounts? Is it possibe to download a free copy of an old MacOS which I can install on the machine. Preferable MacOS 9.2. Any tips are welcomed. Thanks, Rune slinnings <rune@slinnings.com> wrote: > The other day I found an iMac on the tip > Any tips are welcomed. Evidently...

Starting a New OS called iOS
Hello Friends, I am planning to write a new OS named iOS, which will be primarily for educational purpose. My aim is to make it secure by having a micro-kernel. All the drivers will be kept outside the kernel ring. This OS is intended for i386 platform but should be able to be ported to different architectures. From startup this is my idea. Many of the codes will be shamelessly copied from a GNU GPL licenced OS like linux etc., Any of you who may want to help me and/or join me are always welcome. That's it for now. Do contact me at : perlshine007@users.sourceforge.net perlshine wrote: > > Hello Friends, > I am planning to write a new OS named iOS, which will be primarily > for educational purpose. My aim is to make it secure by having a > micro-kernel. All the drivers will be kept outside the kernel ring. > This OS is intended for i386 platform but should be able to be ported > to different architectures. From startup this is my idea. Many of the > codes will be shamelessly copied from a GNU GPL licenced OS like linux > etc., > Good luck with that? Look up "hurd" and see how that's doing. You can even use it as the base of your new OS, I graduate in 2010, maybe you will have something ready by then? -- Regards, Harry Phillips Why not use minix or qnx or perhaps openqnx ? Another os is not what this world need. On 15 Aug 2004 16:16:35 -0700, perlshine <perlshine007@yahoo.com> wrote: > Hello Friends, > I...

Which OS more suited for using DJGPP: Win98SE or WinME?
Hi. Recently, I will be reformatting and reinstalling the OS for my desktop PC which I'll be primarily using for learning programming using assembler and DJGPP. So now I've a choice between installing Win98SE or WinME. Since WinME has already taken out DOS 16 real-mode support, does it cripple or affect programming with DJGPP and running programs generated by DJGPP's C compiler? Is it safer and more trouble-free to stick with Win98SE instead? Apparently, I saw a couple of postings in this newsgroup from users on WinME complaining they run into a whole lot of trouble trying to get WinME to work with DJGPP. I maybe writing programs that attempts to access BIOS and memory directly using assembly languages or calling int86 function in C. Plus fiddling in good old DEBUG.COM. Any advice would be very much appreciated. Thank you. Goh, Yong-Kwang Singapore Goh, Yong Kwang <gohyongkwang@hotmail.com> wrote: > Recently, I will be reformatting and reinstalling the OS for my > desktop PC which I'll be primarily using for learning programming > using assembler and DJGPP. So now I've a choice between installing > Win98SE or WinME. I'd choose 98SE any time. WinME offers essentially nothing but additional nuisances and obstacles in comparison. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain. > From: gohyongkwang@hotmail.com (Goh, Yong Kwang) > Newsgroups: comp.os.msdos.djg...

Cat OS -> IOS Conversation Tool
Hi , I remember there was a tool which converts Cat OS commands in IOS But on the Cisco side I doesn't found it anymore... An help for me ? Udo You may wish to investigate the Catalyst OS to Cisco IOS Configuration Converter: http://www.cisco.com/cgi-bin/Support/CatCfgConversion/catcfg_xlat.pl Sincerely, Brad Reese Cisco Router Port Matrix http://www.bradreese.com/cisco-router-port-matrix.htm ...

OS X, iOS and Linux have more vulnerabilities than Windows
Hello.... OS X, iOS and Linux have more vulnerabilities than Windows Read more here: http://betanews.com/2015/02/22/os-x-ios-and-linux-have-more-vulnerabilities-than-windows/ Thank you, Amine Moulay Ramdane. ...

java.sql.SQLException: Io exception: Connection reset
I have a Java WEB APplication which connects to my Oracle DB Server 9.2.0.4 which is on IBM AIX 5.1L. My Application Server (Tomcat) is on HP DL580's Sometimes when I access my Application via browser, it is not able to connect to my DB (becos my login screen says: Invalid Username/Password) When I check my TOMCAT LOG FILES it says following: ------------------------------------------------------------------ [Ajp13Processor[8009][6]][ERROR] (?:?) - SQLException during the execution of the query (for a com.phs3.data.ojb.security.UserImpl): Io exception: Connection reset java.sql.SQLException: Io exception: Connection reset at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333) at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2529) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527) at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown Source) at com.phx.db.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAccessImpl.java:68) at org.apache.ojb.broker.accesslayer.RsQueryObject.perform...

CPU usage peaks when running OS commands that does both io
We have two node Oracle 9.2.0.4 Enterprise Edition cluster in Red Hat AS 2.1. Both the instances that are in those servers read/write to OCFS filesystem in SAN. All the hardwares are Dell. Whenever a OS command that does both io like cp, mv, tar, gzip etc. is run the CPU usage peaks to around 100%. All the database utilities like exp/imp or DMS/DLLs run fine. In other words no complaints on database side. Currently we can't move/copy database backups because of this or we can't run RMAN in NFS. We have asynch IO turned on, if that has to do anything with this problem...Any pointer to resolve this problem would be greatly appreciated. Thanks, SP SP wrote: > We have two node Oracle 9.2.0.4 Enterprise Edition cluster in Red Hat AS > 2.1. Both the instances that are in those servers read/write to > OCFS filesystem in SAN. All the hardwares are Dell. Whenever a OS command > that does both io like cp, mv, tar, gzip etc. is run the CPU > usage peaks to around 100%. All the database utilities like exp/imp or > DMS/DLLs run fine. In other words no complaints on database side. > Currently we can't move/copy database backups because of this or we can't > run RMAN in NFS. We have asynch IO turned on, if that has to do > anything with this problem...Any pointer to resolve this problem would be > greatly appreciated. > Thanks, > SP <RHETORICAL> You wouldn't happen to be with a very large company in Florida tha...

os io unit , db block size relation
Hi , I am trying to find the optimal size for a datawarehouse system which contains oracle , redhat linux 2.1 ,ocfs and emc , raid 10 , datawarehouse > 1tb. My db block size is 16kb. statfs call against the filesystems which oracle data resides returns 512 as the optimal block size. When i create a directory in one of the ocfs file systems , its size is 32K. sar -d reports some values in blks/s . I want to connect all these info but i cant. Here is my questions: 1. How can i find the os io unit ? How much data does (not only in blocks , but also in bytes) the os transfer in each read ? 2. Since i use ocfs which use direct io (no os buffering) , can i say that all database ios are 16kb? (Since this is db block size) Or are all ios issued by db server 512 bytes?(Since statfs returns 512 as the optimal block size)Or are all ios issued by db server 32kb. (this is the ocfs block size) 3. I want to monitor the raid subsytem by comparing the disk io done by dbserver and os. I use v$filestat oracle table to get the number of disk reads in block , than sar -d or iostat but how can i understand what os block exactly mean in sar and iostat outputs? 16kb, 512bytes or 32kb? Kind Regards, hope utkanbir wrote: > statfs call against the filesystems which oracle data resides returns > 512 as the optimal block size. > On ocfs you are not buffering so, I believe, the value you read in f_bsize is the physical block (512 byte). (You are accessing the DMA "la...

Inconsistency between os.getgroups and os.system('groups') after os.setgroups()
Run this test program as root: import os print "before:", os.getgroups() os.system("groups") os.setgroups([]) print "after:", os.getgroups() os.system("groups") After the os.setgroups, os.getgroups says that the process is not in any gr= oups, just as you would expect. However the groups command run using os.sy= stem says that the process is in the root group. It appears that the new p= rocess started by os.system augments the group membership specified in the = os.setgroups command with the group of the actual user of the original proc= ess (which is root). I can suppress membership in the root group only by d= oing os.setgid and os.setuid before the os.system call (in which case I win= d up in the group of the new user instead of root), but I have to be able t= o get back to root privilege so I can't use setgid and setuid. How do I ru= n a program from a Python script running as root such that the group member= ship of the process running the program does not include root? Am 25.03.2012 23:32, schrieb jeff: > After the os.setgroups, os.getgroups says that the process is not in > any groups, just as you would expect... I can suppress > membership in the root group only by doing os.setgid and os.setuid > before the os.system call (in which case I wind up in the group of > the > new user instead of root), but I have to be able to get back to root > privilege so I can't use setgid and setuid. Simply ...

Install OS X from OS 9.2 and OS X .dmg files
Hi, I have : * the 3 disk images .dmg "Mac OS X 10.3 Panther final install disk 1", 2 and 3 retrieved from the 'chocolate' network (Gnutella), * an iMac with Mac OS 9.2, * a CD-RW drive with HotBurn (Iomega). What would you suggest me to do now to boot my iMac with Panther? Which pieces of the puzzle do I miss? TIA Fr�d�ric tomcat <noone@nodomain.int> wrote: > What would you suggest me to do now to boot my iMac with Panther? Buy the CDs. > Which pieces of the puzzle do I miss? Integrity. -- Mike Rosenberg <http://www.macconsult.co...

Old crypto weakness in current OS X, iOS, (and Android ...)
QUOTE (From NYT) A government policy that forbade the export of products with strong encryption in the 1990s has years later left users of devices like Android and Apple phones vulnerable to hackers when they visit one-third of all websites, including whitehouse.gov and nsa.gov. Researchers last month discovered millions of devices and websites were using an outdated encryption key to secure their communications. The weak key resulted from a Clinton administration mandate that software and hardware makers use weak cryptography in products exported outside the United States. ...

IOS descriptions and IOS for the 3560
I just brought in a 3560 switch that has 12.2(25)SEB2 installed. Looking at the Cisco site I see that 12.2(25)SEC2 and 12.2(25)SEB4 are also available. It appears as though I am already running the latest release, but I am just curious what the SEC and SEB designations are for. I tried to find this on the Cisco site but I must not be looking in the right place. http://www.cisco.com/en/US/products/hw/switches/ps5528/prod_release_notes_list.html >I just brought in a 3560 switch that has 12.2(25)SEB2 installed. Looking at >the Cisco site I see that 12.2(25)SEC2 and 12.2(25)SEB4 ...

IOS to IOS VPN Problem
I have 2 2611 with a 12.2.15 IOS and proper IOS VPN configs, however I get the same messages on both routers: *Mar 1 16:40:42.117: IPSEC(key_engine): major = 1 *Mar 1 16:40:42.117: IPSEC(key_engine): expired_timer I'm a newbie to IOS VPN and troubleshooting so I'm not sure what to look at from here. ...

os.pipe() + os.fork()
--Sig_/DfRt9Dxw+_.=lNFY4dG045U Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi, I have a problem using os.pipe() together with os.fork(). Usually when the writing end of the pipe is closed, the reading end gets EOF. So subsequent attempts to read data will return an empty string. But when you call os.fork() after you have created a pipe using os.pipe(), and read data from the pipe in the child process, when the partent process has already closed the writing end, the reading end does not get EOF. Instead of the os.read() call in the child process is b...

Web resources about - Resetting IOS Flags - comp.os.msdos.djgpp

Speaker of the House John Boehner on resetting America’s economic foundation - YouTube
Speaker John Boehner (R-OH) delivers his five-point policy vision to reset America’s economy. He discusses how the emerging energy boom in the ...

Neuroscience suggests resetting the clock on 'coming of age'
New techniques for tracking brain growth show radical change extends into at least the mid-20s.

University deregulation: Top-tier institutions call for end to political process, resetting of debate ...
Australia's leading research universities call for a depoliticised process to reset the higher education debate.

Cycle of Life: Resetting L.A.'s Smoking Deaths Billboard
Ushering in the New Year at the Smoking Deaths billboard above Santa Monica Boulevard in West L.A. has become a somewhat morbid yet surprisingly ...

Resetting the net: Snowden and surveillance
One year after Edward Snowden exposed the spying at the NSA, can the internet be re-set?

Resetting Uncle Sam’s Clocks
Allison Schrager wants the US to simplify its time zones: This year, Americans on Eastern Standard Time should set their clocks back one hour ...

Don't Change Your Google Password Before Factory Resetting Your Android Phone - You Might Trip A 72-Hour ...
This isn't a news story, but more of a "public service announcement" about an Android feature not everyone may be aware of. If you've ended up ...

Resetting your DNS cache
Ever find yourself in a situation where a web site is loading on one device and not another? Or, perhaps, you just registered a new domain name ...

Resetting the Astros' roster
Resetting the Astros' roster

Resetting the Philadelphia Eagles' Draft Board
The Philadelphia Eagles have been—and might very well continue to be—very busy in free agency. As a result, their draft board is constantly evolving... ...

Resources last updated: 3/22/2016 5:57:02 PM