Forum > Windows

optimized sources

<< < (37/179) > >>

Urs Echternacht:

--- Quote from: seti_britta on 11 Jul 2007, 05:38:31 pm ---if I compile I get 2 warings, as you can see in 'xml_match_tag' and 'xml_find_tag'
maybe this make the trouble.....
Code wird generiert...
c:\i\sc\seti\seti_boinc_2k3_2.2b-ben-joe\db\xml_util.cpp(663) : warning C4717: 'xml_match_tag': Rekursiv für alle Steuerelementpfade. Die Funktion verursacht einen Stapelüberlauf zur Laufzeit.
c:\i\sc\seti\seti_boinc_2k3_2.2b-ben-joe\db\xml_util.cpp(689) : warning C4717: 'xml_find_tag': Rekursiv für alle Steuerelementpfade. Die Funktion verursacht einen Stapelüberlauf zur Laufzeit.
Kompilieren...
------------------------------------------------------------------------------------------------------------------------
and here is the code ---->
// return true if the tag appears in the line
//
bool xml_match_tag(char* buf,  char* tag) {
    ...
}


bool xml_match_tag(const std::string &s, char* tag)
{
   return xml_match_tag(s.c_str(),tag);
663 }    <----- here

size_t xml_find_tag( char* buf, char* tag) {
...
}

std::string::size_type xml_find_tag(const std::string &s, char* tag)
{
   std::string::size_type p=xml_find_tag(s.c_str(),tag);
   return (p!=strlen(s.c_str()))?p:(std::string::npos);
689 }      <------- here
----------------------------------------------------------------------------------------------------------
have anybody of you a idea to prevent this
your suggestions are welcome....
regards heinz

--- End quote ---
Hallo heinz,
benenne doch einfach mal die beiden Funktionen size_t xml_find_tag( char* , char* ) und bool xml_match_tag(char* ,  char* ) um, um zu sehen, ob Compiler sich hier nicht irrt. Es scheint mir ja fast so, als würde er den Unterschied zwischen den 'überladenen' Funktionen nicht erkennen. Vergiss nicht die beiden Aufrufe in den Funktionen bool xml_match_tag(const std::string & , char* ) und std::string::size_type xml_find_tag(const std::string & , char* ) ebenfalls abzuändern. Falls der Compiler jetzt immer noch mögliche Endlosschleifen zu sehen glaubt, dann verbirgt sich an dieser Stelle wirklich ein Problem. Falls an dieser Stelle jetzt alles O.K. ist, einfach die Funktionsnamen wieder zurück ändern und die Warnung mit einer #pragma-Anweisung (und Kommentar warum sie da steht) abschalten.

Falls jemand eine bessere Idee hat, bitte mitteilen.

(my idea: compiler does not recognize the overloaded functions. My suggestion is trying to proof that. If the compiler is actually wrong i suggested to shut down especially the given warning with #pragma command.
If someone has a better idea, please tell.)

_heinz:
I believe I should write a new function. As it is now written, I don´t like the construct.
Work is going on, be patient.
Regards heinz

_heinz:

--- Quote from: seti_britta on 13 Jun 2007, 11:24:33 am ---Hi all,
I use a dual monitor installation for working. My second Monitor died last night.  :'(
Today I ordered a new 22" multisync flatscreen from LG. Expected in ca. 4 days.


 

--- End quote ---
Last week, after a month of waiting I got the monitor. I ordered a silver colored monitor and when I opened the package I get a black one.  I installed it, but it does not run properly( letters total blurred and fuzzy, in a distance of all 3cm). It was a desaster. So I sent these damaged hardware back to the shop and ordered back my money.  All this trouble takes me a lot of time. Now I installed a 10 years old MAG CRT Monitor MX17S, it works fine and the letters are clear and exact written on it. Have some old hardware lying around in my working area, so this was possible.
To recreate myself from this desaster  I set up a diskless Pentium 200Mhz w98 workstation to test the last MMX application of seti. Here you can see it running.
----------!----
regards seti_britta ~heinz

_heinz:
Hi all,
my diskless dual 200MMX machine is now crunching. It is a NT4 workstation and runs the client as a service. Two MMX-clients run simultan. If you want read something about it go to dual 200MMX. Enjoy
It is time to continue the work on the optimized client now.
regards seti_britta~heinz

_heinz:
I have a problem with the CPU usage at the MMX dual machine.
Here are 2 pictures that show what I mean.
Any hints are welcome.

[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version