Re: askForText()

2000-01-03 Thread Allan Rae

On 21 Dec 1999, Lars Gullik Bjønnes wrote:
 Allan Rae [EMAIL PROTECTED] writes:
 
 | pairbool, string askForText(string const , string const );
 
 I also prefer the pair version.

The pair version it is!

I've just committed the changes and it sure makes life a lot better being
able to cancel a commit when using version control.  Label cancelling is
also argueably better.

Allan. (ARRae)



Compilation failure

2000-01-03 Thread Michael Schmitt

Hello again,

please add the following lines to 'lyxsum.C':

  using std::FILE;
  using std::fopen;
  using std::fread;
  using std::fclose;
  using std::ferror;

in lstring.h:

 using std::size_t;

in lyx_gui_misc.h:

  using std::pair;
  using std::make_pair; (forgot that line in my previous email)

layout.C still requires the following changes:

  1217: return make_pair(true, static_castunsigned(cit -
classlist.begin()));
  1219: return make_pair(false, 0u); }
  1245: return make_pair(true, static_castunsigned(LYX_DUMMY_LAYOUT));
  1246: return make_pair(false, 0u); // not found

  (second argument must be 'unsigned')

lyx_gui_misc.C:

  411: return make_pairbool, string(true, string(tmp));

Finally, I get warnings like the following one when compiling lyx-devel
with Sun's CC:

  CC: Warning: Option -Wp,-MD,.deps/math_utils.pp passed to ld, 
  if ld is invoked, ignored otherwise

How can I disable them? It seems like they are not relevant for
compiling, are they?

Thanks,

Michael

PS: Still 'kill' is not a standardized function defined in csignal!
I suggest changing the code.
 
-- 
==
Michael Schmittphone: +49 451 500 3725
Institute for Telematics   secretary: +49 451 500 3721
Medical University of Luebeck  fax:   +49 451 500 3722
Ratzeburger Allee 160  eMail: [EMAIL PROTECTED]
D-23538 Luebeck, Germany   WWW:   http://www.itm.mu-luebeck.de
==
 S/MIME Cryptographic Signature


Compilation fails

2000-01-03 Thread Michael Schmitt

Hello,

could anybody please add the following line to 'lyx_gui_misc.h'

   using std::pair;

Many thanks,

Michael

-- 
=
Michael Schmittphone: +49 451 500 3725
Institute for Telematics   secretary: +49 451 500 3721
Medical University of Luebeck  fax:   +49 451 500 3722
Ratzeburger Allee 160  eMail: [EMAIL PROTECTED]
D-23538 Luebeck, Germany   WWW:   http://www.itm.mu-luebeck.de
==
 S/MIME Cryptographic Signature


Re: namespaces

2000-01-03 Thread John Weiss

On Tue, Dec 21, 1999 at 11:35:52AM +0100, Lars Gullik Bjønnes wrote:
 Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:
 
 |  "Lars" == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:
 | 
 | Lars Does namespace support work on all the compilers that the 1.1.x
 | Lars series currently compiles on?

It would be nice, but somehow I doubt it,

 The pity, is that now we use structs to hack around not using
 namespaces...

Not unusual; we do this where I work.

Hmmm... 

Maybe we should have a subdir with several small sourcelets and a
Makefile desiged to test whether or not the compiler supports certain
ANSI C++ features yet.  We could ask folks to mail in what they find.
Then we'll have some sense of which compilers do what.

-- 
John Weiss



Re: Compilers, exceptions, code size, etc. [was: Re: Cannot compile Lyx

2000-01-03 Thread John Weiss

On Thu, Dec 23, 1999 at 10:56:46AM +0100, Andre' Poenitz wrote:

 And could have some more advantages. You could 'register' new functions
 at run time. You do not need a monolithic 2MB+ binary when you
 use only 10% of the functionality. 
 Just load 'modules' dynamically on demand...

Gawd, I wish I knew how to code that!  If I did, I'd contribute
something using it to LyX.

-- 
John Weiss



Re: Compilers, exceptions, code size, etc. [was: Re: Cannot compile Lyx

2000-01-03 Thread Andre Poenitz

  And could have some more advantages. You could 'register' new functions
  at run time. You do not need a monolithic 2MB+ binary when you
  use only 10% of the functionality. 
  Just load 'modules' dynamically on demand...
 
 Gawd, I wish I knew how to code that!  If I did, I'd contribute
 something using it to LyX.

This is much easier than you'd expect. Have a look at the dlopen(3) 
man page for starters...

However, I am not suggesting to actually start fiddling around 
with dynamic loadable modules in LyX. It could be a natural extension
once LyX is no more Spaghett-yX ;-)

Andre'

-- 
André Pönitz . [EMAIL PROTECTED]



Re: One more lyx-devel on cygnus NT

2000-01-03 Thread Dr. Ing. Roland Krause

Lars,
I got an email from the cygwin folks the other day saying that regex
(the BSD) version is included in cygwin beta 20.
I havent found it there though I havent looked very hard, but before you
go through all the hussle I would suggest that I try to find out some
more about this.

Regards
Roland

PS: Happy new year - I see we are back in business.

"Dr. Ing. Roland Krause" [EMAIL PROTECTED] writes:

  | So I downloaded it from ftp.gnu.org. I then changed a few lines
in
  | config.status and got LyX to compile ...
  | ... and after changing

  I will get that from ftp.gnu.org and include it in the lyx
  distribution.

  | But !!! If I use Steven's startup script, then the home
directory and
  | LYX_DIR_10X get set correctly and it starts up und runs just
fine.

  Perhaps we should have this startup script in the distribution
too.

  | Maybe one can include regex with LyX, its small and GNU GPL'ed.
Then NT
  | users can specify
  | --with-included-regex upon configuration ?
  | What do you guys think

  I don't think we need the --with-included-regex switch, we should
use
  the systems one if that is ok and if not use the one we provide.

  Lgb



Re: Please help me helping you

2000-01-03 Thread Asger K. Alstrup Nielsen

 So I want to help you. I have started to read the source and, hmm, I got
 lost. Too many files, I guess. Can you tell me where to look at? What
 are the ideas behind the code? And how do I get this 'make srcdoc' thing
 to work?

Forget about the make srcdoc.

Some of the important files:

BufferView, LyXView, LyXParagraph, LyXFunc, LyXAction, text, text2, 
LyXText, Inset*

Start with those.  Another way, is to try to read from the beginning: 
follow main(), and see where that takes you.

The idea behind the code is in a transition phase (which has lasted a
few years ;-).  Originally, the code was not thought to be multi-window,
multi-view capable.
However, this is changing, and therefore the underlying structure of LyX
is slowly changing to be multi-view and multi-window capable.  At this
point, the arrangement is this:

LyXView is a window.
BufferView is a view of a document.

The idea is to allow several BufferViews in a LyXView, but this is
not possible at the moment.  LyXView has exactly one bufferview
attached.

BufferView itself is attached to exactly one LyXView.  This is
to be changed, such that a BufferView can appear in several LyXViews.

The BufferView is a view of a document.  The document itself is
represented in a doubly-linked list of paragraphs.  These paragraphs
contains a char-array of the text in the paragraph, a list of font-areas, 
and a list of insets.  The char-array uses special character codes
to signify special characters, such as insets, hard line-breaks
and so fort.

--

This is the main structural part of LyX, and it's not too important
to understand in details in order to hack on LyX.

Alternatively, it's fruitful to get down into one aspect of LyX, and
understand it in detail:  for instance, the math editor.  All of
this code is collected in one unit, and fairly cleanly separated
from the rest.  It has been developed by Alejandro A. Sierra, but
it seems he is busy with other things, so the math editor in LyX
has not developed a lot recently.  So, here's a chance to adopt
a huge section of the code.  This is high difficulty.

Another example could be the spellchecker, which is medium difficultly.

Another difficult one is the figinset.

An easy one could be the TOC-inset.

 BTW: I know C++ quite well, but I don't know XForms and only very little
 LaTeX.

When I started to work on LyX, I didn't know C++, XForms, or LaTeX.

Today, I'm a C++ expert, pretty good with XForms, and still don't know 
LaTeX ;-)  

There is no need to know everything about everything.  It's enough when 
the sum of all contributors is an expert in all areas in total, and that 
seems to very much be the case on the LyX team ;-)

Greets,

Asger



More NT fun

2000-01-03 Thread Dr. Ing. Roland Krause

Friends,
I am trying to find my way through the LyX startup procedure. The
overall goal would be to get an NT port that does not need any special
startup scripts. So my first step is to try and find out why LyX crashes
when it is started from the command line. I've gotten to the point where
a DebugStream is instantiated. Then the program dies at

0x5d5ce0 in __builtin_new () at DebugStream.C:194
194 }
(gdb) s
Cannot access memory at address 0x200.

after that I am not able to get a stack trace from gdb anymore but right
before I get:

(gdb) wher
#0  DebugStream::DebugStream (this=0x6158a0, __in_chrg=1, t=NONE)
at
/cygnus/cygwin-b20/H-i586-cygwin32/bin/../lib/gcc-lib/i586-cygwin32/2.95.

2/../../../../../include/g++-3/streambuf.h:479
#1  0x4ade62 in __static_initialization_and_destruction_0
(__initialize_p=1,
__priority=65535) at ../src/lyx_main.C:40
#2  0x4ae015 in global constructors keyed to lyxserver ()
at ../src/lastfiles.h:62
#3  0x610033ed in _size_of_stack_reserve__ ()
#4  0x61004437 in _size_of_stack_reserve__ ()
#5  0x4e19c1 in main (argc=1, argv=0xa031d70) at ../src/main.C:28
#6  0x61004402 in _size_of_stack_reserve__ ()
#7  0x61004420 in _size_of_stack_reserve__ ()
#8  0x5d900e in cygwin_crt0 (f=0x4e19ac main)
at /home/noer/src/b20/comp-tools/devo/winsup/libccrt0.cc:81

Well all this does not make sense to me therefore I'd like to ask for a
pointer where to look.
It is clear to me that the environment variables set in Steven's scripts
must play an important role, but where are these variables assessed and
imho the program shouldnt crash if they arent there in the first place.

Thanks for any pointers
Roland (who is positively astonished by the LyX-Code)




the log file DUUHH

2000-01-03 Thread Dr. Ing. Roland Krause

Sorry - I forgot to attache the log file.
Time to go home...

Here it is.

ROland


 ruebe.log


Re: Compilers, exceptions, code size, etc. [was: Re: Cannot compile Lyx

2000-01-03 Thread Arnd Hanses

On 23 Dec 1999 20:22:39 +0100, Lars Gullik Bj°nnes wrote:

| 
| Some time ago I suggested to use 'static inline' to break fn's up. I
| think this should work without of introducing fn call overhead.

inlining is one of the fings that really slows a compilation...

I see... Re-inlining fn's initially not split introduces an additional
optimizing step. 

Here it generally optimizes faster if fn's are really huge. If they
exceeded a certain crucial limit in size the swapping during the
initial optimizing steps slows down compilation more than this
additional final step costs. But this effect depends heavily on your
actual system configuration.

Happy new Y2K!!!



Re: askForText()

2000-01-03 Thread Allan Rae

On 21 Dec 1999, Lars Gullik Bjønnes wrote:
> Allan Rae <[EMAIL PROTECTED]> writes:
> 
> | pair askForText(string const &, string const &);
> 
> I also prefer the pair version.

The pair version it is!

I've just committed the changes and it sure makes life a lot better being
able to cancel a commit when using version control.  Label cancelling is
also argueably better.

Allan. (ARRae)



Compilation failure

2000-01-03 Thread Michael Schmitt

Hello again,

please add the following lines to 'lyxsum.C':

  using std::FILE;
  using std::fopen;
  using std::fread;
  using std::fclose;
  using std::ferror;

in lstring.h:

 using std::size_t;

in lyx_gui_misc.h:

  using std::pair;
  using std::make_pair; (forgot that line in my previous email)

layout.C still requires the following changes:

  1217: return make_pair(true, static_cast(cit -
classlist.begin()));
  1219: return make_pair(false, 0u); }
  1245: return make_pair(true, static_cast(LYX_DUMMY_LAYOUT));
  1246: return make_pair(false, 0u); // not found

  (second argument must be 'unsigned')

lyx_gui_misc.C:

  411: return make_pair(true, string(tmp));

Finally, I get warnings like the following one when compiling lyx-devel
with Sun's CC:

  CC: Warning: Option -Wp,-MD,.deps/math_utils.pp passed to ld, 
  if ld is invoked, ignored otherwise

How can I disable them? It seems like they are not relevant for
compiling, are they?

Thanks,

Michael

PS: Still 'kill' is not a standardized function defined in !
I suggest changing the code.
 
-- 
==
Michael Schmittphone: +49 451 500 3725
Institute for Telematics   secretary: +49 451 500 3721
Medical University of Luebeck  fax:   +49 451 500 3722
Ratzeburger Allee 160  eMail: [EMAIL PROTECTED]
D-23538 Luebeck, Germany   WWW:   http://www.itm.mu-luebeck.de
==
 S/MIME Cryptographic Signature


Compilation fails

2000-01-03 Thread Michael Schmitt

Hello,

could anybody please add the following line to 'lyx_gui_misc.h'

   using std::pair;

Many thanks,

Michael

-- 
=
Michael Schmittphone: +49 451 500 3725
Institute for Telematics   secretary: +49 451 500 3721
Medical University of Luebeck  fax:   +49 451 500 3722
Ratzeburger Allee 160  eMail: [EMAIL PROTECTED]
D-23538 Luebeck, Germany   WWW:   http://www.itm.mu-luebeck.de
==
 S/MIME Cryptographic Signature


Re: namespaces

2000-01-03 Thread John Weiss

On Tue, Dec 21, 1999 at 11:35:52AM +0100, Lars Gullik Bjønnes wrote:
> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
> 
> | > "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> | 
> | Lars> Does namespace support work on all the compilers that the 1.1.x
> | Lars> series currently compiles on?

It would be nice, but somehow I doubt it,

> The pity, is that now we use structs to hack around not using
> namespaces...

Not unusual; we do this where I work.

Hmmm... 

Maybe we should have a subdir with several small sourcelets and a
Makefile desiged to test whether or not the compiler supports certain
ANSI C++ features yet.  We could ask folks to mail in what they find.
Then we'll have some sense of which compilers do what.

-- 
John Weiss



Re: Compilers, exceptions, code size, etc. [was: Re: Cannot compile Lyx

2000-01-03 Thread John Weiss

On Thu, Dec 23, 1999 at 10:56:46AM +0100, Andre' Poenitz wrote:
>
> And could have some more advantages. You could 'register' new functions
> at run time. You do not need a monolithic 2MB+ binary when you
> use only 10% of the functionality. 
> Just load 'modules' dynamically on demand...

Gawd, I wish I knew how to code that!  If I did, I'd contribute
something using it to LyX.

-- 
John Weiss



Re: Compilers, exceptions, code size, etc. [was: Re: Cannot compile Lyx

2000-01-03 Thread Andre Poenitz

> > And could have some more advantages. You could 'register' new functions
> > at run time. You do not need a monolithic 2MB+ binary when you
> > use only 10% of the functionality. 
> > Just load 'modules' dynamically on demand...
> 
> Gawd, I wish I knew how to code that!  If I did, I'd contribute
> something using it to LyX.

This is much easier than you'd expect. Have a look at the dlopen(3) 
man page for starters...

However, I am not suggesting to actually start fiddling around 
with dynamic loadable modules in LyX. It could be a natural extension
once LyX is no more Spaghett-yX ;-)

Andre'

-- 
André Pönitz . [EMAIL PROTECTED]



Re: One more lyx-devel on cygnus NT

2000-01-03 Thread Dr. Ing. Roland Krause

Lars,
I got an email from the cygwin folks the other day saying that regex
(the BSD) version is included in cygwin beta 20.
I havent found it there though I havent looked very hard, but before you
go through all the hussle I would suggest that I try to find out some
more about this.

Regards
Roland

PS: Happy new year - I see we are back in business.

"Dr. Ing. Roland Krause" <[EMAIL PROTECTED]> writes:

  | So I downloaded it from ftp.gnu.org. I then changed a few lines
in
  | config.status and got LyX to compile ...
  | ... and after changing

  I will get that from ftp.gnu.org and include it in the lyx
  distribution.

  | But !!! If I use Steven's startup script, then the home
directory and
  | LYX_DIR_10X get set correctly and it starts up und runs just
fine.

  Perhaps we should have this startup script in the distribution
too.

  | Maybe one can include regex with LyX, its small and GNU GPL'ed.
Then NT
  | users can specify
  | --with-included-regex upon configuration ?
  | What do you guys think

  I don't think we need the --with-included-regex switch, we should
use
  the systems one if that is ok and if not use the one we provide.

  Lgb



Re: Please help me helping you

2000-01-03 Thread Asger K. Alstrup Nielsen

> So I want to help you. I have started to read the source and, hmm, I got
> lost. Too many files, I guess. Can you tell me where to look at? What
> are the ideas behind the code? And how do I get this 'make srcdoc' thing
> to work?

Forget about the make srcdoc.

Some of the important files:

BufferView, LyXView, LyXParagraph, LyXFunc, LyXAction, text, text2, 
LyXText, Inset*

Start with those.  Another way, is to try to read from the beginning: 
follow main(), and see where that takes you.

The idea behind the code is in a transition phase (which has lasted a
few years ;-).  Originally, the code was not thought to be multi-window,
multi-view capable.
However, this is changing, and therefore the underlying structure of LyX
is slowly changing to be multi-view and multi-window capable.  At this
point, the arrangement is this:

LyXView is a window.
BufferView is a view of a document.

The idea is to allow several BufferViews in a LyXView, but this is
not possible at the moment.  LyXView has exactly one bufferview
attached.

BufferView itself is attached to exactly one LyXView.  This is
to be changed, such that a BufferView can appear in several LyXViews.

The BufferView is a view of a document.  The document itself is
represented in a doubly-linked list of paragraphs.  These paragraphs
contains a char-array of the text in the paragraph, a list of font-areas, 
and a list of insets.  The char-array uses special character codes
to signify special characters, such as insets, hard line-breaks
and so fort.

--

This is the main structural part of LyX, and it's not too important
to understand in details in order to hack on LyX.

Alternatively, it's fruitful to get down into one aspect of LyX, and
understand it in detail:  for instance, the math editor.  All of
this code is collected in one unit, and fairly cleanly separated
from the rest.  It has been developed by Alejandro A. Sierra, but
it seems he is busy with other things, so the math editor in LyX
has not developed a lot recently.  So, here's a chance to adopt
a huge section of the code.  This is high difficulty.

Another example could be the spellchecker, which is medium difficultly.

Another difficult one is the figinset.

An easy one could be the TOC-inset.

> BTW: I know C++ quite well, but I don't know XForms and only very little
> LaTeX.

When I started to work on LyX, I didn't know C++, XForms, or LaTeX.

Today, I'm a C++ expert, pretty good with XForms, and still don't know 
LaTeX ;-)  

There is no need to know everything about everything.  It's enough when 
the sum of all contributors is an expert in all areas in total, and that 
seems to very much be the case on the LyX team ;-)

Greets,

Asger



More NT fun

2000-01-03 Thread Dr. Ing. Roland Krause

Friends,
I am trying to find my way through the LyX startup procedure. The
overall goal would be to get an NT port that does not need any special
startup scripts. So my first step is to try and find out why LyX crashes
when it is started from the command line. I've gotten to the point where
a DebugStream is instantiated. Then the program dies at

0x5d5ce0 in __builtin_new () at DebugStream.C:194
194 }
(gdb) s
Cannot access memory at address 0x200.

after that I am not able to get a stack trace from gdb anymore but right
before I get:

(gdb) wher
#0  DebugStream::DebugStream (this=0x6158a0, __in_chrg=1, t=NONE)
at
/cygnus/cygwin-b20/H-i586-cygwin32/bin/../lib/gcc-lib/i586-cygwin32/2.95.

2/../../../../../include/g++-3/streambuf.h:479
#1  0x4ade62 in __static_initialization_and_destruction_0
(__initialize_p=1,
__priority=65535) at ../src/lyx_main.C:40
#2  0x4ae015 in global constructors keyed to lyxserver ()
at ../src/lastfiles.h:62
#3  0x610033ed in _size_of_stack_reserve__ ()
#4  0x61004437 in _size_of_stack_reserve__ ()
#5  0x4e19c1 in main (argc=1, argv=0xa031d70) at ../src/main.C:28
#6  0x61004402 in _size_of_stack_reserve__ ()
#7  0x61004420 in _size_of_stack_reserve__ ()
#8  0x5d900e in cygwin_crt0 (f=0x4e19ac )
at /home/noer/src/b20/comp-tools/devo/winsup/libccrt0.cc:81

Well all this does not make sense to me therefore I'd like to ask for a
pointer where to look.
It is clear to me that the environment variables set in Steven's scripts
must play an important role, but where are these variables assessed and
imho the program shouldnt crash if they arent there in the first place.

Thanks for any pointers
Roland (who is positively astonished by the LyX-Code)




the log file DUUHH

2000-01-03 Thread Dr. Ing. Roland Krause

Sorry - I forgot to attache the log file.
Time to go home...

Here it is.

ROland


 ruebe.log


Re: Compilers, exceptions, code size, etc. [was: Re: Cannot compile Lyx

2000-01-03 Thread Arnd Hanses

On 23 Dec 1999 20:22:39 +0100, Lars Gullik Bj°nnes wrote:

>| 
>| Some time ago I suggested to use 'static inline' to break fn's up. I
>| think this should work without of introducing fn call overhead.
>
>inlining is one of the fings that really slows a compilation...

I see... Re-inlining fn's initially not split introduces an additional
optimizing step. 

Here it generally optimizes faster if fn's are really huge. If they
exceeded a certain crucial limit in size the swapping during the
initial optimizing steps slows down compilation more than this
additional final step costs. But this effect depends heavily on your
actual system configuration.

Happy new Y2K!!!