RE: LyX fails to create .lyx

2001-03-15 Thread Juergen Vigna


On 14-Mar-2001 Lars Gullik Bjnnes wrote:

 This is directly from 1.1.6 cvs. Jean-Marc, has any changes gone in
 that could result in something like this?

I noticed that with 1.2.0cvs of last week the lastfiles was also saved
in ~/ and not in ~/.lyx. But this seemed fixed now!

   Jrgen

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jrgen VignaE-Mail:  [EMAIL PROTECTED]
Italienallee 13/N   Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen   Web: http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

You may get an opportunity for advancement today.  Watch it!




Re: What's wrong with the new Tables!?

2001-03-15 Thread Lars Gullik Bjønnes

Juergen Vigna [EMAIL PROTECTED] writes:

| On 14-Mar-2001 Jean-Marc Lasgouttes wrote:
| 
|  And what about the other changes I see, like
|  -   if (line != "/cell") {
|  +   if (!prefixIs(line, "/cell")) {
| 
|  Should they be applied too?
| 
| Sorry Jean-Marc I forgot about them, YES the /xxx should also be changed
| to check only the prefix because with getline as we have it now its
| /cell\r instead of /cell. Otherwise we could strip trailing \r in
| l_getline which may be the better solution. What do you think?

We should strip it.

Lgb



Re: New Arrival

2001-03-15 Thread Michael S. Tsirkin

Hello!
Quoting r. Kalle Dalheimer ([EMAIL PROTECTED]) "Re: New Arrival":
 
   One of the problems is that the STL version shipped with MS Visual C++ is
   severely broken.
 
  This would not be a problem in this case (Btw the g++ lib is broken as
  well...)
 
 Yes. In my experience, the only non-broken STL implementation on Linux is the 
 one in KCC.

In Intel we are using STLport for development
on Linux (g++), HP (aCC) and Windows (VC++) quite successfully.

http://stlport.org/

STLport is free as in speech, it has a license similiar to LGPL.

It has high degree of ANSI compatibility (even working around bugs
in compilers to resent to the user ANSI interface) and very good 
performance.

It also has some nice features like debug mode, and compatibility 
macros which allows mixing STLport with built-in STL in compiler
(important for e.g. QT port).

Also, if you find bugs, you can always fix them :)

Regards,
MSt

-- 
This message content is not part of Intel's views or affairs
Michael S. Tsirkin
   Four things are to be strengthened: Torah,and good deeds,
   prayer and one's good manners (Berachoth)



mathed57.diff

2001-03-15 Thread Andre Poenitz


I attach a diff of my local tree against current CVS.

The changes in math_iter.[hC] are purely cosmetical.

The crucial difference is the removel of MathedRowSt and the use of a
std::vectorMathedRowStrict instead of the handcrafted list of
MathedRowSt's.

I also removed the insert_after() function in favour of a more standard-
like insert. The insert_after was sometimes off by one so that might have
been the reason for the spurious crashes Lars has seen.

Behaviour _has_ changed, e.g. hitting Ctrl-Return in an array gives a new
line with the cursor placed at the end of the new line, whereas it used to
stay at the beginning. This can be fixed easily now, I just did not want 
to blow up the patch.

The only "real" problem I am aware of (apart from the old macro issue) is
\nolimits, it is saved properly but not read back. Chasing this bug should
be easier with this patch applied since MathedRowContainer is _much_
simpler now.

The Userguide is read and displayed properly as far as I can tell, there
are quite a few changes after saving but seemingly only whitespace and
(text-) table differences. There is a message about a missing \end_inset
when reading in the first time. I have not checked yet why, it does not
abort reading anyway and the result looks ok.

Andre'

-- 
Andr Pnitz  [EMAIL PROTECTED]


Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.63
diff -u -p -r1.63 ChangeLog
--- ChangeLog   2001/03/12 13:58:11 1.63
+++ ChangeLog   2001/03/15 09:04:26
@@ -1,6 +1,12 @@
 
+2001-03-15  Andr Pnitz  [EMAIL PROTECTED]
+   * math_rowst.h: Finally remove MathedRowSt
+
+   * math_parser.C:
+ math_xiter.C: changed accordingly
+
 2001-03-12  Andr Pnitz  [EMAIL PROTECTED]
-   *   math_rowst.h: replace MathedRowSt with MathedRowSt,
+   *   math_rowst.h: replace MathedRowSt with MathedRowStruct,
more robust MathedRowSt::[gs]etTab (to get rid of the constructor arg)
 
 2001-03-10  Andr Pnitz  [EMAIL PROTECTED]
Index: math_cursor.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_cursor.C,v
retrieving revision 1.44
diff -u -p -r1.44 math_cursor.C
--- math_cursor.C   2001/03/09 08:45:10 1.44
+++ math_cursor.C   2001/03/15 09:04:26
@@ -82,7 +82,9 @@ struct MathStackXIter {
}
 
MathedXIter * Item(int idx) {
-   return (idx + 1 = i) ? item[i - idx - 1] : 0;
+   if (idx + 1  i)
+   cerr  "Wrong index: "  idx  " i: "  i  endl;
+   return item[i - idx - 1];
}
 
void Reset() {
Index: math_iter.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_iter.C,v
retrieving revision 1.41
diff -u -p -r1.41 math_iter.C
--- math_iter.C 2001/03/06 10:24:45 1.41
+++ math_iter.C 2001/03/15 09:04:26
@@ -60,6 +60,15 @@ void MathedIter::fcode(short c) const
fcode_ = c; 
 }
 
+byte MathedIter::at(int p) const
+{
+   return (*array)[p]; 
+}
+
+byte  MathedIter::at(int p)
+{
+   return (*array)[p]; 
+}
 
 int MathedIter::Empty() const
 {
@@ -75,8 +84,8 @@ int MathedIter::OK() const
 
 void MathedIter::Reset()
 {
-   if (array-last()  0  MathIsFont((*array)[0])) {
-   fcode((*array)[0]);
+   if (array-last()  0  MathIsFont(at(0))) {
+   fcode(at(0));
pos   = 1;
} else {
fcode(-1);
@@ -90,23 +99,23 @@ void MathedIter::Reset()
 byte MathedIter::GetChar() const
 {
if (IsFont()) {
-   fcode((*array)[pos]);
+   fcode(at(pos));
++pos;
}
-   return (*array)[pos];
+   return at(pos);
 }
 
 
 string const MathedIter::GetString() const
 {
if (IsFont()) {
-   fcode((*array)[++pos]);
+   fcode(at(++pos));
++pos;
}
 
string s;
-   for (; (*array)[pos] = ' '  pos  array-last(); ++pos)
-   s += (*array)[pos];
+   for (; at(pos) = ' '  pos  array-last(); ++pos)
+   s += at(pos);
 
return s;
 }
@@ -120,7 +129,7 @@ MathedInset * MathedIter::GetInset() con
return p;
} else {
lyxerr  "Math Error: This is not an inset["
-   (*array)[pos]  "]"  endl;
+   at(pos)  "]"  endl;
return 0;
}
 }
@@ -143,7 +152,7 @@ bool MathedIter::Next()
if (!OK())
return false;
 
-   if ((*array)[pos]  ' ') {
+   if (at(pos)  ' ') {
fcode(-1);
if (IsTab())
++col;
@@ -159,7 +168,7 @@ bool MathedIter::Next()
++pos;
 
if (IsFont()) 
-   

Re: mathed57.diff

2001-03-15 Thread Lars Gullik Bjønnes

Andre Poenitz [EMAIL PROTECTED] writes:

| I attach a diff of my local tree against current CVS.
| 
| The changes in math_iter.[hC] are purely cosmetical.

What about the crashes in mathcursor/iter?

Lgb



Re: mathed57.diff

2001-03-15 Thread Andre Poenitz

 | I attach a diff of my local tree against current CVS.
 | 
 | The changes in math_iter.[hC] are purely cosmetical.
 
 What about the crashes in mathcursor/iter?

Do you still see any?

It would be nice if you had anything reproducible...

Since the insert* methods in MathRowContainer have been wrong, anything
involving them could have crashed. MathMatrixInset e.g. "copied" its RowSt
in Metrics() so this could have been the culprit. 

This "copy" was changed from "copy if empty" to "copy everytime" on
10/3/2001 in order to "fix" the drawing nuisance where a complete empty
line at the end of a matrix stayed on screen after a row had been deleted.
[It could even be that the bug was lurking there all the time and we
simply triggered it now in "more unsual situations"]

This change was wrong anyway (not in spirit, but as implemented) since it
created new MathedRowStructs everytime thus losing the number/label/...
information.

So we could either revert to 9/3/2001 or try to complete the RowStruct
changes. The patch aims for the latter and I think we get pretty close.

Andre'


-- 
Andr Pnitz  [EMAIL PROTECTED]



Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread Edwin Leuven

 Comments, flames, suggestions?

Personally I think that it is better to do one dialog at a time and to make 
sure that that is fully functional. This is much more transparent and also 
easier to check and comment on. Fine tuning can then be done later on.

gr.ed.



Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread John Levon

On 14 Mar 2001, Lars Gullik Bjønnes wrote:

 diff -upN
 rdiff -upN
 update -dP
 
 the 'N' make the diff take new and deleted files into consideration.

except cvs diff is broken. You also need to run Amir's "fixdiff.pl" on
the patch, http://www.movement.uklinux.net/

I tried the other day to add this functionality to patch (along with a
prefix-append-always-succeeds option) but that is some really really scary
code...

(no wonder it hasn't been touched for years despite its flaws)

john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread John Levon

On Wed, 14 Mar 2001, Kalle Dalheimer wrote:

 Hi,
 
 I finally got all my stuff to compile with the current CVS version. Here is 
 my first patch. Sorry, it is pretty big, but I'd rather get everything in now 
 so that I can make small incremental patches on this stuff in the future and 
 can see compile breaks right away.

Hi Kalle glad you got some time for this :)

One thing though, you will need to thrash out with Edwin a consistent filename
scheme. You currently both have different naming schemes ...

thanks
john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: Resize while rendering/startup

2001-03-15 Thread John Levon

On Thu, 15 Mar 2001, Roman Fietze wrote:

 When starting LyX with a document containing a larger PS-Image on the
 first page, LyX starts rendering after downloading the fonts. I resized
 (enlarged) the LyX Window as soon as I saw the first few lines of text,
 the WM-decoration (fvwm2) moved down, but the status line of LyX stayed at
 the old position, the unused space between this status line and the WM
 decoration was gray. The scrollbar on the right side enlarged partially,
 the down button of the scrollbar was the height of the unused space (say
 the triangle was very high), so this down button reached from the LyX
 status line to the bottom of the resized window.

This is a known bug and I doubt it will get fixed. It's basically a "don't-do-that"
thing at the moment :(

john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




How to add a file?

2001-03-15 Thread Andre Poenitz


I'd like to have a math_rowst.C, but I can't do 'cvs add'.

Any ideas? 

Andre'

-- 
Andr Pnitz  [EMAIL PROTECTED]



Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread John Levon

On Thu, 15 Mar 2001, Edwin Leuven wrote:

  Comments, flames, suggestions?
 
 Personally I think that it is better to do one dialog at a time and to make 
 sure that that is fully functional. This is much more transparent and also 
 easier to check and comment on. Fine tuning can then be done later on.
 
 gr.ed.

You are probably right, but bear in mind these are forward ports
of stuff Kalle had already done so in this case ...

john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread Lars Gullik Bjønnes

John Levon [EMAIL PROTECTED] writes:

| On 14 Mar 2001, Lars Gullik Bjnnes wrote:
| 
|  diff -upN
|  rdiff -upN
|  update -dP
|  
|  the 'N' make the diff take new and deleted files into consideration.
| 
| except cvs diff is broken.

Is it? news to me.

Lgb



Re: How to add a file?

2001-03-15 Thread Lars Gullik Bjønnes

Andre Poenitz [EMAIL PROTECTED] writes:

| I'd like to have a math_rowst.C, but I can't do 'cvs add'.

sure you can. but only if you do as I have told you to use cvs.lyx.org
(and thus your account there) instead of anoncvs.lyx.org.

Lgb



Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread Edwin Leuven

 You are probably right, but bear in mind these are forward ports
 of stuff Kalle had already done so in this case ...

I still think they should go in one at a time and complete. For the moment 
Kalle's patch only adds the files. Of these files only the citation is added 
to the Makefile but the dialog is not connected.

As I said, it makes things just more transparent at little cost. But perhaps 
Kalle and I should discuss this while we are at the naming scheme :-)

gr.ed.



Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread John Levon

On 15 Mar 2001, Lars Gullik Bjønnes wrote:

 John Levon [EMAIL PROTECTED] writes:
 
 | On 14 Mar 2001, Lars Gullik Bjønnes wrote:
 | 
 |  diff -upN
 |  rdiff -upN
 |  update -dP
 |  
 |  the 'N' make the diff take new and deleted files into consideration.
 | 
 | except cvs diff is broken.
 
 Is it? news to me.
 
 Lgb

well maybe it is my local setup !


pg008:1009 head -1 ~/.cvsrc
diff -uNp


pg008:1011 cvs -v
 
Concurrent Versions System (CVS) 1.10.7 (client/server)
  


It will produce files like :

diff -N combox.h
--- /tmp/cvshKKAFX  Thu Mar 15 12:29:12 2001
^^
+++ /dev/null   Tue May  5 22:32:27 1998   
+  


Index: src/frontends/xforms/combox.C
===
RCS file: combox.C
diff -N combox.C
--- /dev/null   Tue May  5 22:32:27 1998
+++ combox.CThu Mar 15 12:29:11 2001


which break patch

john


-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread Lars Gullik Bjønnes

John Levon [EMAIL PROTECTED] writes:


| which break patch

so you are saying that this breaks patch:

Index: MAINTAINERS
===
RCS file: MAINTAINERS
diff -N MAINTAINERS
--- /dev/null   Tue May  5 22:32:27 1998
+++ MAINTAINERS Thu Mar 15 12:36:57 2001
@@ -0,0 +1,3 @@
+Mathed
+Andr Pnitz
[EMAIL PROTECTED]


of course it should be patched with 

patch -p0  patchfile

What about this:

Index: MAINTAINERS
===
RCS file: MAINTAINERS
diff -N MAINTAINERS
--- /dev/null   Tue May  5 22:32:27 1998
+++ MAINTAINERS Thu Mar 15 12:39:52 2001
@@ -0,0 +1,3 @@
+Mathed
+Andr Pnitz
[EMAIL PROTECTED]
Index: src/mathed/array.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/array.C,v
retrieving revision 1.15
diff -u -p -r1.15 array.C
--- src/mathed/array.C  2001/03/06 10:24:45 1.15
+++ src/mathed/array.C  2001/03/15 11:39:54
@@ -14,7 +14,6 @@
 using std::ostream;
 using std::endl;
 
-// Is this still needed? (Lgb)
 static inline
 void * my_memcpy(void * ps_in, void const * pt_in, size_t n)
 {


I think you belive it breaks because you are either diffing in the
wrong dir or patching in the wrong dir.

Lgb



[PATCH] remove KeyMap dialog

2001-03-15 Thread John Levon


The attached patch removes the KeyMap dialog which
is part of FormPrefs now, and moves combox into 
frontends/xforms since that was the last src/ dependency

keymaps seem to still work fine for me

thanks
john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers

 intl.diff.gz


Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread John Levon

On 15 Mar 2001, Lars Gullik Bjønnes wrote:

 John Levon [EMAIL PROTECTED] writes:
 
 
 | which break patch
 
 so you are saying that this breaks patch:
 
 Index: MAINTAINERS
 ===
 RCS file: MAINTAINERS
 diff -N MAINTAINERS
 --- /dev/null Tue May  5 22:32:27 1998
 +++ MAINTAINERS   Thu Mar 15 12:36:57 2001
 @@ -0,0 +1,3 @@
 +Mathed
 +André Pönitz
 [EMAIL PROTECTED]
 

Try this with a file in a subdirectory !

 +++ src/mathed/array.C2001/03/15 11:39:54
 @@ -14,7 +14,6 @@
  using std::ostream;
  using std::endl;
  
 -// Is this still needed? (Lgb)
  static inline
  void * my_memcpy(void * ps_in, void const * pt_in, size_t n)
  {

patches that aren't new/deleted files aren't affected by the problem

 I think you belive it breaks because you are either diffing in the
 wrong dir or patching in the wrong dir.

bzzt

I "believe it breaks" because it does break. Ask JMarc about my old patches
that didn't apply properly. It was because of this problem.

Any new/deleted file in a subdirectory is not handled properly, hence the need
for the script.

I can stop using the script if you want but I don't think anyone will appreciate
them having to tidy up ;)

Now it may be my version of cvs or something but you can't just pretend there isn't
a problem. I've attached the unfixed version of my intl.diff so you can see exactly
what I mean

john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers


 a.diff.gz


[PATCH] low-hanging fruit

2001-03-15 Thread John Levon


Doing lyx -x lyx-quit big.lyx,  the attached patch
gives the following results (warm cache, error around 4%) :

user (s)| sys (s)   | elapsed (s)   |
--
28.33 (0.00%)   | 0.30 (0.00%)  | 29.61 (0.00%) | newinsetsold
24.29 (-14.27%) | 0.32 (6.61%)  | 25.92 (-12.48%)   | newinsetsnew

and the binary is only 14k bigger (with -g -O). This seems worth it to me.

The top of the profile looks like this with the patch applied :
 
LyXParagraph::InsertChar(int, char, LyXFont const )[0x08146e5c]: 1.0553% (10233 
samples)
LyXParagraph::GetChar(int) const[0x08148210]: 1.1648% (11295 samples)
basic_string...::compare(char const *, unsigned int, unsigned int) 
const[0x08288a38]: 1.3048% (12652 samples)
LyXText::GetFont(Buffer const *, LyXParagraph *, int) const[0x08173358]: 1.4893% 
(14441 samples)
LyXFont::FontBits::eq(LyXFont::FontBits const ) const[0x081110f4]: 1.5215% (14753 
samples)
LyXFont::realize(LyXFont const )[0x08111af0]: 1.5622% (15148 samples)
boost::shared_ptrLyXFont * find_ifboost::shared_ptrLyXFont *, 
ShareContainerLyXFont::isEqual(boost::shared_ptrLyXFont *, 
boost::shared_ptrLyXFont *, ShareContainerLyXFont::isEqual, 
random_access_iterator_tag)[0x082d5dc0]: 1.6546% (16044 samples)
Buffer::parseSingleLyXformat2Token(LyXLex , LyXParagraph *, LyXParagraph *, 
basic_stringchar, string_char_traitschar, __default_alloc_templatetrue, 0  const 
, int , char , LyXFont )[0x080a45d4]: 1.8889% (18316 samples)
__7LyXFont[0x0870]: 2.3485% (22772 samples)
LyXParagraph::GetFontSettings(BufferParams const , int) const[0x0814750c]: 3.3957% 
(32927 samples)
LyXText::GetRow(LyXParagraph *, int, int ) const[0x08172b40]: 63.7895% (618541 
samples)


thanks
john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers


Index: src/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.95
diff -u -p -r1.95 ChangeLog
--- src/ChangeLog   2001/03/15 10:06:52 1.95
+++ src/ChangeLog   2001/03/15 11:53:15
@@ -1,3 +1,10 @@
+2001-03-15  John Levon  [EMAIL PROTECTED]
+
+   * lyxrow.h:
+   * lyxrow.C: inline some get() accessors. This
+   adds about 14k to the binary but speeds up a
+   large file load by about 10%.
+
 2001-03-14  Angus Leeming  [EMAIL PROTECTED]
 
* lyxfunc.C (Dispatch): removed redundant break statement.
Index: src/lyxrow.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxrow.C,v
retrieving revision 1.4
diff -u -p -r1.4 lyxrow.C
--- src/lyxrow.C2000/07/24 13:53:17 1.4
+++ src/lyxrow.C2001/03/15 11:53:15
@@ -29,30 +29,12 @@ void Row::par(LyXParagraph * p)
 }
 
 
-LyXParagraph * Row::par()
-{
-   return par_;
-}
-
-
-LyXParagraph * Row::par() const
-{
-   return par_;
-}
-
-
 void Row::pos(LyXParagraph::size_type p)
 {
pos_ = p;
 }
 
 
-LyXParagraph::size_type Row::pos() const
-{
-   return pos_;
-}
-
-
 void Row::fill(int f)
 {
fill_ = f;
@@ -71,24 +53,12 @@ void Row::height(unsigned short h)
 }
 
 
-unsigned short Row::height() const
-{
-   return height_;
-}
-
-
 void Row::width(unsigned int w)
 {
width_ = w;
 }
 
 
-unsigned int Row::width() const
-{
-   return width_;
-}
-
-
 void Row::ascent_of_text(unsigned short a)
 {
ascent_of_text_ = a;
@@ -119,19 +89,7 @@ void Row::next(Row * r)
 }
 
 
-Row * Row::next() const
-{
-   return next_;
-}
-
-
 void Row::previous(Row * r)
 {
previous_ = r;
-}
-
-
-Row * Row::previous() const
-{
-   return previous_;
 }
Index: src/lyxrow.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxrow.h,v
retrieving revision 1.10
diff -u -p -r1.10 lyxrow.h
--- src/lyxrow.h2000/07/24 13:53:17 1.10
+++ src/lyxrow.h2001/03/15 11:53:15
@@ -26,13 +26,13 @@ public:
///
void par(LyXParagraph * p);
///
-   LyXParagraph * par();
+   inline LyXParagraph * par();
///
-   LyXParagraph * par() const;
+   inline LyXParagraph * par() const;
///
void pos(LyXParagraph::size_type p);
///
-   LyXParagraph::size_type pos() const;
+   inline LyXParagraph::size_type pos() const;
///
void fill(int f);
///
@@ -40,11 +40,11 @@ public:
///
void height(unsigned short h);
///
-   unsigned short height() const;
+   inline unsigned short height() const;
///
void width(unsigned int w);
///
-   unsigned int width() const;
+   inline unsigned int width() const;
///
void ascent_of_text(unsigned short 

Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread Kalle Dalheimer

On Thursday, 15. March 2001 12:26, John Levon wrote:
 On Thu, 15 Mar 2001, Edwin Leuven wrote:
   Comments, flames, suggestions?
 
  Personally I think that it is better to do one dialog at a time and to
  make sure that that is fully functional. This is much more transparent
  and also easier to check and comment on. Fine tuning can then be done
  later on.
 
  gr.ed.

 You are probably right, but bear in mind these are forward ports
 of stuff Kalle had already done so in this case ...

Exactly. All the rest is going to be dialog-by-dialog.

Kalle

-- 
Matthias Kalle Dalheimer
President  CEO/VD
Klarlvdalens Datakonsult AB
Fax +46-563-540028
Email [EMAIL PROTECTED]



Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread Lars Gullik Bjønnes

John Levon [EMAIL PROTECTED] writes:

| I "believe it breaks" because it does break. Ask JMarc about my old patches
| that didn't apply properly. It was because of this problem.
| 
| Any new/deleted file in a subdirectory is not handled properly,
| hence the need for the script.

So what you are saying is that if you create the diff in the directly
with the new files and patch in the same dir there are no problems.

Lgb



Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread John Levon

On 15 Mar 2001, Lars Gullik Bjønnes wrote:

 John Levon [EMAIL PROTECTED] writes:
 
 | I "believe it breaks" because it does break. Ask JMarc about my old patches
 | that didn't apply properly. It was because of this problem.
 | 
 | Any new/deleted file in a subdirectory is not handled properly,
 | hence the need for the script.
 
 So what you are saying is that if you create the diff in the directly
 with the new files and patch in the same dir there are no problems.
 
 Lgb

I think that would work yes (not sure about deleted files). 
But you do not want several patches in various different
directories, I am guessing.

It is no problem for you anyway since you don't need to diff ;)

john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: [PATCH] low-hanging fruit

2001-03-15 Thread Lars Gullik Bjønnes

John Levon [EMAIL PROTECTED] writes:

| Doing lyx -x lyx-quit big.lyx,  the attached patch
| gives the following results (warm cache, error around 4%) :
| 
| user (s)| sys (s)   | elapsed (s)   |
| --
| 28.33 (0.00%)   | 0.30 (0.00%)  | 29.61 (0.00%) | newinsetsold
| 24.29 (-14.27%) | 0.32 (6.61%)  | 25.92 (-12.48%)   | newinsetsnew
| 
| and the binary is only 14k bigger (with -g -O). This seems worth it
| to me.

Measure size with 'size'.

Lgb



Re: How to add a file?

2001-03-15 Thread Andre Poenitz

 sure you can. but only if you do as I have told you to use cvs.lyx.org
 (and thus your account there) instead of anoncvs.lyx.org.

I think I never got that working... Ah.. I remember. Our "firewall".

I need to force ssh to use non-priviledged port by using the -P command
line switch. And this won't work with an alias, since it can't be exec'd.

Ok. I just made a two line shell "script" and it seems to work.

But know I have to give my password on every 'cvs diff' (which I do quite
often). I think this can be solved by putting my public identity in
.ssh/authorized_keys on baywatch, but I don't know whether this is a save
and approved way.

Andre'


-- 
Andr Pnitz  [EMAIL PROTECTED]



Re: [PATCH] low-hanging fruit

2001-03-15 Thread John Levon

On 15 Mar 2001, Lars Gullik Bjønnes wrote:

 John Levon [EMAIL PROTECTED] writes:
 
 | Doing lyx -x lyx-quit big.lyx,  the attached patch
 | gives the following results (warm cache, error around 4%) :
 | 
 | user (s)| sys (s)   | elapsed (s)   |
 | --
 | 28.33 (0.00%)   | 0.30 (0.00%)  | 29.61 (0.00%) | newinsetsold
 | 24.29 (-14.27%) | 0.32 (6.61%)  | 25.92 (-12.48%)   | newinsetsnew
 | 
 | and the binary is only 14k bigger (with -g -O). This seems worth it
 | to me.
 
 Measure size with 'size'.
 
 Lgb

ugh, yes, sorry

hold on

john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: [PATCH] low-hanging fruit

2001-03-15 Thread Lars Gullik Bjønnes

John Levon [EMAIL PROTECTED] writes:

| Doing lyx -x lyx-quit big.lyx,  the attached patch
| gives the following results (warm cache, error around 4%) :
| 
| user (s)| sys (s)   | elapsed (s)   |
| --
| 28.33 (0.00%)   | 0.30 (0.00%)  | 29.61 (0.00%) | newinsetsold
| 24.29 (-14.27%) | 0.32 (6.61%)  | 25.92 (-12.48%)   | newinsetsnew
| 
| and the binary is only 14k bigger (with -g -O). This seems worth it to me.

I don't want this patch yet.

If you have lines like:

do_something(with_this.size());

and widh_this.size() is inlined and do_something segfaults, the
segfault can look like it happened inside with_this.size(). 

Also when having inlines in the header file, alway put the inlined
method after the class definithin with an inline, in the class inline
should not be used:

class Foo {
publi:
int size();
};

inline
Foo::size() {
return ...;
}


As you can see with this it is _very_ easy to move the inlined method
from the header file to the C file (and back).

I have been thinking of a scheme where we can choose at compile time
if we want to have methods like this inlined or not.

foo.h:
class Foo {
public:
int size();
};

#ifdef INLINE_SIMPLE_METHODS
#define INLINE inline
#include "foo_inlines.h"
#endif

foo_inlines.h:
INLINE
Foo::size() {
return ...;
}

foo.C:
#ifndef INLINE_SIMPLE_METHODS
#define INLINE
#include "foo_inlines.h"
#endif


Or another scheme that gives the same effect.

Lgb



Re: [PATCH] low-hanging fruit

2001-03-15 Thread John Levon

On Thu, 15 Mar 2001, John Levon wrote:

 On 15 Mar 2001, Lars Gullik Bjønnes wrote:
 
  John Levon [EMAIL PROTECTED] writes:
  
  | Doing lyx -x lyx-quit big.lyx,  the attached patch
  | gives the following results (warm cache, error around 4%) :
  | 
  | user (s)| sys (s)   | elapsed (s)   |
  | --
  | 28.33 (0.00%)   | 0.30 (0.00%)  | 29.61 (0.00%) | newinsetsold
  | 24.29 (-14.27%) | 0.32 (6.61%)  | 25.92 (-12.48%)   | newinsetsnew
  | 
  | and the binary is only 14k bigger (with -g -O). This seems worth it
  | to me.
  
  Measure size with 'size'.
  
  Lgb

hum, now I'm really confused :

pg008:1050 size lyx
   textdata bss dec hex filename
2643515   19332   43100 2705947  294a1b lyx
pg008:1051 size lyxnew
   textdata bss dec hex filename
2638043   19332   43100 2700475  2934bb lyxnew
pg008:1053 expr 2638043 - 2643515
-5472

"lyxnew" is the one with the patch !!!

huh ??

john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: [PATCH] low-hanging fruit

2001-03-15 Thread John Levon

On 15 Mar 2001, Lars Gullik Bjønnes wrote:

 John Levon [EMAIL PROTECTED] writes:
 
 | Doing lyx -x lyx-quit big.lyx,  the attached patch
 | gives the following results (warm cache, error around 4%) :
 | 
 | user (s)| sys (s)   | elapsed (s)   |
 | --
 | 28.33 (0.00%)   | 0.30 (0.00%)  | 29.61 (0.00%) | newinsetsold
 | 24.29 (-14.27%) | 0.32 (6.61%)  | 25.92 (-12.48%)   | newinsetsnew
 | 
 | and the binary is only 14k bigger (with -g -O). This seems worth it to me.
 
 I don't want this patch yet.
 
 If you have lines like:
 
 do_something(with_this.size());
 
 and widh_this.size() is inlined and do_something segfaults, the
 segfault can look like it happened inside with_this.size(). 

and this is reason enough to not have this speedup ??

 Also when having inlines in the header file, alway put the inlined
 method after the class definithin with an inline, in the class inline
 should not be used:

ok, sorry

 #ifdef INLINE_SIMPLE_METHODS
 #define INLINE inline
 #include "foo_inlines.h"
 #endif
 
 foo_inlines.h:
 INLINE
 Foo::size() {
 return ...;
 }
 
 foo.C:
 #ifndef INLINE_SIMPLE_METHODS
 #define INLINE
 #include "foo_inlines.h"
 #endif

well as described, if not inlined this will have copies of Foo:size()

Also I don't think IMHO it makes sense to inline hardly-used accessor methods
(or maybe it does). I suppose it depends on architecture what kind of effect
this will have on .text size

thanks
john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: [PATCH] low-hanging fruit

2001-03-15 Thread Lars Gullik Bjønnes

John Levon [EMAIL PROTECTED] writes:

| hum, now I'm really confused :
| 
| pg008:1050 size lyx
|textdata bss dec hex filename
| 2643515   19332   43100 2705947  294a1b lyx
| pg008:1051 size lyxnew
|textdata bss dec hex filename
| 2638043   19332   43100 2700475  2934bb lyxnew
| pg008:1053 expr 2638043 - 2643515
| -5472
| 
| "lyxnew" is the one with the patch !!!
| 
| huh ??

So it inlined nicely and the function call is completely removed and no
code generated for it.

Lgb



Re: [PATCH] low-hanging fruit

2001-03-15 Thread John Levon

On 15 Mar 2001, Lars Gullik Bjønnes wrote:

 John Levon [EMAIL PROTECTED] writes:
 
 | hum, now I'm really confused :
 | 
 | pg008:1050 size lyx
 |textdata bss dec hex filename
 | 2643515   19332   43100 2705947  294a1b lyx
 | pg008:1051 size lyxnew
 |textdata bss dec hex filename
 | 2638043   19332   43100 2700475  2934bb lyxnew
 | pg008:1053 expr 2638043 - 2643515
 | -5472
 | 
 | "lyxnew" is the one with the patch !!!
 | 
 | huh ??
 
 So it inlined nicely and the function call is completely removed and no
 code generated for it.
 
 Lgb

Yes I realised after I sent it it made sense. I'm not sure why "ls" at home
claimed it was larger ... (here ls has the same difference too)

I really do think the speedup is significant enough to live with the debugging 
problem...
(and it will also apply to normal use of lyx rather than just loading as far as I can 
see ?)

thanks
john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: [PATCH] low-hanging fruit

2001-03-15 Thread Lars Gullik Bjønnes

John Levon [EMAIL PROTECTED] writes:

|  and widh_this.size() is inlined and do_something segfaults, the
|  segfault can look like it happened inside with_this.size(). 
| 
| and this is reason enough to not have this speedup ??

Yes, I belive a more detrministic development environment is reason
enough.

And as said, I am thinking about schemes to inline importent small
methods again, but not just now.
 
|  Also when having inlines in the header file, alway put the inlined
|  method after the class definithin with an inline, in the class inline
|  should not be used:
| 
| ok, sorry
| 
|  #ifdef INLINE_SIMPLE_METHODS
|  #define INLINE inline
|  #include "foo_inlines.h"
|  #endif
|  
|  foo_inlines.h:
|  INLINE
|  Foo::size() {
|  return ...;
|  }
|  
|  foo.C:
|  #ifndef INLINE_SIMPLE_METHODS
|  #define INLINE
|  #include "foo_inlines.h"
|  #endif
| 
| well as described, if not inlined this will have copies of Foo:size()

??? yes, that was the purpose...
 
| Also I don't think IMHO it makes sense to inline hardly-used accessor methods
| (or maybe it does). I suppose it depends on architecture what kind of effect
| this will have on .text size

One-liner getter methods will almost alway inline perfectly and
generate less code than a "full" method. So I belive that in most
cases getters should be made inline, most of the setters should be
inline (if very simple). Methods that are only wrappers around other
methods can be inlined.

Lgb



Re: [PATCH] low-hanging fruit

2001-03-15 Thread John Levon

On 15 Mar 2001, Lars Gullik Bjønnes wrote:

 John Levon [EMAIL PROTECTED] writes:
 
 |  and widh_this.size() is inlined and do_something segfaults, the
 |  segfault can look like it happened inside with_this.size(). 
 | 
 | and this is reason enough to not have this speedup ??
 
 Yes, I belive a more detrministic development environment is reason
 enough.

your call

 | well as described, if not inlined this will have copies of Foo:size()
 
 ??? yes, that was the purpose...

I mean there will be one in foo.C AND non-inlined copies in anything including foo.h. 
Or am I talking crap again

john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: [PATCH] low-hanging fruit

2001-03-15 Thread Lars Gullik Bjønnes

John Levon [EMAIL PROTECTED] writes:

| I mean there will be one in foo.C AND non-inlined copies in anything including 
|foo.h. 
| Or am I talking crap again

foo_inlines.h should only be included in foo.h if
INLINE_SIMPLE_METHODS is defined.

Lgb



Re: [PATCH] low-hanging fruit

2001-03-15 Thread John Levon

On 15 Mar 2001, Lars Gullik Bjønnes wrote:

 foo_inlines.h should only be included in foo.h if
 INLINE_SIMPLE_METHODS is defined.
 
 Lgb

*sigh*

I really do have problems with reading :P

john 

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: [PATCH] low-hanging fruit

2001-03-15 Thread Juergen Vigna


On 15-Mar-2001 John Levon wrote:

 I really do think the speedup is significant enough to live with the debugging
 problem...

What debugging problem? I compile with only -g option and then inlined code
is no problem on debugging!

   Jrgen

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jrgen VignaE-Mail:  [EMAIL PROTECTED]
Italienallee 13/N   Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen   Web: http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

Reality is just a convenient measure of complexity.
-- Alvy Ray Smith




Re: [PATCH] low-hanging fruit

2001-03-15 Thread Lars Gullik Bjønnes

Juergen Vigna [EMAIL PROTECTED] writes:

| On 15-Mar-2001 John Levon wrote:
| 
|  I really do think the speedup is significant enough to live with the debugging
|  problem...
| 
| What debugging problem? I compile with only -g option and then inlined code
| is no problem on debugging!

Well I consider compiling without -O an even bigger problem. Then a lot
of small problems will not be noticed until you compile with
optimization turned on.

Lgb



mathed58.diff

2001-03-15 Thread Andre Poenitz


This should be a cure for the 'missing \nonumber after read'.

Next step is to move the inline hacks to math_rowst.C and it really starts
looking better...

Andre'

-- 
Andr Pnitz  [EMAIL PROTECTED]


Index: math_parser.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_parser.C,v
retrieving revision 1.42
diff -u -p -r1.42 math_parser.C
--- math_parser.C   2001/03/15 10:10:01 1.42
+++ math_parser.C   2001/03/15 13:01:22
@@ -424,9 +424,6 @@ void mathed_parse(MathedArray  array, u
int acc_brace = 0;
int acc_braces[8];
MathParInset * mt = (mtx) ? *mtx : 0;
-   MathedRowContainer::iterator crow;
-   if (mt)
-   crow = mt-getRowSt().begin();
 
++plevel;
MathedIter data(array);
@@ -604,8 +601,7 @@ void mathed_parse(MathedArray  array, u
case LM_TK_NEWLINE:
if (mt  (flags  FLAG_END)) {
if (mt-Permit(LMPF_ALLOW_CR)) {
-   mt-getRowSt().insert(crow);
-   ++crow;
+   mt-getRowSt().push_back();
data.insert('K', LM_TC_CR);
} else 
mathPrintError("Unexpected newline");
@@ -757,8 +753,11 @@ void mathed_parse(MathedArray  array, u
break;

case LM_TK_NONUM:
-   if (crow)
-   crow-setNumbered(false);
+   if (mt) {
+   if (!mt-getRowSt().data_.size())
+   mt-getRowSt().push_back();
+   mt-getRowSt().back().setNumbered(false);
+   }
break;

case LM_TK_PMOD:
@@ -869,7 +868,6 @@ void mathed_parse(MathedArray  array, u
}
mt-SetStyle(size);
mt-SetType(mathed_env);
-   crow = mt-getRowSt().begin();
}

lyxerr[Debug::MATHED]  "MATH BEGIN["  mathed_env 
 "]"  endl;
@@ -914,8 +912,8 @@ void mathed_parse(MathedArray  array, u
panic = true;
break;
} 
-   if (crow) {
-   crow-setLabel(yytext.data());
+   if (mt) {
+   mt-getRowSt().back().setLabel(yytext.data());
} else {
mathed_label = yytext.data();
}
Index: math_rowst.C
===
RCS file: math_rowst.C
diff -N math_rowst.C
Index: math_rowst.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_rowst.h,v
retrieving revision 1.11
diff -u -p -r1.11 math_rowst.h
--- math_rowst.h2001/03/15 10:10:01 1.11
+++ math_rowst.h2001/03/15 13:01:22
@@ -44,10 +44,8 @@ public:
void setNumbered(bool nf);
///
void setTab(unsigned int i, int t);
-   ///
-   friend class MathedRowSt;
 protected:
-   /// Vericals 
+   /// verticals 
int asc_;
///
int desc_;
@@ -62,11 +60,9 @@ protected:
 };
 
 
-// The idea is to change this  MathedRowContainer  to mimic the behaviour
-// of std::listMathedRowStruct in several small steps.  In the end it
-// could be replaced by such a list and MathedRowSt can go as well. 
  
-struct MathedRowContainer {
+class MathedRowContainer {
+private:
///
struct iterator {
///
@@ -79,9 +75,9 @@ struct MathedRowContainer {
///
MathedRowStruct  operator*() { Assert(st_); return st_-data_[pos_]; }
///
-   MathedRowStruct * operator-() { return st_-data_[pos_]; }
+   MathedRowStruct * operator-() { Assert(st_); return 
+st_-data_[pos_]; }
///
-   MathedRowStruct const * operator-() const { return st_-data_[pos_]; 
}
+   MathedRowStruct const * operator-() const { Assert(st_); return 
+st_-data_[pos_]; }
///
void operator++() { Assert(st_); ++pos_; }
///
@@ -92,26 +88,43 @@ struct MathedRowContainer {
 
//private:
///
+   friend class MathedRowContainer;
+
+   /// pointer to the container to which we belong
MathedRowContainer * st_;
-  

Re: mathed58.diff

2001-03-15 Thread Lars Gullik Bjønnes

Andre Poenitz [EMAIL PROTECTED] writes:

| This should be a cure for the 'missing \nonumber after read'.

I'll apply this when the mvc branch has been merged in.

| Next step is to move the inline hacks to math_rowst.C and it really starts
| looking better...

Good.

Lgb



Re: How to add a file?

2001-03-15 Thread Jean-Marc Lasgouttes

 "Andre" == Andre Poenitz [EMAIL PROTECTED] writes:

Andre But know I have to give my password on every 'cvs diff' (which
Andre I do quite often). I think this can be solved by putting my
Andre public identity in .ssh/authorized_keys on baywatch, but I
Andre don't know whether this is a save and approved way.

You can use ssh-agent to give your password only once, and then start
a shell in which it will not be needed anymore.

JMarc



Re: How to add a file?

2001-03-15 Thread Lars Gullik Bjønnes

Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

|  "Andre" == Andre Poenitz [EMAIL PROTECTED] writes:
| 
| Andre But know I have to give my password on every 'cvs diff' (which
| Andre I do quite often). I think this can be solved by putting my
| Andre public identity in .ssh/authorized_keys on baywatch, but I
| Andre don't know whether this is a save and approved way.
| 
| You can use ssh-agent to give your password only once, and then start
| a shell in which it will not be needed anymore.

On my box (I boot into runlevel 5) I start ssh-agent from
/etc/X11/xdm/Xsession:

#!/usr/bin/ssh-agent /bin/sh
#!/bin/sh
# Copyright (c) 1999, 2000 Red Hat, Inc.   


And start ssh-add from my KDE Desktop/Autostart

Then all my programs will inherit from ssh-agent and I can use ssh
regardless of what xterm/xconose I am in. (of course for virtual
console I have to give the password again, evt. start a new ssh-agent)

Lgb



Re: How to add a file?

2001-03-15 Thread Andre Poenitz

 On my box (I boot into runlevel 5) I start ssh-agent from
 /etc/X11/xdm/Xsession:
 
 #!/usr/bin/ssh-agent /bin/sh
 #!/bin/sh
 # Copyright (c) 1999, 2000 Red Hat, Inc.   

I'll try that.

---

Next question: A new .C file must be put into Makefile.am?

Anything else?

Andre'


-- 
Andr Pnitz  [EMAIL PROTECTED]



Re: How to add a file?

2001-03-15 Thread John Levon

On Thu, 15 Mar 2001, Andre Poenitz wrote:

  On my box (I boot into runlevel 5) I start ssh-agent from
  /etc/X11/xdm/Xsession:
  
  #!/usr/bin/ssh-agent /bin/sh
  #!/bin/sh
  # Copyright (c) 1999, 2000 Red Hat, Inc.   
 
 I'll try that.
 
 ---
 
 Next question: A new .C file must be put into Makefile.am?
 
 Anything else?

And the .h file if there is one so make dist will work ...

john

p.s. so if I've done ssh-add after ssh-agent /bin/bash, how do I
get it to stop asking me for the password on cvs actions ??

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: How to add a file?

2001-03-15 Thread Lars Gullik Bjønnes

Andre Poenitz [EMAIL PROTECTED] writes:

| Next question: A new .C file must be put into Makefile.am?
| 
| Anything else?

No, not really. except the ChangeLog entry of course.

Lgb



Re: How to add a file?

2001-03-15 Thread Lars Gullik Bjønnes

John Levon [EMAIL PROTECTED] writes:

| p.s. so if I've done ssh-add after ssh-agent /bin/bash, how do I
| get it to stop asking me for the password on cvs actions ??

You have to put your public key on the remove host for ssh to find.

Lgb



Re: How to add a file?

2001-03-15 Thread Juergen Vigna


On 15-Mar-2001 John Levon wrote:

 p.s. so if I've done ssh-add after ssh-agent /bin/bash, how do I
 get it to stop asking me for the password on cvs actions ??

That depends what ssh you're using. Since I changed to openssh I have to
give the password regardless my settings on cvs.lyx.org, but IMO this will
only last until Lars will install OpenSSH also on the .lyx.org machines.

  Jrgen

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jrgen VignaE-Mail:  [EMAIL PROTECTED]
Italienallee 13/N   Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen   Web: http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

A truly great man will neither trample on a worm nor sneak to an emperor.
-- B. Franklin




Re: How to add a file?

2001-03-15 Thread Juergen Vigna


On 15-Mar-2001 Lars Gullik Bjnnes wrote:
 
| p.s. so if I've done ssh-add after ssh-agent /bin/bash, how do I
| get it to stop asking me for the password on cvs actions ??
 
 You have to put your public key on the remove host for ssh to find.

Well and you have to have the right ssh installed :)

   Jrgen

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jrgen VignaE-Mail:  [EMAIL PROTECTED]
Italienallee 13/N   Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen   Web: http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

Wit, n.:
The salt with which the American Humorist spoils his cookery
... by leaving it out.
-- Ambrose Bierce, "The Devil's Dictionary"




Re: How to add a file?

2001-03-15 Thread John Levon

On Thu, 15 Mar 2001, Juergen Vigna wrote:

 
 On 15-Mar-2001 John Levon wrote:
 
  p.s. so if I've done ssh-add after ssh-agent /bin/bash, how do I
  get it to stop asking me for the password on cvs actions ??
 
 That depends what ssh you're using. Since I changed to openssh I have to
 give the password regardless my settings on cvs.lyx.org, but IMO this will
 only last until Lars will install OpenSSH also on the .lyx.org machines.
 
   Jürgen


I'm not using openssh

It works now after putting identity.pub in baywatch:/home/levon/.ssh/authorized_keys

yahoo :)

john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers





Re: How to add a file?

2001-03-15 Thread Kalle Dalheimer

On Thursday, 15. March 2001 14:26, Jean-Marc Lasgouttes wrote:
  "Andre" == Andre Poenitz [EMAIL PROTECTED] writes:

 Andre But know I have to give my password on every 'cvs diff' (which
 Andre I do quite often). I think this can be solved by putting my
 Andre public identity in .ssh/authorized_keys on baywatch, but I
 Andre don't know whether this is a save and approved way.

 You can use ssh-agent to give your password only once, and then start
 a shell in which it will not be needed anymore.

You still need to put your authorized_keys on the CVS server, of course. And 
you also need to call ssh-add after the ssh-agent.

The last two issues of Linux Journal had a very nice intro to ssh. It was 
also explained there why using this is actually more secure than the normal 
scheme (giving your password each time you log in).

Kalle

-- 
Matthias Kalle Dalheimer
President  CEO/VD
Klarlvdalens Datakonsult AB
Fax +46-563-540028
Email [EMAIL PROTECTED]



Re: How to add a file?

2001-03-15 Thread Jules Bean

On Thu, Mar 15, 2001 at 01:24:28PM +0100, Andre Poenitz wrote:
  sure you can. but only if you do as I have told you to use cvs.lyx.org
  (and thus your account there) instead of anoncvs.lyx.org.
 
 I think I never got that working... Ah.. I remember. Our "firewall".
 
 I need to force ssh to use non-priviledged port by using the -P command
 line switch. And this won't work with an alias, since it can't be exec'd.
 

Or add a 

UsePrivilegedPort no

to your .ssh/config file.  Possibly inside a 'Host' declaration.

Jules



mathed59.diff

2001-03-15 Thread Andre Poenitz


Diff of my tree against current cvs, i.e. mathed58.diff + hotfix + 'move
of formerly inlined functions from math_rowst.h to .C'

-- 
Andr Pnitz  [EMAIL PROTECTED]


Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.65
diff -u -p -r1.65 ChangeLog
--- ChangeLog   2001/03/15 10:56:00 1.65
+++ ChangeLog   2001/03/15 14:52:14
@@ -1,24 +1,35 @@
+
+2001-03-15  Andr Pnitz  [EMAIL PROTECTED]
+
+   * math_parser.C: read '\nonumber' again (was broken)
+
+   * math_rowst.C: new file
+
 2001-03-15  Angus Leeming  [EMAIL PROTECTED]
 
* math_cursor.C: added using directive.
 
 2001-03-15  Andr Pnitz  [EMAIL PROTECTED]
+
* math_rowst.h: Finally remove MathedRowSt
 
* math_parser.C:
  math_xiter.C: changed accordingly
 
 2001-03-12  Andr Pnitz  [EMAIL PROTECTED]
+
*   math_rowst.h: replace MathedRowSt with MathedRowStruct,
more robust MathedRowSt::[gs]etTab (to get rid of the constructor arg)
 
 2001-03-10  Andr Pnitz  [EMAIL PROTECTED]
+
* math_xiter.[Ch]:
  math_matrixinset.C: move adjustVerticalSt to the only place where
   it is used. Fix a small bug where the cached row structure and the
actual data get out of sync after the deletion of whole rows
 
 2001-03-09  Andr Pnitz  [EMAIL PROTECTED]
+
* math_cursor.C: use std::vector in MathStackXIter
change selstk from a pointer to the "real thing"
 
@@ -29,6 +40,7 @@
* math_parser.C: use MathedRowContainer::insert_after
 
 2001-03-08  Andr Pnitz  [EMAIL PROTECTED]
+
* math_rowst.h: give MathedRowContainer an 'insert' method. 
 
* math_xiter.C: new 'container()' method to encapsulated access to
@@ -41,6 +53,7 @@
  automatically created by the compiler are ok now.

 2001-03-06  Andr Pnitz  [EMAIL PROTECTED]
+
* array.[Ch]: factor out deep_copy,
  remove third argument from raw_pointer_insert 
 
@@ -53,6 +66,7 @@
  several files: corresponding changes
 
 2001-03-04  Andr Pnitz  [EMAIL PROTECTED]
+
   * math_macrotemplate.[Ch]:
 math_macro.C: move update() functionality to the macro
 
Index: Makefile.am
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/Makefile.am,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile.am
--- Makefile.am 2001/02/28 11:56:35 1.19
+++ Makefile.am 2001/03/15 14:52:14
@@ -60,6 +60,7 @@ libmathed_la_SOURCES = \
math_parser.h \
math_root.C \
math_root.h \
+   math_rowst.C \
math_rowst.h \
math_spaceinset.C \
math_spaceinset.h \
Index: math_parser.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_parser.C,v
retrieving revision 1.44
diff -u -p -r1.44 math_parser.C
--- math_parser.C   2001/03/15 14:41:40 1.44
+++ math_parser.C   2001/03/15 14:52:14
@@ -424,9 +424,6 @@ void mathed_parse(MathedArray  array, u
int acc_brace = 0;
int acc_braces[8];
MathParInset * mt = (mtx) ? *mtx : 0;
-   MathedRowContainer::iterator crow;
-   if (mt)
-   crow = mt-getRowSt().begin();
 
++plevel;
MathedIter data(array);
@@ -604,8 +601,7 @@ void mathed_parse(MathedArray  array, u
case LM_TK_NEWLINE:
if (mt  (flags  FLAG_END)) {
if (mt-Permit(LMPF_ALLOW_CR)) {
-   mt-getRowSt().insert(crow);
-   ++crow;
+   mt-getRowSt().push_back();
data.insert('K', LM_TC_CR);
} else 
mathPrintError("Unexpected newline");
@@ -757,8 +753,11 @@ void mathed_parse(MathedArray  array, u
break;

case LM_TK_NONUM:
-   if (crow)
-   crow-setNumbered(false);
+   if (mt) {
+   if (!mt-getRowSt().size())
+   mt-getRowSt().push_back();
+   mt-getRowSt().back().setNumbered(false);
+   }
break;

case LM_TK_PMOD:
@@ -869,7 +868,6 @@ void mathed_parse(MathedArray  array, u
}
mt-SetStyle(size);
mt-SetType(mathed_env);
-   crow = mt-getRowSt().begin();
}


Re: mathed59.diff

2001-03-15 Thread Lars Gullik Bjønnes

Andre Poenitz [EMAIL PROTECTED] writes:

| Diff of my tree against current cvs, i.e. mathed58.diff + hotfix + 'move
| of formerly inlined functions from math_rowst.h to .C'

Ok, I applied it.

what compiler are you using?

I get millions of 

In file included from ../../../src/mathed/math_cursor.h:27,
 from ../../../src/mathed/formula.C:27:
../../../src/mathed/math_xiter.h: In method 
`MathedRowContainer::iterator MathedXIter::currentRow ()':
../../../src/mathed/math_rowst.h:70: `struct 
MathedRowContainer::iterator' is private
../../../src/mathed/math_xiter.h:84: within this context
../../../src/mathed/math_xiter.h: In method `MathedRowContainer 
MathedXIter::container ()':
../../../src/mathed/math_rowst.h:70: `struct 
MathedRowContainer::iterator' is private


messages...

Lgb



make fails

2001-03-15 Thread R. Lahaye


Just downloaded CVS and I got:

$ make
[...snip...]
ranlib .libs/libxforms.a
creating libxforms.la
(cd .libs  rm -f libxforms.la  ln -s ../libxforms.la libxforms.la)
make[4]: Leaving directory `/local/software/LyX/lyx-devel/src/frontends/xforms'
Making all in controllers
make[4]: Entering directory `/local/software/LyX/lyx-devel/src/frontends/controllers'
make[4]: *** No rule to make target `all'.  Stop.
make[4]: Leaving directory `/local/software/LyX/lyx-devel/src/frontends/controllers'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/local/software/LyX/lyx-devel/src/frontends'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/local/software/LyX/lyx-devel/src'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/local/software/LyX/lyx-devel/src'
make: *** [all-recursive] Error 1


Rob.



lyx-1.1.6fix1: whitespace in cite

2001-03-15 Thread Ulrich Günther

Multiple citytions in lyx1.1.6fix1 can cause whitespaces in \cite{} (which 
cause compilation errors).

example: \cite{ref1, ref2}

should be:

\cite{ref1,ref2}

Ulrich



mathed60.diff

2001-03-15 Thread Andre Poenitz


Tiny, includes the fishy private: vc. public: issue

-- 
Andr Pnitz  [EMAIL PROTECTED]


? .math_rowst.C.swp
? mathed
? mathed60.diff
Index: math_rowst.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_rowst.C,v
retrieving revision 1.1
diff -u -p -r1.1 math_rowst.C
--- math_rowst.C2001/03/15 15:07:17 1.1
+++ math_rowst.C2001/03/15 16:00:40
@@ -85,6 +85,13 @@ MathedRowContainer::iterator MathedRowCo
return iterator(this);
 }
 
+MathedRowContainer::iterator MathedRowContainer::end()
+{
+   iterator it(this);
+   it.pos_ = data_.size();
+   return it;
+}
+
 bool MathedRowContainer::empty() const
 {
return data_.size() == 0;
Index: math_rowst.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_rowst.h,v
retrieving revision 1.14
diff -u -p -r1.14 math_rowst.h
--- math_rowst.h2001/03/15 15:07:17 1.14
+++ math_rowst.h2001/03/15 16:00:40
@@ -61,7 +61,8 @@ protected:
 
 
 class MathedRowContainer {
-private:
+//private:
+public:
///
typedef std::vectorMathedRowStruct   data_type;
///
@@ -96,6 +97,8 @@ private:
 public:
/// 
iterator begin();
+   /// 
+   iterator end();
///
bool empty() const;
 



Re: make fails

2001-03-15 Thread Lars Gullik Bjønnes

"R. Lahaye" [EMAIL PROTECTED] writes:

| Just downloaded CVS and I got:

did you autogen? configure?

Lgb



Re: make fails

2001-03-15 Thread Angus Leeming

On Thursday 15 March 2001 16:06, R. Lahaye wrote:
 Just downloaded CVS and I got:

This is a new directory, so you'll have to type

./autogen.sh
./configure YOUR_OWN_OPTIONS
make 

to create the Makefile and then compile.

Angus



 
 $ make
 [...snip...]
 ranlib .libs/libxforms.a
 creating libxforms.la
 (cd .libs  rm -f libxforms.la  ln -s ../libxforms.la libxforms.la)
 make[4]: Leaving directory 
`/local/software/LyX/lyx-devel/src/frontends/xforms'
 Making all in controllers
 make[4]: Entering directory 
`/local/software/LyX/lyx-devel/src/frontends/controllers'
 make[4]: *** No rule to make target `all'.  Stop.
 make[4]: Leaving directory 
`/local/software/LyX/lyx-devel/src/frontends/controllers'
 make[3]: *** [all-recursive] Error 1
 make[3]: Leaving directory `/local/software/LyX/lyx-devel/src/frontends'
 make[2]: *** [all-recursive] Error 1
 make[2]: Leaving directory `/local/software/LyX/lyx-devel/src'
 make[1]: *** [all-recursive-am] Error 2
 make[1]: Leaving directory `/local/software/LyX/lyx-devel/src'
 make: *** [all-recursive] Error 1
 
 
 Rob.



Re: lyx-1.1.6fix1: whitespace in cite

2001-03-15 Thread Angus Leeming

Many thanks. This was fixed recently in CVS, but you have pointed out that 
I've just broken the fix! Will commit this again!

Angus

On Thursday 15 March 2001 16:12, Ulrich Gnther wrote:
 Multiple citytions in lyx1.1.6fix1 can cause whitespaces in \cite{} (which 
 cause compilation errors).
 
 example: \cite{ref1, ref2}
 
 should be:
 
 \cite{ref1,ref2}
 
 Ulrich



Re: Reference pop-up has usability bug

2001-03-15 Thread Dekel Tsur

On Thu, Mar 15, 2001 at 07:32:18AM +0100, Cyrille Artho wrote:
 Hi Dekel,
 you have a point there. However, the visual feedback of the numbers
 *and* the sliders is much stronger, so it is harder to overlook the
 given selection. Finally, when the table appears, one usually can easily
 tell how many rows/columns there are (at least whether they are equal to
 5).
 
 For references, usually you "just want a reference" and don't want to
 have to switch page from pageref to normal refs if you have used a
 pageref half on hour ago. I usually only use pagerefs when referring to
 distant chapters or appendices, so the fewer I used them, the more
 likely I forgot to switch them back to normal. Even more so as lyx'es
 before 1.6 didn't remember my selection.

I use \prettyref a lot (and almost no normal \ref), so for me it is
convenient that the dialog remembers the type of the last inserted reference.



Re: Reference pop-up has usability bug

2001-03-15 Thread Angus Leeming

On Thursday 15 March 2001 16:48, Dekel Tsur wrote:
 On Thu, Mar 15, 2001 at 07:32:18AM +0100, Cyrille Artho wrote:
  Hi Dekel,
  you have a point there. However, the visual feedback of the numbers
  *and* the sliders is much stronger, so it is harder to overlook the
  given selection. Finally, when the table appears, one usually can easily
  tell how many rows/columns there are (at least whether they are equal to
  5).
  
  For references, usually you "just want a reference" and don't want to
  have to switch page from pageref to normal refs if you have used a
  pageref half on hour ago. I usually only use pagerefs when referring to
  distant chapters or appendices, so the fewer I used them, the more
  likely I forgot to switch them back to normal. Even more so as lyx'es
  before 1.6 didn't remember my selection.
 
 I use \prettyref a lot (and almost no normal \ref), so for me it is
 convenient that the dialog remembers the type of the last inserted 
reference.

Would it be worth putting a toggle in Preferences. 
Something meaning "Stateless dialogs"?

Not that I'm volunteering, of course!

Angus



Re: Reference pop-up has usability bug

2001-03-15 Thread Lars Gullik Bjønnes

Angus Leeming [EMAIL PROTECTED] writes:

| On Thursday 15 March 2001 16:48, Dekel Tsur wrote:
|  On Thu, Mar 15, 2001 at 07:32:18AM +0100, Cyrille Artho wrote:
|   Hi Dekel,
|   you have a point there. However, the visual feedback of the numbers
|   *and* the sliders is much stronger, so it is harder to overlook the
|   given selection. Finally, when the table appears, one usually can easily
|   tell how many rows/columns there are (at least whether they are equal to
|   5).
|   
|   For references, usually you "just want a reference" and don't want to
|   have to switch page from pageref to normal refs if you have used a
|   pageref half on hour ago. I usually only use pagerefs when referring to
|   distant chapters or appendices, so the fewer I used them, the more
|   likely I forgot to switch them back to normal. Even more so as lyx'es
|   before 1.6 didn't remember my selection.
|  
|  I use \prettyref a lot (and almost no normal \ref), so for me it is
|  convenient that the dialog remembers the type of the last inserted 
| reference.
| 
| Would it be worth putting a toggle in Preferences. 
| Something meaning "Stateless dialogs"?
| 
| Not that I'm volunteering, of course!

That the dialogs sometimes remember what they were used for last does
not make them stateful.

Lgb



USE_CLASS_COMBO

2001-03-15 Thread Angus Leeming

Jrgen,

is this #ifdef still needed in FormDocument.C, or can I nuke it?
It seems to me that comboxes work fine... was this something to do with 
comboxes in tabbed folders; problem now resolved.

Angus

#ifdef USE_CLASS_COMBO
unsigned int tc = combo_doc_class-get() - 1;
#else
int tc = fl_get_choice(ob) - 1;
#endif



Re: [Mats Rhen mats.rhen@mt.luth.se] 1.2-cvs and math-ed

2001-03-15 Thread Dekel Tsur

On Thu, Mar 15, 2001 at 08:48:10AM +0100, Lars Gullik Bjønnes wrote:
 Is there something broken in math-ed? 
 The possibility to make single rows unnumbered is no longer... 
 The last .rpm I used where this worked is from 6 of march.
 
 I've got a "Display formula" with 3 col's and 9 row's, row 2, 5,6 and 7 is
 to be unnumbered.

I can confirm that: I cannot use math-nonumber in a multi-line equation
except in the first row. I can't insert a label to the rows either.

More mathed glitches:

- Cursor is broken. For example when the cursor is on the first char inside
a square root (and there are chars before and after the root) and I press
left, the cursor moves outside of the math inset. Similarly if the cursor
is at the end of the root and I press right (or blank).

- If I use a macro with 1 argument, after inserting one instance of the macro,
when inserting the second instance the argument is not empty but contains
the value of the previous instance.

- When inserting a macro with argument, the cursor is really broken: in some
cases you just don't see the cursor, and in other cases the whole screen
scrolls to some random place in the document.

PS: I'm using CVS from yesterday.



Re: [Mats Rhen mats.rhen@mt.luth.se] 1.2-cvs and math-ed

2001-03-15 Thread Dekel Tsur

On Thu, Mar 15, 2001 at 07:13:36PM +0200, Dekel Tsur wrote:
 - Cursor is broken. For example when the cursor is on the first char inside
 ^^
before

 a square root (and there are chars before and after the root) and I press
 left, the cursor moves outside of the math inset. Similarly if the cursor
 is at the end of the root and I press right (or blank).
   space



Re: [Mats Rhen mats.rhen@mt.luth.se] 1.2-cvs and math-ed

2001-03-15 Thread Dekel Tsur

On Thu, Mar 15, 2001 at 06:16:49PM +0100, Andre Poenitz wrote:
  I can confirm that: I cannot use math-nonumber in a multi-line equation
  except in the first row. I can't insert a label to the rows either.
 
 I hope this is fixed in current CVS.

I can't check right now (network problems).



Mailing lists for CVS commits

2001-03-15 Thread Kalle Dalheimer

Hi,

do you have a mailing lists where CVS commits are notified? I'd like to keep 
track of changes to the XForms code so that I can percolate fixes there to 
the Qt2 code.

Thanks,

Kalle

-- 
Matthias Kalle Dalheimer
President  CEO/VD
Klarlvdalens Datakonsult AB
Fax +46-563-540028
Email [EMAIL PROTECTED]



Re: Mailing lists for CVS commits

2001-03-15 Thread Lars Gullik Bjønnes

Kalle Dalheimer [EMAIL PROTECTED] writes:

| Hi,
| 
| do you have a mailing lists where CVS commits are notified? I'd like to keep 
| track of changes to the XForms code so that I can percolate fixes there to 
| the Qt2 code.

Regular users can subscribe to the lyx-cvs list.

Developers with access to cvs.lyx.org should subscribe to 
http://www.lyx.org/mailman/listinfo/cvslog

Lgb



mathed61.diff

2001-03-15 Thread Andre Poenitz


Fix for the cursor movement bug reported by dekel.

-- 
Andr Pnitz  [EMAIL PROTECTED]


Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.67
diff -u -p -r1.67 ChangeLog
--- ChangeLog   2001/03/15 16:04:46 1.67
+++ ChangeLog   2001/03/15 17:32:33
@@ -1,3 +1,9 @@
+
+2001-03-15  Andr Pnitz  [EMAIL PROTECTED]
+
+   * math_cursor.C: fix bug (cursor was leaving two insets at a time instead
+  of one)
+
 2001-03-15  Lars Gullik Bjnnes  [EMAIL PROTECTED]
 
* math_macrotable.h: noncopyable is in namespace boost
Index: math_cursor.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_cursor.C,v
retrieving revision 1.46
diff -u -p -r1.46 math_cursor.C
--- math_cursor.C   2001/03/15 10:56:00 1.46
+++ math_cursor.C   2001/03/15 17:32:33
@@ -79,7 +79,8 @@ struct MathStackXIter {
}
 
MathedXIter * pop() {
-   return item[--i];
+--i;
+   return item[i - 1];
}
 
MathedXIter * Item(int idx) {



namespaces

2001-03-15 Thread Lars Gullik Bjønnes


I am now removing all CXX...NAMESPACES stuff (of course I should have
let someone with an older compiler do this...), will commit that in a
few minutes.

What I now need is a poll to see if anonymous namespaces are supported
on the different platforms.


So people please test:


namespace {

int foo() { return 1; }

}

int main() {
int i = foo();
}



And if you wonder why I want to know: The keyword "static" is
deprecated when used at file scope. And the prefered way to do it is
with anonymous namespaces.

Lgb




Re: namespaces

2001-03-15 Thread Andre Poenitz

 What I now need is a poll to see if anonymous namespaces are supported
 on the different platforms.

Supported in 2.95.2.

Andre'

-- 
Andr Pnitz  [EMAIL PROTECTED]



GUI task...

2001-03-15 Thread Lars Gullik Bjønnes


I have a small task that should be done in the Paragraph dialog. LyX
has for some time now supported per paragraph line spacing, this has
not yet been reflected in the dialog(s), the only way to set the per
paragraph spacing so far has been with LFUN_PARAGRAPH_SPACING
("paragraph-spacing")

It would be nice to see this supported in the dialog.

Lgb



Re: How to add a file?

2001-03-15 Thread Allan Rae

On Thu, 15 Mar 2001, Juergen Vigna wrote:


 On 15-Mar-2001 John Levon wrote:

  p.s. so if I've done ssh-add after ssh-agent /bin/bash, how do I
  get it to stop asking me for the password on cvs actions ??

 That depends what ssh you're using. Since I changed to openssh I have to
 give the password regardless my settings on cvs.lyx.org, but IMO this will
 only last until Lars will install OpenSSH also on the .lyx.org machines.

Maybe just upgrade to ssh-2.4.0 instead since it has a better way of
configuring and storing keys IMO.

Allan. (ARRae)




Re: LyX/Literate programming bug report

2001-03-15 Thread Kayvan A. Sylvan

I've been extensively using the LyX/Literate combination for some time
and have never seen this behavior before.

Do you have a recipe for reproducing this?

---Kayvan

On Tue, Mar 06, 2001 at 09:20:08AM -0700, [EMAIL PROTECTED] wrote:
 Hello Lyx Developers,
 
 As per the request of Jean-Marc, I am sending this bug report that both
 Edmar and I experienced.  It concerns building the program code of
 a literate program using Lyx.  Here is our discussion of the bug:
 
   Another anomality is that if the directory is clean, i.e., no other
   file except the '.lyx' one the build fails. It fails because it
   doens't export the '.nw' first.
 
  Matt Hello Edmar,
 
  Matt I was able to duplicate the problem you mention above. I
  Matt compiled 1.1.6fix1 from scratch on a redhat 6.1 machine, and
  Matt couldn't build the program unless I first exported the noweb
  Matt document.
 
  Hello there,
 
  You should probably write a message to the lyx-devel mailing list
  explaining the problem. I'm sure we'll be able to fix that...
 
  JMarc
 
 
 - matt hunter

-- 
Kayvan A. Sylvan   | Proud husband of  | Father to my kids:
Sylvan Associates, Inc.| Laura Isabella Sylvan | Katherine Yelena
http://www.successlinks.com/kayvan | Reach your goals now! | Robin Gregory



Re: namespaces

2001-03-15 Thread Martin Vermeer

On Thu, Mar 15, 2001 at 07:20:52PM +0100, Lars Gullik Bjnnes wrote:
 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
 Precedence: bulk
 X-No-Archive: yes
 List-Post: mailto:[EMAIL PROTECTED]
 List-Help: mailto:[EMAIL PROTECTED]
 List-Unsubscribe: mailto:[EMAIL PROTECTED]
 Delivered-To: mailing list [EMAIL PROTECTED]
 X-Authentication-Warning: trylle.birdstep.com: larsbj set sender to lyx using -f
 To: [EMAIL PROTECTED]
 Subject: namespaces
 From: [EMAIL PROTECTED] (Lars Gullik Bjnnes)
 Organization: LyX Developer http://www.lyx.org/
 Date: 15 Mar 2001 19:20:52 +0100
 User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
 
 
 I am now removing all CXX...NAMESPACES stuff (of course I should have
 let someone with an older compiler do this...), will commit that in a
 few minutes.
 
 What I now need is a poll to see if anonymous namespaces are supported
 on the different platforms.
 
 
 So people please test:
 
 
 namespace {
 
 int foo() { return 1; }
 
 }
 
 int main() {
 int i = foo();
 }
 
 
 
 And if you wonder why I want to know: The keyword "static" is
 deprecated when used at file scope. And the prefered way to do it is
 with anonymous namespaces.
 
 Lgb

Compiles clean, a.out runs clean, no messages printed whatsoever. 
(Does that mean 'yes'?) 

egcs-1.1.2-30, egcs-c++-1.1.2-30, libstdc++-2.9.0-30. Red Hat 6.2.

-- 
Martin Vermeer  [EMAIL PROTECTED]
Helsinki University of Technology 
Department of Surveying
P.O. Box 1200, FIN-02015 HUT, Finland
:wq



Mathed...

2001-03-15 Thread Andre Poenitz


I would like to move the  MathedRowContainer rows_  from
MathedMatrixInset  to  MathedParInset.

I think this will make a few things cleaner. We could save a few casts,
and some if/else constructs could be melted.

On the down side, this will bloat every inset which is not already a
MathedMatrixInset from 56+n to 68+n bytes so I thought I'd better ask.

Andre'

-- 
Andr Pnitz  [EMAIL PROTECTED]



Re: [PATCH] low-hanging fruit

2001-03-15 Thread Asger K. Alstrup Nielsen

On 15 Mar 2001, Lars Gullik Bjnnes wrote:

[How to avoid inlining to improve debugging]
 Well I consider compiling without -O an even bigger problem. Then a lot
 of small problems will not be noticed until you compile with
 optimization turned on.

Are you sure that there is not a flag to gcc such that you can compile
with -O, but without inlining?

I don't think it's a good trade-off to clutter all inlinings with
several lines of conditional preprocessor voodoo, just to avoid
a largely hypothetical problem!  Notice that most methods that
you inline are fairly trivial, and it's, in my experience, extremely
rare that you want to single-step through those.

I think this problem should be solved via a compiler switch - not
by cluttering the code.  If the compiler can't do this, fix the compiler
rather than cluttering the code.

Also, I don't think it's not a good trade-off to allow easy moving of
inline methods back and forth between the cpp/cxx/c++ files and the header
files by using the inline keyword.
The code is often easier to understand when the definition is close to the
declaration for these bits of code that are really simple.

It's not important that changing whether a method is inline or not should
be an easy operation. You only do this operation when you optimize the
code, and in this case, you should only do it after profiling. Therefore,
you can afford the extra trouble it is to inline it with a few more
lexical changes.

Greets,

Asger




Re: How to add a file?

2001-03-15 Thread Lars Gullik Bjønnes

Allan Rae [EMAIL PROTECTED] writes:

| On Thu, 15 Mar 2001, Juergen Vigna wrote:
| 
| 
|  On 15-Mar-2001 John Levon wrote:
| 
|   p.s. so if I've done ssh-add after ssh-agent /bin/bash, how do I
|   get it to stop asking me for the password on cvs actions ??
| 
|  That depends what ssh you're using. Since I changed to openssh I have to
|  give the password regardless my settings on cvs.lyx.org, but IMO this will
|  only last until Lars will install OpenSSH also on the .lyx.org machines.
| 
| Maybe just upgrade to ssh-2.4.0 instead since it has a better way of
| configuring and storing keys IMO.

Agree.

but when I upgrade it will be to OpenSSH

Lgb



Re: Mathed...

2001-03-15 Thread Lars Gullik Bjønnes

Andre Poenitz [EMAIL PROTECTED] writes:

| I would like to move the  MathedRowContainer rows_  from
| MathedMatrixInset  to  MathedParInset.
| 
| I think this will make a few things cleaner. We could save a few casts,
| and some if/else constructs could be melted.
| 
| On the down side, this will bloat every inset which is not already a
| MathedMatrixInset from 56+n to 68+n bytes so I thought I'd better ask.

Is the rows_ used in MathedParInset at all?
It "no" then it should not be moved.

Lgb




Re: [PATCH] low-hanging fruit

2001-03-15 Thread Andre Poenitz

 Are you sure that there is not a flag to gcc such that you can compile
 with -O, but without inlining?

-fno-inline   would sound appropriate, wouldn't it?

 [...]
 The code is often easier to understand when the definition is close to the
 declaration for these bits of code that are really simple.

I'd actually prefer to put one-liners directly in the class definition in
my own coding as a matter of convienience and better readability, too. Of
course, the latter is arguable, but if I see

   size_type size() const
 { return data_.size(); }

I immediately know what's going on and that it is a comparatively "cheap"
operation. And it's 30 key presses.

Current LyX: 

   size_type size() const;

   [... 50 lines later ...]

   MyFooBarClass::size_type MyFooBarClass::size() const
   {
 return data_.size()
   }

This does not only quadruple the amount of typing (which is a pain for the
wrists, I am _very_ aware of that) and occupies twice as much space on
screen, it is also takes more key presses for moving around.

And it gets even worse with templates... 

No, I am not advocating "my style",  I am pretty happy with current LyX as
long as it stays uniform. I am just trying to support Asgers words

" The code is often easier to understand when the definition is close to the
  declaration for these bits of code that are really simple. "

, in "real code" we prefer 'int i = 5;'  over 'int i; [...] i = 5;' too,
don't we?

Andre'

-- 
Andr Pnitz  [EMAIL PROTECTED]



RE: LyX fails to create .lyx

2001-03-15 Thread Juergen Vigna


On 14-Mar-2001 Lars Gullik Bjønnes wrote:

> This is directly from 1.1.6 cvs. Jean-Marc, has any changes gone in
> that could result in something like this?

I noticed that with 1.2.0cvs of last week the lastfiles was also saved
in ~/ and not in ~/.lyx. But this seemed fixed now!

   Jürgen

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Italienallee 13/N   Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen   Web: http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

You may get an opportunity for advancement today.  Watch it!




Re: What's wrong with the new Tables!?

2001-03-15 Thread Lars Gullik Bjønnes

Juergen Vigna <[EMAIL PROTECTED]> writes:

| On 14-Mar-2001 Jean-Marc Lasgouttes wrote:
| 
| > And what about the other changes I see, like
| > -   if (line != "") {
| > +   if (!prefixIs(line, "")) {
| 
| > Should they be applied too?
| 
| Sorry Jean-Marc I forgot about them, YES the  should also be changed
| to check only the prefix because with getline as we have it now its
| \r instead of . Otherwise we could strip trailing \r in
| l_getline which may be the better solution. What do you think?

We should strip it.

Lgb



Re: New Arrival

2001-03-15 Thread Michael S. Tsirkin

Hello!
Quoting r. Kalle Dalheimer ([EMAIL PROTECTED]) "Re: New Arrival":
> >
> > > One of the problems is that the STL version shipped with MS Visual C++ is
> > > severely broken.
> >
> > This would not be a problem in this case (Btw the g++ lib is broken as
> > well...)
> 
> Yes. In my experience, the only non-broken STL implementation on Linux is the 
> one in KCC.

In Intel we are using STLport for development
on Linux (g++), HP (aCC) and Windows (VC++) quite successfully.

http://stlport.org/

STLport is free as in speech, it has a license similiar to LGPL.

It has high degree of ANSI compatibility (even working around bugs
in compilers to resent to the user ANSI interface) and very good 
performance.

It also has some nice features like debug mode, and compatibility 
macros which allows mixing STLport with built-in STL in compiler
(important for e.g. QT port).

Also, if you find bugs, you can always fix them :)

Regards,
MSt

-- 
This message content is not part of Intel's views or affairs
Michael S. Tsirkin
>   Four things are to be strengthened: Torah,and good deeds,
>   prayer and one's good manners (Berachoth)



mathed57.diff

2001-03-15 Thread Andre Poenitz


I attach a diff of my local tree against current CVS.

The changes in math_iter.[hC] are purely cosmetical.

The crucial difference is the removel of MathedRowSt and the use of a
std::vector instead of the handcrafted list of
MathedRowSt's.

I also removed the insert_after() function in favour of a more standard-
like insert. The insert_after was sometimes off by one so that might have
been the reason for the spurious crashes Lars has seen.

Behaviour _has_ changed, e.g. hitting Ctrl-Return in an array gives a new
line with the cursor placed at the end of the new line, whereas it used to
stay at the beginning. This can be fixed easily now, I just did not want 
to blow up the patch.

The only "real" problem I am aware of (apart from the old macro issue) is
\nolimits, it is saved properly but not read back. Chasing this bug should
be easier with this patch applied since MathedRowContainer is _much_
simpler now.

The Userguide is read and displayed properly as far as I can tell, there
are quite a few changes after saving but seemingly only whitespace and
(text-) table differences. There is a message about a missing \end_inset
when reading in the first time. I have not checked yet why, it does not
abort reading anyway and the result looks ok.

Andre'

-- 
André Pönitz  [EMAIL PROTECTED]


Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.63
diff -u -p -r1.63 ChangeLog
--- ChangeLog   2001/03/12 13:58:11 1.63
+++ ChangeLog   2001/03/15 09:04:26
@@ -1,6 +1,12 @@
 
+2001-03-15  André Pönitz  <[EMAIL PROTECTED]>
+   * math_rowst.h: Finally remove MathedRowSt
+
+   * math_parser.C:
+ math_xiter.C: changed accordingly
+
 2001-03-12  André Pönitz  <[EMAIL PROTECTED]>
-   *   math_rowst.h: replace MathedRowSt with MathedRowSt,
+   *   math_rowst.h: replace MathedRowSt with MathedRowStruct,
more robust MathedRowSt::[gs]etTab (to get rid of the constructor arg)
 
 2001-03-10  André Pönitz  <[EMAIL PROTECTED]>
Index: math_cursor.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_cursor.C,v
retrieving revision 1.44
diff -u -p -r1.44 math_cursor.C
--- math_cursor.C   2001/03/09 08:45:10 1.44
+++ math_cursor.C   2001/03/15 09:04:26
@@ -82,7 +82,9 @@ struct MathStackXIter {
}
 
MathedXIter * Item(int idx) {
-   return (idx + 1 <= i) ? [i - idx - 1] : 0;
+   if (idx + 1 > i)
+   cerr << "Wrong index: " << idx << " i: " << i << endl;
+   return [i - idx - 1];
}
 
void Reset() {
Index: math_iter.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_iter.C,v
retrieving revision 1.41
diff -u -p -r1.41 math_iter.C
--- math_iter.C 2001/03/06 10:24:45 1.41
+++ math_iter.C 2001/03/15 09:04:26
@@ -60,6 +60,15 @@ void MathedIter::fcode(short c) const
fcode_ = c; 
 }
 
+byte MathedIter::at(int p) const
+{
+   return (*array)[p]; 
+}
+
+byte & MathedIter::at(int p)
+{
+   return (*array)[p]; 
+}
 
 int MathedIter::Empty() const
 {
@@ -75,8 +84,8 @@ int MathedIter::OK() const
 
 void MathedIter::Reset()
 {
-   if (array->last() > 0 && MathIsFont((*array)[0])) {
-   fcode((*array)[0]);
+   if (array->last() > 0 && MathIsFont(at(0))) {
+   fcode(at(0));
pos   = 1;
} else {
fcode(-1);
@@ -90,23 +99,23 @@ void MathedIter::Reset()
 byte MathedIter::GetChar() const
 {
if (IsFont()) {
-   fcode((*array)[pos]);
+   fcode(at(pos));
++pos;
}
-   return (*array)[pos];
+   return at(pos);
 }
 
 
 string const MathedIter::GetString() const
 {
if (IsFont()) {
-   fcode((*array)[++pos]);
+   fcode(at(++pos));
++pos;
}
 
string s;
-   for (; (*array)[pos] >= ' ' && pos < array->last(); ++pos)
-   s += (*array)[pos];
+   for (; at(pos) >= ' ' && pos < array->last(); ++pos)
+   s += at(pos);
 
return s;
 }
@@ -120,7 +129,7 @@ MathedInset * MathedIter::GetInset() con
return p;
} else {
lyxerr << "Math Error: This is not an inset["
-  << (*array)[pos] << "]" << endl;
+  << at(pos) << "]" << endl;
return 0;
}
 }
@@ -143,7 +152,7 @@ bool MathedIter::Next()
if (!OK())
return false;
 
-   if ((*array)[pos] < ' ') {
+   if (at(pos) < ' ') {
fcode(-1);
if (IsTab())
++col;
@@ -159,7 +168,7 @@ bool MathedIter::Next()
++pos;
 
if (IsFont()) 

Re: mathed57.diff

2001-03-15 Thread Lars Gullik Bjønnes

Andre Poenitz <[EMAIL PROTECTED]> writes:

| I attach a diff of my local tree against current CVS.
| 
| The changes in math_iter.[hC] are purely cosmetical.

What about the crashes in mathcursor/iter?

Lgb



Re: mathed57.diff

2001-03-15 Thread Andre Poenitz

> | I attach a diff of my local tree against current CVS.
> | 
> | The changes in math_iter.[hC] are purely cosmetical.
> 
> What about the crashes in mathcursor/iter?

Do you still see any?

It would be nice if you had anything reproducible...

Since the insert* methods in MathRowContainer have been wrong, anything
involving them could have crashed. MathMatrixInset e.g. "copied" its RowSt
in Metrics() so this could have been the culprit. 

This "copy" was changed from "copy if empty" to "copy everytime" on
10/3/2001 in order to "fix" the drawing nuisance where a complete empty
line at the end of a matrix stayed on screen after a row had been deleted.
[It could even be that the bug was lurking there all the time and we
simply triggered it now in "more unsual situations"]

This change was wrong anyway (not in spirit, but as implemented) since it
created new MathedRowStructs everytime thus losing the number/label/...
information.

So we could either revert to 9/3/2001 or try to complete the RowStruct
changes. The patch aims for the latter and I think we get pretty close.

Andre'


-- 
André Pönitz  [EMAIL PROTECTED]



Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread Edwin Leuven

> Comments, flames, suggestions?

Personally I think that it is better to do one dialog at a time and to make 
sure that that is fully functional. This is much more transparent and also 
easier to check and comment on. Fine tuning can then be done later on.

gr.ed.



Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread John Levon

On 14 Mar 2001, Lars Gullik Bjønnes wrote:

> diff -upN
> rdiff -upN
> update -dP
> 
> the 'N' make the diff take new and deleted files into consideration.

except cvs diff is broken. You also need to run Amir's "fixdiff.pl" on
the patch, http://www.movement.uklinux.net/

I tried the other day to add this functionality to patch (along with a
prefix-append-always-succeeds option) but that is some really really scary
code...

(no wonder it hasn't been touched for years despite its flaws)

john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread John Levon

On Wed, 14 Mar 2001, Kalle Dalheimer wrote:

> Hi,
> 
> I finally got all my stuff to compile with the current CVS version. Here is 
> my first patch. Sorry, it is pretty big, but I'd rather get everything in now 
> so that I can make small incremental patches on this stuff in the future and 
> can see compile breaks right away.

Hi Kalle glad you got some time for this :)

One thing though, you will need to thrash out with Edwin a consistent filename
scheme. You currently both have different naming schemes ...

thanks
john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: Resize while rendering/startup

2001-03-15 Thread John Levon

On Thu, 15 Mar 2001, Roman Fietze wrote:

> When starting LyX with a document containing a larger PS-Image on the
> first page, LyX starts rendering after downloading the fonts. I resized
> (enlarged) the LyX Window as soon as I saw the first few lines of text,
> the WM-decoration (fvwm2) moved down, but the status line of LyX stayed at
> the old position, the unused space between this status line and the WM
> decoration was gray. The scrollbar on the right side enlarged partially,
> the down button of the scrollbar was the height of the unused space (say
> the triangle was very high), so this down button reached from the LyX
> status line to the bottom of the resized window.

This is a known bug and I doubt it will get fixed. It's basically a "don't-do-that"
thing at the moment :(

john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




How to add a file?

2001-03-15 Thread Andre Poenitz


I'd like to have a math_rowst.C, but I can't do 'cvs add'.

Any ideas? 

Andre'

-- 
André Pönitz  [EMAIL PROTECTED]



Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread John Levon

On Thu, 15 Mar 2001, Edwin Leuven wrote:

> > Comments, flames, suggestions?
> 
> Personally I think that it is better to do one dialog at a time and to make 
> sure that that is fully functional. This is much more transparent and also 
> easier to check and comment on. Fine tuning can then be done later on.
> 
> gr.ed.

You are probably right, but bear in mind these are forward ports
of stuff Kalle had already done so in this case ...

john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:

| On 14 Mar 2001, Lars Gullik Bjønnes wrote:
| 
| > diff -upN
| > rdiff -upN
| > update -dP
| > 
| > the 'N' make the diff take new and deleted files into consideration.
| 
| except cvs diff is broken.

Is it? news to me.

Lgb



Re: How to add a file?

2001-03-15 Thread Lars Gullik Bjønnes

Andre Poenitz <[EMAIL PROTECTED]> writes:

| I'd like to have a math_rowst.C, but I can't do 'cvs add'.

sure you can. but only if you do as I have told you to use cvs.lyx.org
(and thus your account there) instead of anoncvs.lyx.org.

Lgb



Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread Edwin Leuven

> You are probably right, but bear in mind these are forward ports
> of stuff Kalle had already done so in this case ...

I still think they should go in one at a time and complete. For the moment 
Kalle's patch only adds the files. Of these files only the citation is added 
to the Makefile but the dialog is not connected.

As I said, it makes things just more transparent at little cost. But perhaps 
Kalle and I should discuss this while we are at the naming scheme :-)

gr.ed.



Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread John Levon

On 15 Mar 2001, Lars Gullik Bjønnes wrote:

> John Levon <[EMAIL PROTECTED]> writes:
> 
> | On 14 Mar 2001, Lars Gullik Bjønnes wrote:
> | 
> | > diff -upN
> | > rdiff -upN
> | > update -dP
> | > 
> | > the 'N' make the diff take new and deleted files into consideration.
> | 
> | except cvs diff is broken.
> 
> Is it? news to me.
> 
> Lgb

well maybe it is my local setup !


pg008:1009 head -1 ~/.cvsrc
diff -uNp


pg008:1011 cvs -v
 
Concurrent Versions System (CVS) 1.10.7 (client/server)
  


It will produce files like :

diff -N combox.h
--- /tmp/cvshKKAFX  Thu Mar 15 12:29:12 2001
^^
+++ /dev/null   Tue May  5 22:32:27 1998   
+  


Index: src/frontends/xforms/combox.C
===
RCS file: combox.C
diff -N combox.C
--- /dev/null   Tue May  5 22:32:27 1998
+++ combox.CThu Mar 15 12:29:11 2001


which break patch

john


-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers




Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:


| which break patch

so you are saying that this breaks patch:

Index: MAINTAINERS
===
RCS file: MAINTAINERS
diff -N MAINTAINERS
--- /dev/null   Tue May  5 22:32:27 1998
+++ MAINTAINERS Thu Mar 15 12:36:57 2001
@@ -0,0 +1,3 @@
+Mathed
+André Pönitz
[EMAIL PROTECTED]


of course it should be patched with 

patch -p0 < 

What about this:

Index: MAINTAINERS
===
RCS file: MAINTAINERS
diff -N MAINTAINERS
--- /dev/null   Tue May  5 22:32:27 1998
+++ MAINTAINERS Thu Mar 15 12:39:52 2001
@@ -0,0 +1,3 @@
+Mathed
+André Pönitz
[EMAIL PROTECTED]
Index: src/mathed/array.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/array.C,v
retrieving revision 1.15
diff -u -p -r1.15 array.C
--- src/mathed/array.C  2001/03/06 10:24:45 1.15
+++ src/mathed/array.C  2001/03/15 11:39:54
@@ -14,7 +14,6 @@
 using std::ostream;
 using std::endl;
 
-// Is this still needed? (Lgb)
 static inline
 void * my_memcpy(void * ps_in, void const * pt_in, size_t n)
 {


I think you belive it breaks because you are either diffing in the
wrong dir or patching in the wrong dir.

Lgb



[PATCH] remove KeyMap dialog

2001-03-15 Thread John Levon


The attached patch removes the KeyMap dialog which
is part of FormPrefs now, and moves combox into 
frontends/xforms since that was the last src/ dependency

keymaps seem to still work fine for me

thanks
john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers

 intl.diff.gz


Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread John Levon

On 15 Mar 2001, Lars Gullik Bjønnes wrote:

> John Levon <[EMAIL PROTECTED]> writes:
> 
> 
> | which break patch
> 
> so you are saying that this breaks patch:
> 
> Index: MAINTAINERS
> ===
> RCS file: MAINTAINERS
> diff -N MAINTAINERS
> --- /dev/null Tue May  5 22:32:27 1998
> +++ MAINTAINERS   Thu Mar 15 12:36:57 2001
> @@ -0,0 +1,3 @@
> +Mathed
> +André Pönitz
> [EMAIL PROTECTED]
> 

Try this with a file in a subdirectory !

> +++ src/mathed/array.C2001/03/15 11:39:54
> @@ -14,7 +14,6 @@
>  using std::ostream;
>  using std::endl;
>  
> -// Is this still needed? (Lgb)
>  static inline
>  void * my_memcpy(void * ps_in, void const * pt_in, size_t n)
>  {

patches that aren't new/deleted files aren't affected by the problem

> I think you belive it breaks because you are either diffing in the
> wrong dir or patching in the wrong dir.

bzzt

I "believe it breaks" because it does break. Ask JMarc about my old patches
that didn't apply properly. It was because of this problem.

Any new/deleted file in a subdirectory is not handled properly, hence the need
for the script.

I can stop using the script if you want but I don't think anyone will appreciate
them having to tidy up ;)

Now it may be my version of cvs or something but you can't just pretend there isn't
a problem. I've attached the unfixed version of my intl.diff so you can see exactly
what I mean

john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers


 a.diff.gz


[PATCH] low-hanging fruit

2001-03-15 Thread John Levon


Doing lyx -x lyx-quit big.lyx,  the attached patch
gives the following results (warm cache, error around 4%) :

user (s)| sys (s)   | elapsed (s)   |
--
28.33 (0.00%)   | 0.30 (0.00%)  | 29.61 (0.00%) | newinsetsold
24.29 (-14.27%) | 0.32 (6.61%)  | 25.92 (-12.48%)   | newinsetsnew

and the binary is only 14k bigger (with -g -O). This seems worth it to me.

The top of the profile looks like this with the patch applied :
 
LyXParagraph::InsertChar(int, char, LyXFont const &)[0x08146e5c]: 1.0553% (10233 
samples)
LyXParagraph::GetChar(int) const[0x08148210]: 1.1648% (11295 samples)
basic_string<...>::compare(char const *, unsigned int, unsigned int) 
const[0x08288a38]: 1.3048% (12652 samples)
LyXText::GetFont(Buffer const *, LyXParagraph *, int) const[0x08173358]: 1.4893% 
(14441 samples)
LyXFont::FontBits::eq(LyXFont::FontBits const &) const[0x081110f4]: 1.5215% (14753 
samples)
LyXFont::realize(LyXFont const &)[0x08111af0]: 1.5622% (15148 samples)
boost::shared_ptr * find_if(boost::shared_ptr *, 
boost::shared_ptr *, ShareContainer::isEqual, 
random_access_iterator_tag)[0x082d5dc0]: 1.6546% (16044 samples)
Buffer::parseSingleLyXformat2Token(LyXLex &, LyXParagraph *&, LyXParagraph *&, 
basic_string > const 
&, int &, char &, LyXFont &)[0x080a45d4]: 1.8889% (18316 samples)
__7LyXFont[0x0870]: 2.3485% (22772 samples)
LyXParagraph::GetFontSettings(BufferParams const &, int) const[0x0814750c]: 3.3957% 
(32927 samples)
LyXText::GetRow(LyXParagraph *, int, int &) const[0x08172b40]: 63.7895% (618541 
samples)


thanks
john

-- 
"24-hour boredom
I'm convicted instantly"
- Manic Street Preachers


Index: src/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.95
diff -u -p -r1.95 ChangeLog
--- src/ChangeLog   2001/03/15 10:06:52 1.95
+++ src/ChangeLog   2001/03/15 11:53:15
@@ -1,3 +1,10 @@
+2001-03-15  John Levon  <[EMAIL PROTECTED]>
+
+   * lyxrow.h:
+   * lyxrow.C: inline some get() accessors. This
+   adds about 14k to the binary but speeds up a
+   large file load by about 10%.
+
 2001-03-14  Angus Leeming  <[EMAIL PROTECTED]>
 
* lyxfunc.C (Dispatch): removed redundant break statement.
Index: src/lyxrow.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxrow.C,v
retrieving revision 1.4
diff -u -p -r1.4 lyxrow.C
--- src/lyxrow.C2000/07/24 13:53:17 1.4
+++ src/lyxrow.C2001/03/15 11:53:15
@@ -29,30 +29,12 @@ void Row::par(LyXParagraph * p)
 }
 
 
-LyXParagraph * Row::par()
-{
-   return par_;
-}
-
-
-LyXParagraph * Row::par() const
-{
-   return par_;
-}
-
-
 void Row::pos(LyXParagraph::size_type p)
 {
pos_ = p;
 }
 
 
-LyXParagraph::size_type Row::pos() const
-{
-   return pos_;
-}
-
-
 void Row::fill(int f)
 {
fill_ = f;
@@ -71,24 +53,12 @@ void Row::height(unsigned short h)
 }
 
 
-unsigned short Row::height() const
-{
-   return height_;
-}
-
-
 void Row::width(unsigned int w)
 {
width_ = w;
 }
 
 
-unsigned int Row::width() const
-{
-   return width_;
-}
-
-
 void Row::ascent_of_text(unsigned short a)
 {
ascent_of_text_ = a;
@@ -119,19 +89,7 @@ void Row::next(Row * r)
 }
 
 
-Row * Row::next() const
-{
-   return next_;
-}
-
-
 void Row::previous(Row * r)
 {
previous_ = r;
-}
-
-
-Row * Row::previous() const
-{
-   return previous_;
 }
Index: src/lyxrow.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxrow.h,v
retrieving revision 1.10
diff -u -p -r1.10 lyxrow.h
--- src/lyxrow.h2000/07/24 13:53:17 1.10
+++ src/lyxrow.h2001/03/15 11:53:15
@@ -26,13 +26,13 @@ public:
///
void par(LyXParagraph * p);
///
-   LyXParagraph * par();
+   inline LyXParagraph * par();
///
-   LyXParagraph * par() const;
+   inline LyXParagraph * par() const;
///
void pos(LyXParagraph::size_type p);
///
-   LyXParagraph::size_type pos() const;
+   inline LyXParagraph::size_type pos() const;
///
void fill(int f);
///
@@ -40,11 +40,11 @@ public:
///
void height(unsigned short h);
///
-   unsigned short height() const;
+   inline unsigned short height() const;
///
void width(unsigned int w);
///
-   unsigned int width() const;
+   inline unsigned int width() const;
///
void ascent_of_text(unsigned short a);
///
@@ 

Re: [Patch] Some Qt2 dialogs

2001-03-15 Thread Kalle Dalheimer

On Thursday, 15. March 2001 12:26, John Levon wrote:
> On Thu, 15 Mar 2001, Edwin Leuven wrote:
> > > Comments, flames, suggestions?
> >
> > Personally I think that it is better to do one dialog at a time and to
> > make sure that that is fully functional. This is much more transparent
> > and also easier to check and comment on. Fine tuning can then be done
> > later on.
> >
> > gr.ed.
>
> You are probably right, but bear in mind these are forward ports
> of stuff Kalle had already done so in this case ...

Exactly. All the rest is going to be dialog-by-dialog.

Kalle

-- 
Matthias Kalle Dalheimer
President & CEO/VD
Klarälvdalens Datakonsult AB
Fax +46-563-540028
Email [EMAIL PROTECTED]



  1   2   >