Re: Conversion Error

2011-03-16 Thread lyx-devel
Hi Liviu,

Thanks for the thoughts.

 This can happen when you re-define an inset. For example:
 - define an inset inset 1 and make a document containing this inset -
re-define the inset to inset 2
 - open the original document containing inset 1 constructs. At this
point LyX will label the insets in red and as undefined (if you don't
see this try to toggle the inset label in LyX). And compilation would
fail.

Upon your prompting, I've gone through with a text editor and made sure
that all of the redefined insets point at the new name. (There was one or
two, but other than those, the document was clean.)

I also checked to make sure that the document class and lyx .layout files
were encoded correctly and ended with a Line Feed rather than the Mac OS X
classic way of terminating a file. (I ran into problems with this earlier
in the week.)

 Try to check in the LyX source the exact name of the inset and make sure
it coincides with the one you have in your config files. (Never forget
to redundantly reconfigure LyX.) Else, check the LaTeX code to make sure
that the proper code is being inserted by your inset.

I also went back and reconfigured LyX. I'm having the same problem.
Moreover, LyX is doing strange things with parts of the text. For reasons
I don't understand, it's having issues with perfectly normal ASCII
characters.

Because I've been having so many problems, I decided to move over to
Windows. I am not able to reproduce the bugs. The files compile without
errors. (Though strangely enough, I'm no longer able to enable XeTeX
through the font pane of Document Settings.)

When I have some time tomorrow, I'll update the SVN version and see if I
can get the document to compile correctly. For right now, I've got to get
back to writing. (Other than a platform problem, I wonder if the problems
might be due to a recent commit. The SVN version I have on the PC hasn't
been updated for about a week and a half.)

Cheers,

Rob



Re: Conversion Error

2011-03-16 Thread lyx-devel
Hi Liviu,

Thanks for the thoughts.

> This can happen when you re-define an inset. For example:
> - define an inset "inset 1" and make a document containing this inset -
re-define the inset to "inset 2"
> - open the original document containing "inset 1" constructs. At this
point LyX will label the insets in red and as undefined (if you don't
see this try to toggle the inset label in LyX). And compilation would
fail.

Upon your prompting, I've gone through with a text editor and made sure
that all of the redefined insets point at the new name. (There was one or
two, but other than those, the document was clean.)

I also checked to make sure that the document class and lyx .layout files
were encoded correctly and ended with a Line Feed rather than the Mac OS X
classic way of terminating a file. (I ran into problems with this earlier
in the week.)

> Try to check in the LyX source the exact name of the inset and make sure
it coincides with the one you have in your config files. (Never forget
to redundantly reconfigure LyX.) Else, check the LaTeX code to make sure
that the proper code is being inserted by your inset.

I also went back and reconfigured LyX. I'm having the same problem.
Moreover, LyX is doing strange things with parts of the text. For reasons
I don't understand, it's having issues with perfectly normal ASCII
characters.

Because I've been having so many problems, I decided to move over to
Windows. I am not able to reproduce the bugs. The files compile without
errors. (Though strangely enough, I'm no longer able to enable XeTeX
through the font pane of Document Settings.)

When I have some time tomorrow, I'll update the SVN version and see if I
can get the document to compile correctly. For right now, I've got to get
back to writing. (Other than a platform problem, I wonder if the problems
might be due to a recent commit. The SVN version I have on the PC hasn't
been updated for about a week and a half.)

Cheers,

Rob



Re: New Outliner improvements sponsored project

2010-09-05 Thread lyx-devel
Hi All,

 Rob, are you listening?

Yes, I'm listening.

Sorry for being out of the loop.  I've been on vacation for the last week
days and will be out of email range until next Wendesday.

I agree that we need to merge the two projects back together.  Moreover, I
think it is in a good position to do that.  I will start sending patches
next week.  I've tried to keep my code as separate from the main LyX code
as much as possible, so I do not anticipate merging to be that difficult. 
I regularly merge with LyX 2.0 trunk and have not had problems either
compiling or with stability.

By far the biggest code drop will be in the expanded outline view and
corkboard.  The code to the existing background classes is small and I
will try and send that first.  Depending on how review of that goes, I can
follow-up with some of the other background classes.

Probably the last bit should be the expanded views.  I'll try and do that
on Wednesday, when I get back home.

Cheers,

Rob


 On 03/09/2010 23:29, Pavel Sanda wrote:
 BcBob wrote:

 So, how do I do it? The donate page on the Lyx website
 (http://www.lyx.org/Donate) lists some projects. How do I get a project
 started?

 it needs some developer who is willing to code it... so usually the
 first step
 is asking on this lists. for the outliner the thing is bit more
 complicated
 since there is already some project started by Rob Oakes.

 from what i understood he will try to contribute outliner improvements
 into lyx
 2.1. dont know how much his specification comply with 6174. on one hand
 he is
 natural target for donation on the other hand please note that its not
 official
 project led by lyx developer and we dont take any responsibility for
 incorporating the code into lyx - depends how the contributed code will
 look
 like...


 Rob, are you listening? I didn't track your outline spin off because I
 already have a hard time tracking LyX main development proper. And I
 guess it is mostly the same for other developers.

 I think this branch has been separated for way too long, you should
 actively try to merge it back ASAP if you want your project to be
 successful, IMHO.
 A sponsored project is IMO a very good idea for this project. It's easy
 to add an item on the page and design you as the responsible for it. You
 should also create a Paypal account to receive the donations. You will
 of course be free to give part or all of the money to someone else
 (students?%



Re: New Outliner improvements sponsored project

2010-09-05 Thread lyx-devel
Hi All,

> Rob, are you listening?

Yes, I'm listening.

Sorry for being out of the loop.  I've been on vacation for the last week
days and will be out of email range until next Wendesday.

I agree that we need to merge the two projects back together.  Moreover, I
think it is in a good position to do that.  I will start sending patches
next week.  I've tried to keep my code as separate from the main LyX code
as much as possible, so I do not anticipate merging to be that difficult. 
I regularly merge with LyX 2.0 trunk and have not had problems either
compiling or with stability.

By far the biggest code drop will be in the expanded outline view and
corkboard.  The code to the existing background classes is small and I
will try and send that first.  Depending on how review of that goes, I can
follow-up with some of the other background classes.

Probably the last bit should be the expanded views.  I'll try and do that
on Wednesday, when I get back home.

Cheers,

Rob


> On 03/09/2010 23:29, Pavel Sanda wrote:
>> BcBob wrote:
>>
>>> So, how do I do it? The donate page on the Lyx website
>>> (http://www.lyx.org/Donate) lists some projects. How do I get a project
>>> started?
>>>
>> it needs some developer who is willing to code it... so usually the
>> first step
>> is asking on this lists. for the outliner the thing is bit more
>> complicated
>> since there is already some project started by Rob Oakes.
>>
>> from what i understood he will try to contribute outliner improvements
>> into lyx
>> 2.1. dont know how much his specification comply with 6174. on one hand
>> he is
>> natural target for donation on the other hand please note that its not
>> official
>> project led by lyx developer and we dont take any responsibility for
>> incorporating the code into lyx - depends how the contributed code will
>> look
>> like...
>>
>
> Rob, are you listening? I didn't track your outline spin off because I
> already have a hard time tracking LyX main development proper. And I
> guess it is mostly the same for other developers.
>
> I think this branch has been separated for way too long, you should
> actively try to merge it back ASAP if you want your project to be
> successful, IMHO.
> A sponsored project is IMO a very good idea for this project. It's easy
> to add an item on the page and design you as the responsible for it. You
> should also create a Paypal account to receive the donations. You will
> of course be free to give part or all of the money to someone else
> (students?%



Re: Sweave - R command line running off edge of page

2009-12-06 Thread lyx-devel
Hi Graham, 

It might be worthwhile for you to take a look at the SVN version of LyX.  It 
contains a module that enables Sweave to be used with any document class. I've 
been testing the Sweave integration for a book chapter and it works brilliantly.

I tried to get it up and running on version 1.6.4 by manually copying over the 
layout file and creating a Sweave file format and converters (I used LyX SVN as 
a guide), but kept getting an error that it couldn't find the sweave package.  
however, I am able to successfully use the same module from LyX SVN.  I can 
only assume that the older versions of the configuration script aren't checking 
for it.  Or perhaps some other file is needed?

Other than the configuration question, I'm not sure that anything else would be 
needed. Maybe one of the developers could comment?

Cheers,

Rob


Re: Sweave - R command line running off edge of page

2009-12-06 Thread lyx-devel
Hi Graham, 

It might be worthwhile for you to take a look at the SVN version of LyX.  It 
contains a module that enables Sweave to be used with any document class. I've 
been testing the Sweave integration for a book chapter and it works brilliantly.

I tried to get it up and running on version 1.6.4 by manually copying over the 
layout file and creating a Sweave file format and converters (I used LyX SVN as 
a guide), but kept getting an error that it couldn't find the sweave package.  
however, I am able to successfully use the same module from LyX SVN.  I can 
only assume that the older versions of the configuration script aren't checking 
for it.  Or perhaps some other file is needed?

Other than the configuration question, I'm not sure that anything else would be 
needed. Maybe one of the developers could comment?

Cheers,

Rob


Re: [Patch] Corkboard

2009-06-03 Thread lyx-devel
Dear Abdel,

Thank you for both the kind welcome as well as the feedback.  While I am 
painfully new (and surprisingly inept) at open source collaboration/computer 
programming, I am an old hand and general fan of peer-review.  In comparison to 
the various articles I've submitted, the reception here has been both friendly 
and very helpful.

I will take a look at the coding guidelines and try re-factor what I've already 
written.  I noticed that several other people have also responded, I will try 
and take their comments into account as well.  Top of the list will be the 
doxygen tags. (I've been able to get a pretty good idea on how they work from 
the other header files.)

I will also try and the code somewhat.  There are several redundant pieces of 
code that can be eliminated and there are several places where variables can be 
replaced by pointers/constants.  I appreciate that many things are in 
tremendously rough shape, this is my first major piece of GUI C++ code in 
addition to the first creation using the Qt frameworks.  Thus it evolved more 
than was planned.

Cheers,

Rob


- Original Message -
From: Abdelrazak Younes you...@lyx.org
To: lyx-de...@oak-tree.us
Cc: lyx-devel@lists.lyx.org
Sent: Wednesday, June 3, 2009 6:17:47 AM GMT -07:00 US/Canada Mountain
Subject: Re: [Patch] Corkboard

Rob Oakes wrote:
 Dear LyX Developers,

 Attached you will find a patch that adds a basic, Scrivener
 (http://www.literatureandlatte.com/scrivener.html) like corkboard to LyX.
 If interested more information about what specific features I would like to
 implement can be found at my website
 (http://www.oak-tree.us/blog/index.php/2009/03/04/perfect-tool).  You can
 also find a (somewhat) working prototype that I started as a playground in
 PyQt
 (http://www.oak-tree.us/blog/index.php/science-and-technology/lyx-outline)
 .

 This patch adds three classes to the existing LyX-Codebase:
   

Hi Rob,

This looks like a very substancial and interesting addition to LyX. 
Thank you for that and welcome on board!

I've skimmed very briefly over the patch. Some initial comments, please 
don't be scared about them, peer review is the normal process in this list:

1) Please try to stick to LyX coding rules (see trunk/development/coding)

2) Your code seems quite well documented in the cpp files but not in the 
headers. Please try to document the different classes and their methods 
using doxygen tags. This will help us understanding what is doing what. 
I know that we don't follow this rules in all the source code but for 
new code this is close to mandatory I'd say.

3)  Try to split some of your big methods in smaller ones. As a basic 
rule a method with more than 30 lines of code and 3 level of indentation 
is harder to digest.

I'm sure you'll receive some other comments from fellow LyXers, I will 
personally try your patch over the week-end.

Cheers,
Abdel.



 1.) Corkboard.h/Corkboard.cpp - A QAbstractItemView that displays the items
 of the TocModel as index cards.  While stub methods have been developed for
 drag and drop reordering of the cards, these have not yet been implemented.
 2.) CorkboardWidget.h/CokboardWidget.cpp - Parent widget and supporting code
 that holds the QAbstractItemView (Corkboard.cpp) and connects the Cokboard
 to the proper model.
 3.) CorkboardManager.h/CorkboardManager.cpp - Supporting class to Corkboard
 that acts as a controller in the Model/Controller/View architecture.
 Largely, this is a stud class that will probably hold code related to drag
 and drop/editing of cards; though none of these features have been
 implemented yet.
 4.) GuiCorkboard.h/GuiCorkboard.cpp - Dashboard widget that loads and
 displays the other widgets and views.
 5.) Also attached are two graphics files: Corkboard.png, which is the
 background of the corkboard view, and ViewCorkboard.png which is it's UI
 icon.

 At present, it is possible the corkboard successfully shows the contents of
 the tocmodel tableofcontents.  Some of the methods necessary for drag and
 drop are also present, but support for reordering of sections has not yet
 been implemented.

 I look forward to hearing the community's comments on the code as well as
 any feedback regarding it's architecture/implementation.  I am a *very*
 novice C++ developer, and while the code appears to work, it is not the most
 ... elegant ... I've ever seen.  I also have a number of questions regarding
 how best to implement several features, but that is probably the subject of
 a separate e-mail.

 Cheers,

 Rob Oakes
   


Re: [Patch] Corkboard

2009-06-03 Thread lyx-devel
Dear Abdel,

Thank you for both the kind welcome as well as the feedback.  While I am 
painfully new (and surprisingly inept) at open source collaboration/computer 
programming, I am an old hand and general fan of peer-review.  In comparison to 
the various articles I've submitted, the reception here has been both friendly 
and very helpful.

I will take a look at the coding guidelines and try re-factor what I've already 
written.  I noticed that several other people have also responded, I will try 
and take their comments into account as well.  Top of the list will be the 
doxygen tags. (I've been able to get a pretty good idea on how they work from 
the other header files.)

I will also try and the code somewhat.  There are several redundant pieces of 
code that can be eliminated and there are several places where variables can be 
replaced by pointers/constants.  I appreciate that many things are in 
tremendously rough shape, this is my first major piece of GUI C++ code in 
addition to the first creation using the Qt frameworks.  Thus it evolved more 
than was planned.

Cheers,

Rob


- Original Message -
From: "Abdelrazak Younes" <you...@lyx.org>
To: lyx-de...@oak-tree.us
Cc: lyx-devel@lists.lyx.org
Sent: Wednesday, June 3, 2009 6:17:47 AM GMT -07:00 US/Canada Mountain
Subject: Re: [Patch] Corkboard

Rob Oakes wrote:
> Dear LyX Developers,
>
> Attached you will find a patch that adds a basic, Scrivener
> (http://www.literatureandlatte.com/scrivener.html) like corkboard to LyX.
> If interested more information about what specific features I would like to
> implement can be found at my website
> (http://www.oak-tree.us/blog/index.php/2009/03/04/perfect-tool).  You can
> also find a (somewhat) working prototype that I started as a playground in
> PyQt
> (http://www.oak-tree.us/blog/index.php/science-and-technology/lyx-outline)
> .
>
> This patch adds three classes to the existing LyX-Codebase:
>   

Hi Rob,

This looks like a very substancial and interesting addition to LyX. 
Thank you for that and welcome on board!

I've skimmed very briefly over the patch. Some initial comments, please 
don't be scared about them, peer review is the normal process in this list:

1) Please try to stick to LyX coding rules (see trunk/development/coding)

2) Your code seems quite well documented in the cpp files but not in the 
headers. Please try to document the different classes and their methods 
using doxygen tags. This will help us understanding what is doing what. 
I know that we don't follow this rules in all the source code but for 
new code this is close to mandatory I'd say.

3)  Try to split some of your big methods in smaller ones. As a basic 
rule a method with more than 30 lines of code and 3 level of indentation 
is harder to digest.

I'm sure you'll receive some other comments from fellow LyXers, I will 
personally try your patch over the week-end.

Cheers,
Abdel.



> 1.) Corkboard.h/Corkboard.cpp - A QAbstractItemView that displays the items
> of the TocModel as index cards.  While stub methods have been developed for
> drag and drop reordering of the cards, these have not yet been implemented.
> 2.) CorkboardWidget.h/CokboardWidget.cpp - Parent widget and supporting code
> that holds the QAbstractItemView (Corkboard.cpp) and connects the Cokboard
> to the proper model.
> 3.) CorkboardManager.h/CorkboardManager.cpp - Supporting class to Corkboard
> that acts as a controller in the Model/Controller/View architecture.
> Largely, this is a stud class that will probably hold code related to drag
> and drop/editing of cards; though none of these features have been
> implemented yet.
> 4.) GuiCorkboard.h/GuiCorkboard.cpp - Dashboard widget that loads and
> displays the other widgets and views.
> 5.) Also attached are two graphics files: Corkboard.png, which is the
> background of the corkboard view, and ViewCorkboard.png which is it's UI
> icon.
>
> At present, it is possible the corkboard successfully shows the contents of
> the tocmodel "tableofcontents."  Some of the methods necessary for drag and
> drop are also present, but support for reordering of sections has not yet
> been implemented.
>
> I look forward to hearing the community's comments on the code as well as
> any feedback regarding it's architecture/implementation.  I am a *very*
> novice C++ developer, and while the code appears to work, it is not the most
> ... elegant ... I've ever seen.  I also have a number of questions regarding
> how best to implement several features, but that is probably the subject of
> a separate e-mail.
>
> Cheers,
>
> Rob Oakes
>   


Re: LyX Outliner and Corkboard - Feature Proposal

2009-03-06 Thread lyx-devel
This is exactly what I would like to implement.  Very similar to the way which 
Semantik (which was KDissert) works.  Once the data container is worked out, it 
should be relatively easy to implement additional views.  It is merely a visual 
representation of the same data.

My biggest questions of the moments are, where should this data live?  I also 
think that the other questions of, should the comments be included in the text? 
 I'm of two minds, I can certainly think of cases where it can be valuable.

Thoughts?

Cheers,

Rob Oakes

- Original Message -
From: Eran Kaplinsky eran.kaplin...@ualberta.ca
To: lyx-de...@oak-tree.us, lyx-devel@lists.lyx.org
Sent: Friday, March 6, 2009 11:32:44 AM GMT -07:00 US/Canada Mountain
Subject: Re: LyX Outliner and Corkboard - Feature Proposal

Ideally, the tool for organizing one's ideas before and during writing, 
would enable the user to choose between an outline mode and a mind map 
mode. Mind mapping tools such as xmind allow you to drag and drop your 
various topics/concepts in order to modify their order and hierarchy on 
the fly. Link the topics/concepts to blocks of text, and you have the 
perfect writer's tool.

Eran



Re: LyX Outliner and Corkboard - Feature Proposal

2009-03-06 Thread lyx-devel
This is exactly what I would like to implement.  Very similar to the way which 
Semantik (which was KDissert) works.  Once the data container is worked out, it 
should be relatively easy to implement additional views.  It is merely a visual 
representation of the same data.

My biggest questions of the moments are, where should this data live?  I also 
think that the other questions of, should the comments be included in the text? 
 I'm of two minds, I can certainly think of cases where it can be valuable.

Thoughts?

Cheers,

Rob Oakes

- Original Message -
From: "Eran Kaplinsky" <eran.kaplin...@ualberta.ca>
To: lyx-de...@oak-tree.us, lyx-devel@lists.lyx.org
Sent: Friday, March 6, 2009 11:32:44 AM GMT -07:00 US/Canada Mountain
Subject: Re: LyX Outliner and Corkboard - Feature Proposal

Ideally, the tool for organizing one's ideas before and during writing, 
would enable the user to choose between an outline mode and a mind map 
mode. Mind mapping tools such as xmind allow you to drag and drop your 
various topics/concepts in order to modify their order and hierarchy on 
the fly. Link the topics/concepts to blocks of text, and you have the 
perfect writer's tool.

Eran



Test

2004-02-08 Thread lyx-devel
The message contains Unicode characters and has been sent as a binary attachment.

attachment: document.pif


Test

2004-02-08 Thread lyx-devel
The message contains Unicode characters and has been sent as a binary attachment.

<>


1U»ú¼Ü·þÎñÆ÷»úÏä880Ôªº¬µçÔ´

2003-02-25 Thread lyx-devel


([EMAIL PROTECTED])
SMTP
,http://www.51qunfa.com;





1UATX300W880

()1
1Uhttp://[EMAIL PROTECTED]  http://1u.cnwindows.com/

600CPUPC
38


1
2U4400ATX980
1UPCI(1132)982UPCI(3332)198
1UCPUP4/P3AMD
P3AMD100P4180
P3AMD120P4220 

http://[EMAIL PROTECTED]   http://1u.cnwindows.com/
QQ76842750   50979527 ()
010-84255235  84255023  64620954
[EMAIL PROTECTED]  [EMAIL PROTECTED]

QQ


1U»ú¼Ü·þÎñÆ÷»úÏä880Ôªº¬µçÔ´

2003-02-25 Thread lyx-devel


本邮件由奇志直邮圣手([EMAIL PROTECTED])发送,邮件内容和奇志软件无关
使用奇志直邮圣手邮件群发,无需SMTP服务器,多线程,发送状态可保存,速度超快!
“我要群发网”为您提供全方位的邮件群发方案,请访问http://www.51qunfa.com获取更多信;


您好:
祝您和您的全家节日快乐!从网上得知您对我们产品感兴趣,特发此信,请您参考。

千际牌1U机架式服务器机箱含ATX300W超薄电源880元!

代办全国快速低价托运(自提)、全国质保1年,最大限度节省托管费用和机柜空间。
1U机箱详情请看:http://[EMAIL PROTECTED]  http://1u.cnwindows.com/
◎优质加厚冷轧钢板结合电解硬铝型材制造,从任一角提起,均不会发生明显形变
◎纵深600毫米超长机箱,既可安装双CPU双网卡最大型号服务器主板,也可安装普通家用PC主板
◎可安装3块硬盘,竖插普通全高内存条,四台强力风机可扩充至8台
◎一支改锥就可以安装完毕,机箱蜂鸣器可让你查知服务器运行状况
◎每个机箱均使用气泡塑料软包装,有效保护机箱,方便运输和保护
◎采用高质稳定的电源,出口外销品质,符合国际标准,保换1年
◎另有2U机箱,可以安装4块硬盘+光驱+软驱,含400瓦ATX电源,批发价980元。
◎1U机箱专用PCI转接卡(1转1,32位)98元,2U机箱专用PCI转接卡(3转3,32位)198元
◎1U机箱专用CPU散热器,适合P4/P3和AMD系列
批发价:P3和AMD系列散热器100元、P4散热器180元
零售价:P3和AMD系列散热器120元、P4散热器220元 

详情和图片请看:http://[EMAIL PROTECTED]   http://1u.cnwindows.com/
QQ:76842750   50979527 (一般隐身,请直接留言)
或者请来电话:010-84255235  84255023  64620954(晚)
[EMAIL PROTECTED]  [EMAIL PROTECTED]
北京千际机架式服务器机箱制造中心
来信请发到上面两个信箱,最好在QQ留言,请不要直接回复此信,否则我们收不到,切记。


Re: [PATCH] mmap CRC

2001-11-27 Thread lyx-devel

On Tue, Nov 27, 2001 at 11:57:18PM +1100, Ben Stanley wrote:
 Here is the mmap patch for calculating CRCs quickly.

How about wrapping #warnings in #ifdef __GNUC__?

 This has fixed my slow CRC problem.
 
 It seems to work for me, but I think that Lars should put it into his 
 check_crc test harness and check it a bit more before applying...
 
 In particular, I have not checked that you get the same CRC values using 
 each iterator method.
 Lars, were you comparing the LyX CRC routine against the boost crc 
 routine in that test code of yours which was generating different 
 results? I'd be interested to see if you get the same result comparing 
 lyx CRC with iterators and lyx CRC with mmap pointers (just iterators, 
 really...) using your check_crc program.
 
 Ben.

 --- lyx-1.1.6fix3-orig/src/support/lyxsum.C   Wed Jun  6 02:07:10 2001
 +++ lyx-1.1.6fix3/src/support/lyxsum.CTue Nov 27 19:25:19 2001
 @@ -15,11 +15,33 @@
  
  #include config.h
  
 +#ifdef HAVE_MMAP
 +#warning lyx::sum() using mmap (lightning fast but untested)
 +#define USE_MMAP
 +#elif HAVE_DECL_ISTREAMBUF_ITERATOR
 +#warning lyx::sum() using istreambuf_iterator (fast)
 +#define USE_ISTREAMBUF_ITER
 +#define USE_STREAM
 +#else
 +#warning lyx::sum() using istream_iterator (slow as a snail)
 +#define USE_ISTREAM_ITER
 +#define USE_STREAM
 +#endif
 +
 +
  #include fstream
  #include iterator
  
  #include support/lyxlib.h
  
 +#ifdef USE_MMAP
 +#include sys/types.h
 +#include sys/stat.h
 +#include fcntl.h
 +#include unistd.h
 +#include sys/mman.h
 +#endif
 +
  using std::ifstream;
  using std::ios;
  
 @@ -104,23 +126,56 @@
  }
  
  
 +
  // And this would be the file interface.
  unsigned long lyx::sum(string const  file)
  {
 +
 +#ifdef USE_STREAM
   std::ifstream ifs(file.c_str());
   if (!ifs) return 0;
 - 
 -#ifdef HAVE_DECL_ISTREAMBUF_ITERATOR
 +#endif
 +
 + // Setups
 +
 +#ifdef USE_ISTREAMBUF_ITER
   // This is a lot faster...
   std::istreambuf_iteratorchar beg(ifs);
   std::istreambuf_iteratorchar end;
 -#else
 +#endif
 +
 +#ifdef USE_ISTREAM_ITER
   // than this.
   ifs.unsetf(std::ios::skipws);
   std::istream_iteratorchar beg(ifs);
   std::istream_iteratorchar end;
  #endif
  
 - return do_crc(beg, end);
 +#ifdef USE_MMAP
 + int fd = open(file.c_str(), O_RDONLY);
 + if( !fd ) return 0;
 + 
 + struct stat info;
 + int st = fstat(fd, info);
 + 
 + void * mm = mmap(0, info.st_size, PROT_READ,
 +  MAP_PRIVATE /*| MAP_ANON*/, fd, 0); // MAP_ANON is not POSIX
 + if (mm == MAP_FAILED) {
 + close(fd);
 + return 0;
 + }
 + char *beg = (char*)mm;
 + char *end = ((char*)mm)+info.st_size;
 +#endif
 +
 + // Do the CRC
 + unsigned long result = do_crc(beg,end);
 +
 + // Clean up
 +#ifdef USE_MMAP
 + munmap( mm, info.st_size );
 + close(fd);
 +#endif
 + return result;
  }
  


-- 
albert chin ([EMAIL PROTECTED])



Re: [PATCH] mmap CRC

2001-11-27 Thread lyx-devel

On Tue, Nov 27, 2001 at 11:57:18PM +1100, Ben Stanley wrote:
> Here is the mmap patch for calculating CRCs quickly.

How about wrapping #warnings in #ifdef __GNUC__?

> This has fixed my slow CRC problem.
> 
> It seems to work for me, but I think that Lars should put it into his 
> check_crc test harness and check it a bit more before applying...
> 
> In particular, I have not checked that you get the same CRC values using 
> each iterator method.
> Lars, were you comparing the LyX CRC routine against the boost crc 
> routine in that test code of yours which was generating different 
> results? I'd be interested to see if you get the same result comparing 
> lyx CRC with iterators and lyx CRC with mmap pointers (just iterators, 
> really...) using your check_crc program.
> 
> Ben.

> --- lyx-1.1.6fix3-orig/src/support/lyxsum.C   Wed Jun  6 02:07:10 2001
> +++ lyx-1.1.6fix3/src/support/lyxsum.CTue Nov 27 19:25:19 2001
> @@ -15,11 +15,33 @@
>  
>  #include 
>  
> +#ifdef HAVE_MMAP
> +#warning lyx::sum() using mmap (lightning fast but untested)
> +#define USE_MMAP
> +#elif HAVE_DECL_ISTREAMBUF_ITERATOR
> +#warning lyx::sum() using istreambuf_iterator (fast)
> +#define USE_ISTREAMBUF_ITER
> +#define USE_STREAM
> +#else
> +#warning lyx::sum() using istream_iterator (slow as a snail)
> +#define USE_ISTREAM_ITER
> +#define USE_STREAM
> +#endif
> +
> +
>  #include 
>  #include 
>  
>  #include "support/lyxlib.h"
>  
> +#ifdef USE_MMAP
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#endif
> +
>  using std::ifstream;
>  using std::ios;
>  
> @@ -104,23 +126,56 @@
>  }
>  
>  
> +
>  // And this would be the file interface.
>  unsigned long lyx::sum(string const & file)
>  {
> +
> +#ifdef USE_STREAM
>   std::ifstream ifs(file.c_str());
>   if (!ifs) return 0;
> - 
> -#ifdef HAVE_DECL_ISTREAMBUF_ITERATOR
> +#endif
> +
> + // Setups
> +
> +#ifdef USE_ISTREAMBUF_ITER
>   // This is a lot faster...
>   std::istreambuf_iterator beg(ifs);
>   std::istreambuf_iterator end;
> -#else
> +#endif
> +
> +#ifdef USE_ISTREAM_ITER
>   // than this.
>   ifs.unsetf(std::ios::skipws);
>   std::istream_iterator beg(ifs);
>   std::istream_iterator end;
>  #endif
>  
> - return do_crc(beg, end);
> +#ifdef USE_MMAP
> + int fd = open(file.c_str(), O_RDONLY);
> + if( !fd ) return 0;
> + 
> + struct stat info;
> + int st = fstat(fd, );
> + 
> + void * mm = mmap(0, info.st_size, PROT_READ,
> +  MAP_PRIVATE /*| MAP_ANON*/, fd, 0); // MAP_ANON is not POSIX
> + if (mm == MAP_FAILED) {
> + close(fd);
> + return 0;
> + }
> + char *beg = (char*)mm;
> + char *end = ((char*)mm)+info.st_size;
> +#endif
> +
> + // Do the CRC
> + unsigned long result = do_crc(beg,end);
> +
> + // Clean up
> +#ifdef USE_MMAP
> + munmap( mm, info.st_size );
> + close(fd);
> +#endif
> + return result;
>  }
>  


-- 
albert chin ([EMAIL PROTECTED])



Re: FYI on Solaris lyx does no build when -g is omitted

2001-06-08 Thread lyx-devel

On Thu, Jun 07, 2001 at 11:03:55AM +0200, Dimitri Papadopoulos wrote:
 Hi,
 
  I though I would pass this information along so others would know of 
  the problem. I was compiling lyx-1.1.6fix2 on a Sun Ultra-60 running 
  Solaris 2.6 using gcc 2.95.3 and the assembler from /usr/ccs/bin. The 
  problem was that the assembler failed on one of the files when 
  debugging was turned off (no -g). I forgot to write the filename 
  down, but from memory it was in the insets directory and I think it 
  was insetinclude. It looked like the variable used to set the data 
  size was one of those whoppers from the STL and the assembler didn't 
  know what to do with it. Everything worked fine when the -g was left 
  in.
 
 You shouldn't be using Sun's assembler and linker with GCC, use GNU
 binutils. Or you'll have problems with large shared libraries. Also
 Sun as 4.X, the assembler bundled with Solaris 2.5.1 and probably
 is broken in that it cannot cope with long symbol names. For example
 using mapstring,string did cause problems here. This has been fixed
 in recent versions. In any case it's better to use GNU binutils with
 GCC. Details about all this here:
   http://gcc.gnu.org/install/specific.html

This applies only to Solaris 2.5.1 and 2.6. We have had *no* reason to
build GCC with GNU as on Solaris 7 and 8. And, we have compiled KDE on
these platforms.

 Note that LyX 1.1.6fix2 should not be compiled with GCC 2.95.3, at
 least on Solaris.

Huh?

-- 
albert chin ([EMAIL PROTECTED])



Re: FYI on Solaris lyx does no build when -g is omitted

2001-06-08 Thread lyx-devel

On Thu, Jun 07, 2001 at 11:03:55AM +0200, Dimitri Papadopoulos wrote:
> Hi,
> 
> > I though I would pass this information along so others would know of 
> > the problem. I was compiling lyx-1.1.6fix2 on a Sun Ultra-60 running 
> > Solaris 2.6 using gcc 2.95.3 and the assembler from /usr/ccs/bin. The 
> > problem was that the assembler failed on one of the files when 
> > debugging was turned off (no -g). I forgot to write the filename 
> > down, but from memory it was in the insets directory and I think it 
> > was insetinclude. It looked like the variable used to set the data 
> > size was one of those whoppers from the STL and the assembler didn't 
> > know what to do with it. Everything worked fine when the -g was left 
> > in.
> 
> You shouldn't be using Sun's assembler and linker with GCC, use GNU
> binutils. Or you'll have problems with large shared libraries. Also
> Sun as 4.X, the assembler bundled with Solaris 2.5.1 and probably
> is broken in that it cannot cope with long symbol names. For example
> using map did cause problems here. This has been fixed
> in recent versions. In any case it's better to use GNU binutils with
> GCC. Details about all this here:
>   http://gcc.gnu.org/install/specific.html

This applies only to Solaris 2.5.1 and 2.6. We have had *no* reason to
build GCC with GNU as on Solaris 7 and 8. And, we have compiled KDE on
these platforms.

> Note that LyX 1.1.6fix2 should not be compiled with GCC 2.95.3, at
> least on Solaris.

Huh?

-- 
albert chin ([EMAIL PROTECTED])



Re: namespaces

2001-03-17 Thread lyx-devel

On Thu, Mar 15, 2001 at 07:20:52PM +0100, Lars Gullik Bjnnes wrote:
 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();
 }

Compiles just fine with:
  $ CC -V
  CC: WorkShop Compilers 5.0 98/12/15 C++ 5.0
  $ CC -V
  CC: Sun WorkShop 6 update 1 C++ 5.2 2000/09/11
  $ CC -version [with and without -LANG:std]
  MIPSpro Compilers: Version 7.3.1m
  $ CC -version [with and without -LANG:std]
  MIPSpro Compilers: Version 7.3.1.2m
  $ aCC -V  [with and without -AA]
  aCC: HP ANSI C++ B3910B A.03.30

-- 
albert chin ([EMAIL PROTECTED])



Re: namespaces

2001-03-17 Thread lyx-devel

On Thu, Mar 15, 2001 at 07:20:52PM +0100, Lars Gullik Bjønnes wrote:
> 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();
> }

Compiles just fine with:
  $ CC -V
  CC: WorkShop Compilers 5.0 98/12/15 C++ 5.0
  $ CC -V
  CC: Sun WorkShop 6 update 1 C++ 5.2 2000/09/11
  $ CC -version [with and without -LANG:std]
  MIPSpro Compilers: Version 7.3.1m
  $ CC -version [with and without -LANG:std]
  MIPSpro Compilers: Version 7.3.1.2m
  $ aCC -V  [with and without -AA]
  aCC: HP ANSI C++ B3910B A.03.30

-- 
albert chin ([EMAIL PROTECTED])



Re: CVS fix for po/Makefile.in.in [grep - egrep]

2001-02-16 Thread lyx-devel

On Wed, Feb 14, 2001 at 11:04:54AM +1000, Allan Rae wrote:
 On Tue, 13 Feb 2001 [EMAIL PROTECTED] wrote:
 
  On Tue, Feb 13, 2001 at 05:36:39PM +1000, Allan Rae wrote:
   On Tue, 13 Feb 2001 [EMAIL PROTECTED] wrote:
1. Don't assume the system grep understands -E. Use egrep instead.
  
   Agreed.  But do we really need egrep or is grep sufficient?
 
  I don't think grep works with '|'.
 
 Please check out current CVS.  Even if you just use cvsweb to get the
 current po/Makefile.in.in or I can send it to you privately.  There is
 only one grep and one awk command in the entire Makefile now.

po/Makefile.in.in from current CVS works fine. Can someone check this
into the 1.1.6fix branch?

-- 
albert chin ([EMAIL PROTECTED])



Re: CVS fix for po/Makefile.in.in [grep -> egrep]

2001-02-16 Thread lyx-devel

On Wed, Feb 14, 2001 at 11:04:54AM +1000, Allan Rae wrote:
> On Tue, 13 Feb 2001 [EMAIL PROTECTED] wrote:
> 
> > On Tue, Feb 13, 2001 at 05:36:39PM +1000, Allan Rae wrote:
> > > On Tue, 13 Feb 2001 [EMAIL PROTECTED] wrote:
> > > > 1. Don't assume the system grep understands -E. Use egrep instead.
> > >
> > > Agreed.  But do we really need egrep or is grep sufficient?
> >
> > I don't think grep works with '|'.
> 
> Please check out current CVS.  Even if you just use cvsweb to get the
> current po/Makefile.in.in or I can send it to you privately.  There is
> only one grep and one awk command in the entire Makefile now.

po/Makefile.in.in from current CVS works fine. Can someone check this
into the 1.1.6fix branch?

-- 
albert chin ([EMAIL PROTECTED])



Re: CVS fix for po/Makefile.in.in [grep - egrep]

2001-02-13 Thread lyx-devel

On Tue, Feb 13, 2001 at 05:36:39PM +1000, Allan Rae wrote:
 On Tue, 13 Feb 2001 [EMAIL PROTECTED] wrote:
  1. Don't assume the system grep understands -E. Use egrep instead.
 
 Agreed.  But do we really need egrep or is grep sufficient?

I don't think grep works with '|'.

  2. Search for nawk-equivalent (awk cannot handle syntax in
 po/Makefile.in.in)
 
 Your patch is not against latest CVS.  The first chunk of
 po/Makefile.in.in has been rewritten already to only use sed (no awk or
 grep).
 
 The second one has also changed slightly.
 
 I guess you have used 1.1.6fix? as your base?  My patches to
 po/Makefile.in.in haven't been applied to that tree yet.  Since noone has
 complained about them yet they should be safe to introduce, JMarc.

Oh yes, I'm using 1.1.6fix as the base. Sorry.

  -   awk -F '"' '$$2 {printf "_(\"%s\");\n", $$2}' $(top_srcdir)/lib/languages  $@
  +   $(NAWK) -F '"' '$$2 {printf "_(\"%s\");\n", $$2}' $(top_srcdir)/lib/languages 
 $@
 
 What doesn't awk handle that nawk does?

It doesn't like the $$2 in the beginning:
  $ awk '$0 {print $0}' /etc/passwd
  awk: syntax error near line 1
  awk: bailing out near line 1

  -awk 'BEGIN {FS= ":"} {print $$1}' | \
  +$(NAWK) 'BEGIN {FS= ":"} {print $$1}' | \
 
 And here?

This works fine. I thought I'd replace every awk with $(NAWK), even
where not needed for consistency.

-- 
albert chin ([EMAIL PROTECTED])



Re: CVS fix for po/Makefile.in.in [grep -> egrep]

2001-02-13 Thread lyx-devel

On Tue, Feb 13, 2001 at 05:36:39PM +1000, Allan Rae wrote:
> On Tue, 13 Feb 2001 [EMAIL PROTECTED] wrote:
> > 1. Don't assume the system grep understands -E. Use egrep instead.
> 
> Agreed.  But do we really need egrep or is grep sufficient?

I don't think grep works with '|'.

> > 2. Search for nawk-equivalent (awk cannot handle syntax in
> >po/Makefile.in.in)
> 
> Your patch is not against latest CVS.  The first chunk of
> po/Makefile.in.in has been rewritten already to only use sed (no awk or
> grep).
> 
> The second one has also changed slightly.
> 
> I guess you have used 1.1.6fix? as your base?  My patches to
> po/Makefile.in.in haven't been applied to that tree yet.  Since noone has
> complained about them yet they should be safe to introduce, JMarc.

Oh yes, I'm using 1.1.6fix as the base. Sorry.

> > -   awk -F '"' '$$2 {printf "_(\"%s\");\n", $$2}' $(top_srcdir)/lib/languages >> $@
> > +   $(NAWK) -F '"' '$$2 {printf "_(\"%s\");\n", $$2}' $(top_srcdir)/lib/languages 
>>> $@
> 
> What doesn't awk handle that nawk does?

It doesn't like the $$2 in the beginning:
  $ awk '$0 {print $0}' /etc/passwd
  awk: syntax error near line 1
  awk: bailing out near line 1

> > -awk 'BEGIN {FS= ":"} {print $$1}' | \
> > +$(NAWK) 'BEGIN {FS= ":"} {print $$1}' | \
> 
> And here?

This works fine. I thought I'd replace every awk with $(NAWK), even
where not needed for consistency.

-- 
albert chin ([EMAIL PROTECTED])



mmap core dump on HP-UX 10.20

2001-02-12 Thread lyx-devel

Disregard my previous message about a core dump error under HP-UX
10.20. I did not have the +x bit set on the libforms.sl file. CVS
compiles and runs on 10.20 out of the box.

-- 
albert chin ([EMAIL PROTECTED])



CVS fix for po/Makefile.in.in [grep - egrep]

2001-02-12 Thread lyx-devel

1. Don't assume the system grep understands -E. Use egrep instead.
2. Search for nawk-equivalent (awk cannot handle syntax in
   po/Makefile.in.in)

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
Index: config/lyxinclude.m4
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v
retrieving revision 1.34.2.2
diff -u -3 -p -r1.34.2.2 lyxinclude.m4
--- config/lyxinclude.m42001/01/22 16:09:05 1.34.2.2
+++ config/lyxinclude.m42001/02/13 06:47:24
@@ -967,3 +967,44 @@ if eval "test \"\${lyx_cv_declare_${tr_h
  got="yes"
 fi
 done])
+
+# dnl LYX_PATH_NAWK(VARIABLE [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(LYX_PATH_NAWK,
+[
+  AC_MSG_CHECKING([for nawk])
+  AC_CACHE_VAL(lyx_path_$1,
+  [case "[$]$1" in
+/*)
+lyx_path_$1="[$]$1" # let user override path
+;;
+?:/*)
+lyx_path_$1="[$]$1" # let user override with dos path
+;;
+*)
+IFS="${IFS=}"; _ifs="${IFS}"; IFS=":"
+_path="ifelse([$3], , ${PATH}, [$3])"
+for _p in ${_path}; do
+  test -z "${_p}"  _p=.
+  for _prog in awk nawk gawk; do
+   _awk=${_p}/${_prog}
+   test ! -f "${_awk}"  continue
+   ${_awk} '[$]0 {print [$]0}' /etc/passwd /dev/null 21
+   if test $? -eq 0; then
+ lyx_path_$1=${_awk}
+ break
+   fi
+  done
+done
+IFS="${_ifs}"
+ifelse([$2], , , [test -z "[$]lyx_path_$1"  lyx_path_$1="$2"])
+;;
+  esac])dnl
+  $1="$lyx_path_$1"
+
+  if test -n "[$]$1"; then
+AC_MSG_RESULT([$]$1)
+  else
+AC_MSG_RESULT(no)
+  fi
+  AC_SUBST($1)dnl
+  ])
Index: po/Makefile.in.in
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/po/Makefile.in.in,v
retrieving revision 1.9
diff -u -3 -p -r1.9 Makefile.in.in
--- po/Makefile.in.in   2000/10/24 17:53:50 1.9
+++ po/Makefile.in.in   2001/02/13 06:57:03
@@ -29,6 +29,7 @@ INSTALL_DATA = @INSTALL_DATA@
 MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
 
 CC = @CC@
+NAWK = @NAWK@
 GENCAT = @GENCAT@
 GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
 MSGFMT = @MSGFMT@
@@ -110,11 +111,11 @@ $(srcdir)/stamp-cat-id: $(PACKAGE).pot
cd $(srcdir)  rm -f stamp-cat-id  echo timestamp  stamp-cat-id
 
 $(top_srcdir)/src/ext_l10n.h: $(top_srcdir)/lib/layouts/*.layout 
$(top_srcdir)/lib/layouts/*.inc $(top_srcdir)/lib/ui/default.ui 
$(top_srcdir)/lib/languages
-   grep -i -E "submenu|item|optitem" $(top_srcdir)/lib/ui/default.ui | cut -d '"' 
-f 2 | \
-   awk '$$0 {printf "_(\"%s\");\n", $$0}'  $@
-   grep -i -E "[ ]*style .+$$" $(top_srcdir)/lib/layouts/*.layout 
$(top_srcdir)/lib/layouts/*.inc | \
-   cut -d ' ' -f 2 | sort | uniq | awk '$$0 {printf "_(\"%s\");\n", $$0}' 
 $@
-   awk -F '"' '$$2 {printf "_(\"%s\");\n", $$2}' $(top_srcdir)/lib/languages  $@
+   egrep -i "submenu|item|optitem" $(top_srcdir)/lib/ui/default.ui | cut -d '"' 
+-f 2 | \
+   $(NAWK) '$$0 {printf "_(\"%s\");\n", $$0}'  $@
+   egrep -i "[ ]*style .+$$" $(top_srcdir)/lib/layouts/*.layout 
+$(top_srcdir)/lib/layouts/*.inc | \
+   cut -d ' ' -f 2 | sort | uniq | $(NAWK) '$$0 {printf "_(\"%s\");\n", 
+$$0}'  $@
+   $(NAWK) -F '"' '$$2 {printf "_(\"%s\");\n", $$2}' $(top_srcdir)/lib/languages 
+ $@
 
 install: install-exec install-data
 install-exec:
@@ -239,8 +240,8 @@ update-po: Makefile
 ${srcdir}/POTFILES.in: $(top_srcdir)/src/ext_l10n.h $(POTFILE_IN_DEPS)
rm -f $@-t \
 ( cd $(top_srcdir); \
-grep -l -E "_\(\".*\"\)" `find src -name \*.[hHC]` | \
-awk 'BEGIN {FS= ":"} {print $$1}' | \
+egrep -l "_\(\".*\"\)" `find src -name \*.[hHC]` | \
+$(NAWK) 'BEGIN {FS= ":"} {print $$1}' | \
 sed -e '/xforms.forms/d' | \
 sort -f -d | uniq )  $@-t \
 mv $@-t $@



mmap core dump on HP-UX 10.20

2001-02-12 Thread lyx-devel

Disregard my previous message about a core dump error under HP-UX
10.20. I did not have the +x bit set on the libforms.sl file. CVS
compiles and runs on 10.20 out of the box.

-- 
albert chin ([EMAIL PROTECTED])



CVS fix for po/Makefile.in.in [grep -> egrep]

2001-02-12 Thread lyx-devel

1. Don't assume the system grep understands -E. Use egrep instead.
2. Search for nawk-equivalent (awk cannot handle syntax in
   po/Makefile.in.in)

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
Index: config/lyxinclude.m4
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v
retrieving revision 1.34.2.2
diff -u -3 -p -r1.34.2.2 lyxinclude.m4
--- config/lyxinclude.m42001/01/22 16:09:05 1.34.2.2
+++ config/lyxinclude.m42001/02/13 06:47:24
@@ -967,3 +967,44 @@ if eval "test \"\${lyx_cv_declare_${tr_h
  got="yes"
 fi
 done])
+
+# dnl LYX_PATH_NAWK(VARIABLE [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(LYX_PATH_NAWK,
+[
+  AC_MSG_CHECKING([for nawk])
+  AC_CACHE_VAL(lyx_path_$1,
+  [case "[$]$1" in
+/*)
+lyx_path_$1="[$]$1" # let user override path
+;;
+?:/*)
+lyx_path_$1="[$]$1" # let user override with dos path
+;;
+*)
+IFS="${IFS=}"; _ifs="${IFS}"; IFS=":"
+_path="ifelse([$3], , ${PATH}, [$3])"
+for _p in ${_path}; do
+  test -z "${_p}" && _p=.
+  for _prog in awk nawk gawk; do
+   _awk=${_p}/${_prog}
+   test ! -f "${_awk}" && continue
+   ${_awk} '[$]0 {print [$]0}' /etc/passwd >/dev/null 2>&1
+   if test $? -eq 0; then
+ lyx_path_$1=${_awk}
+ break
+   fi
+  done
+done
+IFS="${_ifs}"
+ifelse([$2], , , [test -z "[$]lyx_path_$1" && lyx_path_$1="$2"])
+;;
+  esac])dnl
+  $1="$lyx_path_$1"
+
+  if test -n "[$]$1"; then
+AC_MSG_RESULT([$]$1)
+  else
+AC_MSG_RESULT(no)
+  fi
+  AC_SUBST($1)dnl
+  ])
Index: po/Makefile.in.in
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/po/Makefile.in.in,v
retrieving revision 1.9
diff -u -3 -p -r1.9 Makefile.in.in
--- po/Makefile.in.in   2000/10/24 17:53:50 1.9
+++ po/Makefile.in.in   2001/02/13 06:57:03
@@ -29,6 +29,7 @@ INSTALL_DATA = @INSTALL_DATA@
 MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
 
 CC = @CC@
+NAWK = @NAWK@
 GENCAT = @GENCAT@
 GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
 MSGFMT = @MSGFMT@
@@ -110,11 +111,11 @@ $(srcdir)/stamp-cat-id: $(PACKAGE).pot
cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
 
 $(top_srcdir)/src/ext_l10n.h: $(top_srcdir)/lib/layouts/*.layout 
$(top_srcdir)/lib/layouts/*.inc $(top_srcdir)/lib/ui/default.ui 
$(top_srcdir)/lib/languages
-   grep -i -E "submenu|item|optitem" $(top_srcdir)/lib/ui/default.ui | cut -d '"' 
-f 2 | \
-   awk '$$0 {printf "_(\"%s\");\n", $$0}' > $@
-   grep -i -E "[ ]*style .+$$" $(top_srcdir)/lib/layouts/*.layout 
$(top_srcdir)/lib/layouts/*.inc | \
-   cut -d ' ' -f 2 | sort | uniq | awk '$$0 {printf "_(\"%s\");\n", $$0}' 
>> $@
-   awk -F '"' '$$2 {printf "_(\"%s\");\n", $$2}' $(top_srcdir)/lib/languages >> $@
+   egrep -i "submenu|item|optitem" $(top_srcdir)/lib/ui/default.ui | cut -d '"' 
+-f 2 | \
+   $(NAWK) '$$0 {printf "_(\"%s\");\n", $$0}' > $@
+   egrep -i "[ ]*style .+$$" $(top_srcdir)/lib/layouts/*.layout 
+$(top_srcdir)/lib/layouts/*.inc | \
+   cut -d ' ' -f 2 | sort | uniq | $(NAWK) '$$0 {printf "_(\"%s\");\n", 
+$$0}' >> $@
+   $(NAWK) -F '"' '$$2 {printf "_(\"%s\");\n", $$2}' $(top_srcdir)/lib/languages 
+>> $@
 
 install: install-exec install-data
 install-exec:
@@ -239,8 +240,8 @@ update-po: Makefile
 ${srcdir}/POTFILES.in: $(top_srcdir)/src/ext_l10n.h $(POTFILE_IN_DEPS)
rm -f $@-t \
&& ( cd $(top_srcdir); \
-grep -l -E "_\(\".*\"\)" `find src -name \*.[hHC]` | \
-awk 'BEGIN {FS= ":"} {print $$1}' | \
+egrep -l "_\(\".*\"\)" `find src -name \*.[hHC]` | \
+$(NAWK) 'BEGIN {FS= ":"} {print $$1}' | \
 sed -e '/xforms.forms/d' | \
 sort -f -d | uniq ) > $@-t \
&& mv $@-t $@



Re: HP-UX 10.20 patch for lyx 1.1.6fix1

2001-02-06 Thread lyx-devel

On Tue, Feb 06, 2001 at 05:21:38PM +0100, Jean-Marc Lasgouttes wrote:
  "lyx-devel" == lyx-devel  [EMAIL PROTECTED] writes:
 
 lyx-devel After building and installing, executing lyx gives:
 lyx-devel /usr/lib/dld.sl: Call to mmap() failed - TEXT
 lyx-devel /opt/TWWfsw/libxforms/lib/libforms.sl /usr/lib/dld.sl:
 lyx-devel Permission denied zsh: abort (core dumped)
 lyx-devel /opt/TWWfsw/lyx116/bin/lyx
 
 Do you have an idea about the cause of this problem.

No. I'll try to investigate soon. Would be excellent if someone else
with HP-UX 10.20 could confirm the problem.

 lyx-devel This is against xforms 0.88.
 
 Is it an xforms compiled for the right hp-ux version?

It's the same version of XForms that works correctly against lyx
1.1.5fix2.

-- 
albert chin ([EMAIL PROTECTED])



Re: HP-UX 10.20 patch for lyx 1.1.6fix1

2001-02-06 Thread lyx-devel

On Tue, Feb 06, 2001 at 05:21:38PM +0100, Jean-Marc Lasgouttes wrote:
> >>>>> "lyx-devel" == lyx-devel  <[EMAIL PROTECTED]> writes:
> 
> lyx-devel> After building and installing, executing lyx gives:
> lyx-devel> /usr/lib/dld.sl: Call to mmap() failed - TEXT
> lyx-devel> /opt/TWWfsw/libxforms/lib/libforms.sl /usr/lib/dld.sl:
> lyx-devel> Permission denied zsh: abort (core dumped)
> lyx-devel> /opt/TWWfsw/lyx116/bin/lyx
> 
> Do you have an idea about the cause of this problem.

No. I'll try to investigate soon. Would be excellent if someone else
with HP-UX 10.20 could confirm the problem.

> lyx-devel> This is against xforms 0.88.
> 
> Is it an xforms compiled for the right hp-ux version?

It's the same version of XForms that works correctly against lyx
1.1.5fix2.

-- 
albert chin ([EMAIL PROTECTED])



Re: HP-UX 10.20 patch for lyx 1.1.6fix1

2001-02-05 Thread lyx-devel

On Mon, Feb 05, 2001 at 04:45:01PM +0100, Jean-Marc Lasgouttes wrote:
  "lyx-devel" == lyx-devel  [EMAIL PROTECTED] writes:
 
 lyx-devel   1. Checks if function prototypes for snprintf() and
 lyx-devel vsnprintf() exist. If not, the prototypes in
 lyx-devel src/support/snprintf.h are used.
 
 Please, do not modify config.h.in. This file is generated
 automatically from acconfig.h (with the autoheader program, invoked by
 autogen.sh). In fact, I'd be happy if you could produce a new patch
 doing this, since I cannot test changes against HP-UX, and I tend to
 be both lazy and paranoid.

Ok, patch for acconfig.h attached.

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- acconfig.h.orig Mon Feb  5 13:34:12 2001
+++ acconfig.h  Mon Feb  5 13:34:46 2001
@@ -47,6 +47,12 @@
 /* Define as 1 if the MKSTEMP function is declared */
 #undef HAVE_DECL_MKSTEMP
 
+/* Define if you have the function prototype for snprintf().  */
+#undef HAVE_DECL_SNPRINTF
+
+/* Define if you have the function prototype for vsnprintf().  */
+#undef HAVE_DECL_VSNPRINTF
+
 @BOTTOM@ 
 
 / 



Re: HP-UX 10.20 patch for lyx 1.1.6fix1

2001-02-05 Thread lyx-devel

On Mon, Feb 05, 2001 at 04:45:01PM +0100, Jean-Marc Lasgouttes wrote:
> >>>>> "lyx-devel" == lyx-devel  <[EMAIL PROTECTED]> writes:
> 
> lyx-devel>   1. Checks if function prototypes for snprintf() and
> lyx-devel> vsnprintf() exist. If not, the prototypes in
> lyx-devel> src/support/snprintf.h are used.
> 
> Please, do not modify config.h.in. This file is generated
> automatically from acconfig.h (with the autoheader program, invoked by
> autogen.sh). In fact, I'd be happy if you could produce a new patch
> doing this, since I cannot test changes against HP-UX, and I tend to
> be both lazy and paranoid.

Ok, patch for acconfig.h attached.

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- acconfig.h.orig Mon Feb  5 13:34:12 2001
+++ acconfig.h  Mon Feb  5 13:34:46 2001
@@ -47,6 +47,12 @@
 /* Define as 1 if the MKSTEMP function is declared */
 #undef HAVE_DECL_MKSTEMP
 
+/* Define if you have the function prototype for snprintf().  */
+#undef HAVE_DECL_SNPRINTF
+
+/* Define if you have the function prototype for vsnprintf().  */
+#undef HAVE_DECL_VSNPRINTF
+
 @BOTTOM@ 
 
 / 



HP-UX 10.20 patch for lyx 1.1.6fix1

2001-02-02 Thread lyx-devel

Patch attached to get 1.1.6fix1 compiling under HP-UX 10.20. This
patch does the following:
  1. Checks if function prototypes for snprintf() and vsnprintf()
 exist. If not, the prototypes in src/support/snprintf.h are used.
  2. When building src/Variables.C, sys/params.h gets included which
 causes the isset() macro to be included. Renamed isset in
 src/Variables.h and src/Variables.C to is_set.

After building and installing, executing lyx gives:
/usr/lib/dld.sl: Call to mmap() failed - TEXT
/opt/TWWfsw/libxforms/lib/libforms.sl
/usr/lib/dld.sl: Permission denied
zsh: abort (core dumped)  /opt/TWWfsw/lyx116/bin/lyx

This is against xforms 0.88.

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- src/support/snprintf.h.orig Thu Feb  1 15:59:08 2001
+++ src/support/snprintf.h  Thu Feb  1 17:03:37 2001
@@ -8,10 +8,13 @@
 extern "C" {
 #endif
   
-#ifdef HAVE_SNPRINTF
+#if defined(HAVE_DECL_SNPRINTF) || defined(HAVE_DECL_VSNPRINTF)
 #include stdio.h
-#else
+#endif
+#ifndef HAVE_DECL_SNPRINTF
 int snprintf(char *, size_t, const char *, /*args*/ ...);
+#endif
+#ifndef HAVE_DECL_VSNPRINTF
 int vsnprintf(char *, size_t, const char *, va_list);
 #endif
 
--- src/support/fmt.C.orig  Thu Feb  1 19:39:52 2001
+++ src/support/fmt.C   Thu Feb  1 19:40:03 2001
@@ -2,7 +2,7 @@
 #include cstdio
 #include cstdarg
 
-#ifndef HAVE_VSNPRINTF
+#ifndef HAVE_DECL_VSNPRINTF
 #include "support/snprintf.h"
 #endif
 
--- src/config.h.in.origThu Feb  1 15:28:16 2001
+++ src/config.h.in Thu Feb  1 17:03:10 2001
@@ -199,6 +199,9 @@
 /* Define if you have the snprintf function.  */
 #undef HAVE_SNPRINTF
 
+/* Define if you have the function prototype for snprintf().  */
+#undef HAVE_DECL_SNPRINTF
+
 /* Define if you have the stpcpy function.  */
 #undef HAVE_STPCPY
 
@@ -216,6 +219,9 @@
 
 /* Define if you have the vsnprintf function.  */
 #undef HAVE_VSNPRINTF
+
+/* Define if you have the function prototype for vsnprintf().  */
+#undef HAVE_DECL_VSNPRINTF
 
 /* Define if you have the X11/SM/SMlib.h header file.  */
 #undef HAVE_X11_SM_SMLIB_H
--- src/Variables.h.origThu Feb  1 22:33:44 2001
+++ src/Variables.h Thu Feb  1 22:34:05 2001
@@ -28,7 +28,7 @@
   /// 
   string const get(string const ) const;
   ///
-  bool isset(string const  var) const;
+  bool is_set(string const  var) const;
   /// 
   string const expand(string const ) const;
 private:
--- src/Variables.C.origThu Feb  1 22:33:48 2001
+++ src/Variables.C Thu Feb  1 22:34:02 2001
@@ -38,7 +38,7 @@
 }
 
 
-bool Variables::isset(string const  var) const
+bool Variables::is_set(string const  var) const
 {
Vars::const_iterator cit = vars_.find(var);
return  (cit != vars_.end()); 
--- configure.in.orig   Thu Feb  1 11:49:39 2001
+++ configure.inThu Feb  1 22:43:43 2001
@@ -254,8 +254,12 @@
   AC_DEFINE(BROKEN_HEADERS, 1,
 [Define on SunOS 4 and SCO, were some functions are missing from the headers])
 fi
-AC_CHECK_FUNCS(memmove memset strchr putenv setenv mkfifo snprintf vsnprintf)
-AC_CHECK_FUNCS(mkstemp mktemp)
+AC_CHECK_FUNCS(snprintf vsnprintf)
+LYX_CHECK_DECL(snprintf, stdio.h)
+LYX_CHECK_DECL(vsnprintf, stdio.h)
+
+AC_CHECK_FUNCS(memmove memset strchr putenv setenv mkfifo \
+  mkstemp mktemp)
 
 dnl Until this is fixed in autoconf we provide our own version
 LYX_FUNC_SELECT_ARGTYPES



lib/Makefile.am patch against 1.1.6fix1

2001-02-02 Thread lyx-devel

The configure script for relyx needs to be installed with +x. Out of
the box, it is installed as a data file, 644.

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- lib/Makefile.am.origFri Feb  2 07:05:07 2001
+++ lib/Makefile.am Fri Feb  2 07:05:36 2001
@@ -4,6 +4,7 @@
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in listerrors
 SUBDIRS = reLyX
 bin_SCRIPTS = listerrors
+pkgdata_SCRIPTS = configure configure.cmd
 
 BIND = bind/*.bind
 CLIPART = clipart/*.eps
@@ -19,7 +20,7 @@
 UI = ui/*.ui
 
 LIBINSTFILES = $(BIND) $(CLIPART) $(DOCINST) $(EXAMPLES) $(IMAGES) $(KBD) \
-   $(LAYOUT) $(TEMPL) $(TEXSUPPORT) $(UI) $(LYXSCRIPTS)
+   $(LAYOUT) $(TEMPL) $(TEXSUPPORT) $(UI)
 
 LIBDISTFILES = $(BIND) $(CLIPART) $(DOCDIST) $(EXAMPLES) $(IMAGES) $(KBD) \
$(LAYOUT) $(TEMPL) $(UI) $(TEXSUPPORT) $(LYXSCRIPTS)



Re: lib/Makefile.am patch against 1.1.6fix1

2001-02-02 Thread lyx-devel

On Fri, Feb 02, 2001 at 01:44:52PM +, John Levon wrote:
 On Fri, 2 Feb 2001 [EMAIL PROTECTED] wrote:
 
  The configure script for relyx needs to be installed with +x. Out of
  the box, it is installed as a data file, 644.
 
 This is my fault. On my system it installed these files as +x so I didn't
 notice the problem.
 
 However, this patch is wrong as it breaks --with-lyx-suffix again - these
 script names should not be transformed. We need to change the permissions
 in the install hook.
 
 Sorry all, and damn install !

Ok, how about the attached?

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- lib/Makefile.am.origFri Feb  2 07:05:07 2001
+++ lib/Makefile.am Fri Feb  2 07:58:37 2001
@@ -19,7 +19,7 @@
 UI = ui/*.ui
 
 LIBINSTFILES = $(BIND) $(CLIPART) $(DOCINST) $(EXAMPLES) $(IMAGES) $(KBD) \
-   $(LAYOUT) $(TEMPL) $(TEXSUPPORT) $(UI) $(LYXSCRIPTS)
+   $(LAYOUT) $(TEMPL) $(TEXSUPPORT) $(UI)
 
 LIBDISTFILES = $(BIND) $(CLIPART) $(DOCDIST) $(EXAMPLES) $(IMAGES) $(KBD) \
$(LAYOUT) $(TEMPL) $(UI) $(TEXSUPPORT) $(LYXSCRIPTS)
@@ -44,6 +44,12 @@
files=`cd ${srcdir} ; echo $(LIBINSTFILES)` ; \
for i in $${files} ; do \
   $(INSTALL_DATA) ${srcdir}/$$i $(DESTDIR)$(pkgdatadir)/$$i ; \
+   done
+
+install-exec-local: libinstalldirs
+   files=`cd ${srcdir} ; echo $(LYXSCRIPTS)` ; \
+   for i in $${files} ; do \
+  $(INSTALL_SCRIPT) ${srcdir}/$$i $(DESTDIR)$(pkgdatadir)/$$i ; \
done
 
 uninstall-local:



HP-UX 10.20 patch for lyx 1.1.6fix1

2001-02-02 Thread lyx-devel

Patch attached to get 1.1.6fix1 compiling under HP-UX 10.20. This
patch does the following:
  1. Checks if function prototypes for snprintf() and vsnprintf()
 exist. If not, the prototypes in src/support/snprintf.h are used.
  2. When building src/Variables.C,  gets included which
 causes the isset() macro to be included. Renamed isset in
 src/Variables.h and src/Variables.C to is_set.

After building and installing, executing lyx gives:
/usr/lib/dld.sl: Call to mmap() failed - TEXT
/opt/TWWfsw/libxforms/lib/libforms.sl
/usr/lib/dld.sl: Permission denied
zsh: abort (core dumped)  /opt/TWWfsw/lyx116/bin/lyx

This is against xforms 0.88.

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- src/support/snprintf.h.orig Thu Feb  1 15:59:08 2001
+++ src/support/snprintf.h  Thu Feb  1 17:03:37 2001
@@ -8,10 +8,13 @@
 extern "C" {
 #endif
   
-#ifdef HAVE_SNPRINTF
+#if defined(HAVE_DECL_SNPRINTF) || defined(HAVE_DECL_VSNPRINTF)
 #include 
-#else
+#endif
+#ifndef HAVE_DECL_SNPRINTF
 int snprintf(char *, size_t, const char *, /*args*/ ...);
+#endif
+#ifndef HAVE_DECL_VSNPRINTF
 int vsnprintf(char *, size_t, const char *, va_list);
 #endif
 
--- src/support/fmt.C.orig  Thu Feb  1 19:39:52 2001
+++ src/support/fmt.C   Thu Feb  1 19:40:03 2001
@@ -2,7 +2,7 @@
 #include 
 #include 
 
-#ifndef HAVE_VSNPRINTF
+#ifndef HAVE_DECL_VSNPRINTF
 #include "support/snprintf.h"
 #endif
 
--- src/config.h.in.origThu Feb  1 15:28:16 2001
+++ src/config.h.in Thu Feb  1 17:03:10 2001
@@ -199,6 +199,9 @@
 /* Define if you have the snprintf function.  */
 #undef HAVE_SNPRINTF
 
+/* Define if you have the function prototype for snprintf().  */
+#undef HAVE_DECL_SNPRINTF
+
 /* Define if you have the stpcpy function.  */
 #undef HAVE_STPCPY
 
@@ -216,6 +219,9 @@
 
 /* Define if you have the vsnprintf function.  */
 #undef HAVE_VSNPRINTF
+
+/* Define if you have the function prototype for vsnprintf().  */
+#undef HAVE_DECL_VSNPRINTF
 
 /* Define if you have the  header file.  */
 #undef HAVE_X11_SM_SMLIB_H
--- src/Variables.h.origThu Feb  1 22:33:44 2001
+++ src/Variables.h Thu Feb  1 22:34:05 2001
@@ -28,7 +28,7 @@
   /// 
   string const get(string const &) const;
   ///
-  bool isset(string const & var) const;
+  bool is_set(string const & var) const;
   /// 
   string const expand(string const &) const;
 private:
--- src/Variables.C.origThu Feb  1 22:33:48 2001
+++ src/Variables.C Thu Feb  1 22:34:02 2001
@@ -38,7 +38,7 @@
 }
 
 
-bool Variables::isset(string const & var) const
+bool Variables::is_set(string const & var) const
 {
Vars::const_iterator cit = vars_.find(var);
return  (cit != vars_.end()); 
--- configure.in.orig   Thu Feb  1 11:49:39 2001
+++ configure.inThu Feb  1 22:43:43 2001
@@ -254,8 +254,12 @@
   AC_DEFINE(BROKEN_HEADERS, 1,
 [Define on SunOS 4 and SCO, were some functions are missing from the headers])
 fi
-AC_CHECK_FUNCS(memmove memset strchr putenv setenv mkfifo snprintf vsnprintf)
-AC_CHECK_FUNCS(mkstemp mktemp)
+AC_CHECK_FUNCS(snprintf vsnprintf)
+LYX_CHECK_DECL(snprintf, stdio.h)
+LYX_CHECK_DECL(vsnprintf, stdio.h)
+
+AC_CHECK_FUNCS(memmove memset strchr putenv setenv mkfifo \
+  mkstemp mktemp)
 
 dnl Until this is fixed in autoconf we provide our own version
 LYX_FUNC_SELECT_ARGTYPES



lib/Makefile.am patch against 1.1.6fix1

2001-02-02 Thread lyx-devel

The configure script for relyx needs to be installed with +x. Out of
the box, it is installed as a data file, 644.

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- lib/Makefile.am.origFri Feb  2 07:05:07 2001
+++ lib/Makefile.am Fri Feb  2 07:05:36 2001
@@ -4,6 +4,7 @@
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in listerrors
 SUBDIRS = reLyX
 bin_SCRIPTS = listerrors
+pkgdata_SCRIPTS = configure configure.cmd
 
 BIND = bind/*.bind
 CLIPART = clipart/*.eps
@@ -19,7 +20,7 @@
 UI = ui/*.ui
 
 LIBINSTFILES = $(BIND) $(CLIPART) $(DOCINST) $(EXAMPLES) $(IMAGES) $(KBD) \
-   $(LAYOUT) $(TEMPL) $(TEXSUPPORT) $(UI) $(LYXSCRIPTS)
+   $(LAYOUT) $(TEMPL) $(TEXSUPPORT) $(UI)
 
 LIBDISTFILES = $(BIND) $(CLIPART) $(DOCDIST) $(EXAMPLES) $(IMAGES) $(KBD) \
$(LAYOUT) $(TEMPL) $(UI) $(TEXSUPPORT) $(LYXSCRIPTS)



Re: lib/Makefile.am patch against 1.1.6fix1

2001-02-02 Thread lyx-devel

On Fri, Feb 02, 2001 at 01:44:52PM +, John Levon wrote:
> On Fri, 2 Feb 2001 [EMAIL PROTECTED] wrote:
> 
> > The configure script for relyx needs to be installed with +x. Out of
> > the box, it is installed as a data file, 644.
> 
> This is my fault. On my system it installed these files as +x so I didn't
> notice the problem.
> 
> However, this patch is wrong as it breaks --with-lyx-suffix again - these
> script names should not be transformed. We need to change the permissions
> in the install hook.
> 
> Sorry all, and damn install !

Ok, how about the attached?

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- lib/Makefile.am.origFri Feb  2 07:05:07 2001
+++ lib/Makefile.am Fri Feb  2 07:58:37 2001
@@ -19,7 +19,7 @@
 UI = ui/*.ui
 
 LIBINSTFILES = $(BIND) $(CLIPART) $(DOCINST) $(EXAMPLES) $(IMAGES) $(KBD) \
-   $(LAYOUT) $(TEMPL) $(TEXSUPPORT) $(UI) $(LYXSCRIPTS)
+   $(LAYOUT) $(TEMPL) $(TEXSUPPORT) $(UI)
 
 LIBDISTFILES = $(BIND) $(CLIPART) $(DOCDIST) $(EXAMPLES) $(IMAGES) $(KBD) \
$(LAYOUT) $(TEMPL) $(UI) $(TEXSUPPORT) $(LYXSCRIPTS)
@@ -44,6 +44,12 @@
files=`cd ${srcdir} ; echo $(LIBINSTFILES)` ; \
for i in $${files} ; do \
   $(INSTALL_DATA) ${srcdir}/$$i $(DESTDIR)$(pkgdatadir)/$$i ; \
+   done
+
+install-exec-local: libinstalldirs
+   files=`cd ${srcdir} ; echo $(LYXSCRIPTS)` ; \
+   for i in $${files} ; do \
+  $(INSTALL_SCRIPT) ${srcdir}/$$i $(DESTDIR)$(pkgdatadir)/$$i ; \
done
 
 uninstall-local:



Re: 1.1.6fix1 (status update #2) / HP-UX

2001-02-01 Thread lyx-devel

On Thu, Feb 01, 2001 at 08:20:54PM +, Duncan Simpson wrote:
 Some local electrons alleged that Albert Chin-A-Young 
 [EMAIL PROTECTED] said:
 ...lots snipped...
  Not all packages use their own vsnprintf() regardless of whether or
  not the system has one. Lftp certainly does not. And, I don't think
  Samba does either. Anyway, on HP-UX 10.20, patch PHCO_20441 (or
  possibly one of its predecessors) gives you the vsnprintf function in
  libc. Unfortunately, no header definition. So, this requires two
  separate vsnprintf checks:
1. Test if the function exists
2. Test if the declaration for the function exists
  
  I'm working on this now (just stealing how lftp does it). I should
  have a patch soon.
  
 LyX already has something for that: it is called LYX_CHECK_DECL (if
 you want to search just one header) or LYX_CHECK_DECL_HDRS (if you
 want to try more than one header). These were stolen my me from
 word2x and then enhanced a bit :-) In fact configure.in uses
 LYX_CHECK_DECL_HDRS to find out if mkstemp is declared in unistd.h
 or stdlib.h already.
 
 Why is evertone so keen or re-inventing the wheel given an already
 avaialable high quality one? Am I missing something?

Ok, I'll use LYX_CHECK_DECL. Thanks.

-- 
albert chin ([EMAIL PROTECTED])



Re: 1.1.6fix1 (status update #2) / HP-UX

2001-02-01 Thread lyx-devel

On Thu, Feb 01, 2001 at 08:20:54PM +, Duncan Simpson wrote:
> Some local electrons alleged that Albert Chin-A-Young 
> <[EMAIL PROTECTED]> said:
> <...lots snipped...>
> > Not all packages use their own vsnprintf() regardless of whether or
> > not the system has one. Lftp certainly does not. And, I don't think
> > Samba does either. Anyway, on HP-UX 10.20, patch PHCO_20441 (or
> > possibly one of its predecessors) gives you the vsnprintf function in
> > libc. Unfortunately, no header definition. So, this requires two
> > separate vsnprintf checks:
> >   1. Test if the function exists
> >   2. Test if the declaration for the function exists
> > 
> > I'm working on this now (just stealing how lftp does it). I should
> > have a patch soon.
> > 
> LyX already has something for that: it is called LYX_CHECK_DECL (if
> you want to search just one header) or LYX_CHECK_DECL_HDRS (if you
> want to try more than one header). These were stolen my me from
> word2x and then enhanced a bit :-) In fact configure.in uses
> LYX_CHECK_DECL_HDRS to find out if mkstemp is declared in unistd.h
> or stdlib.h already.
> 
> Why is evertone so keen or re-inventing the wheel given an already
> avaialable high quality one? Am I missing something?

Ok, I'll use LYX_CHECK_DECL. Thanks.

-- 
albert chin ([EMAIL PROTECTED])



Re: 1.1.6fix1 (status update #2)

2001-01-26 Thread lyx-devel

On Thu, Jan 25, 2001 at 04:06:29PM +0100, Jean-Marc Lasgouttes wrote:
 - compilation on HP-UX fails for various reasons (vsnprintf, isset()
   macro...). 

Is this on anyone's TODO list? If not, we'll take a look at it.

-- 
albert chin ([EMAIL PROTECTED])



Re: 1.1.6fix1 (status update #2)

2001-01-26 Thread lyx-devel

On Thu, Jan 25, 2001 at 04:06:29PM +0100, Jean-Marc Lasgouttes wrote:
> - compilation on HP-UX fails for various reasons (vsnprintf, isset()
>   macro...). 

Is this on anyone's TODO list? If not, we'll take a look at it.

-- 
albert chin ([EMAIL PROTECTED])



Re: --with-lyxname is dead ...

2001-01-24 Thread lyx-devel

On Wed, Jan 24, 2001 at 10:00:03AM +, John Levon wrote:
 
 ... long live "--with-lyx-suffix"
 
 IMHO with-lyxname didn't make much sense with things like reLyX
 around.
 
 This patch installs everything nicely, all specific
 
 ./configure --with-lyx-suffix=1.1.6fix1
 
 or whatever

FYI, in most GNU programs, you have the following:
  $ ./configure --help
  ...
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM
  run sed PROGRAM on installed program names
  ...

Now, this applies to all programs that are installed. How about
ripping out this code and redoing your patch so it supports:
  --lyx-prefix=PREFIX
  --lyx-suffix=SUFFIX
  --lyx-transform-name=PROGRAM

-- 
albert chin ([EMAIL PROTECTED])



Re: "--with-lyxname" is dead ...

2001-01-24 Thread lyx-devel

On Wed, Jan 24, 2001 at 10:00:03AM +, John Levon wrote:
> 
> ... long live "--with-lyx-suffix"
> 
> IMHO with-lyxname didn't make much sense with things like reLyX
> around.
> 
> This patch installs everything nicely, all specific
> 
> ./configure --with-lyx-suffix=1.1.6fix1
> 
> or whatever

FYI, in most GNU programs, you have the following:
  $ ./configure --help
  ...
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM
  run sed PROGRAM on installed program names
  ...

Now, this applies to all programs that are installed. How about
ripping out this code and redoing your patch so it supports:
  --lyx-prefix=PREFIX
  --lyx-suffix=SUFFIX
  --lyx-transform-name=PROGRAM

-- 
albert chin ([EMAIL PROTECTED])



Re: LyX 1.1.4fix2 with Sun CC 5.0

2000-03-29 Thread lyx-devel

On Wed, Mar 22, 2000 at 04:07:40PM +0100, Jean-Marc Lasgouttes wrote:
  "Albert" == Albert Chin-A-Young [EMAIL PROTECTED] writes:
 
 Albert Just tried compiling lyx 1.1.4fix2 on Solaris 2.6 with Sun CC
 Albert 5.0: CC -DHAVE_CONFIG_H -I. -I. -I../../src -I../../images
 Albert -I./../ -I/opt/TWWfsw/libxforms/include
 Albert -I/opt/TWWfsw/xpm/include -I/usr/openwin/include -xO3 -c
 Albert math_symbols.C -o math_symbols.o
 Albert "../../src/insets/insetbib.h", line 132: Warning:
 Albert InsetBibtex::display hides the virtual function
 Albert Inset::display(bool). "math_symbols.C", line 545: Error:
 Albert Cannot use const char* to initialize char*. 1 Error(s) and 1
 Albert Warning(s) detected.
 
 Albert According to NEWS: ... Many changes have also been done to
 Albert help compile LyX with Sun CC 5.0 and SGI STL 3.2.
 
 Albert Has 1.1.4 been verified to compile with Sun CC 5.0? I'm using
 Albert CC=cc CFLAGS="-mr -Qn -xdepend -xO3" CXX=CC CXXFLAGS=-xO3.
 
 The changes that were compatible with other compilers are in. There is
 even a test in configurefor solaris7 broken (IMO) putenv() argument.
 However, there are still fixes that have not been done to the source,
 partly because we do not know how to do it right, or partly because we
 forgot about them.
 
 Patches would be appreciated. Or maybe CC options to make it less
 strict.

Ok, I've attached two patches to help. I'm now stuck at src/layout.C.
Can anyone help?

CC -DHAVE_CONFIG_H -I. -I. -I. -I../images
-I/opt/TWWfsw/libxforms/include -I/opt/TWWfsw/xpm/include
-I/usr/openwin/include  -xO3 -c layout.C
"layout.C", line 1217: Error: Cannot use std::pairbool, int to
initialize std::pairbool, unsigned.
"layout.C", line 1246: Error: Cannot use std::pairbool, int to
initialize std::pairbool, unsigned.
2 Error(s) detected.

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- src/mathed/math_symbols.C.orig  Tue Mar 28 17:59:10 2000
+++ src/mathed/math_symbols.C   Tue Mar 28 19:17:18 2000
@@ -542,7 +542,7 @@
XpmCreateDataFromImage(fl_display, const_castchar***(data), sbima, sbima, 
0);

// Dirty hack to get blue symbols quickly
-   char * sx = strstr(data[2], "");
+   const char * sx = strstr(const_castchar *(data[2]), "");
if (sx) {
for (int k = 0; k  8; ++k) sx[k] = '0';
}
--- src/bmtable.h.orig  Mon Jan 17 14:04:31 2000
+++ src/bmtable.h   Wed Mar 29 07:19:43 2000
@@ -23,11 +23,11 @@
 {
 #endif
 
-///
+/**/
 #define FL_BMTABLE 1500
-/// A flat bitmap table
+/* A flat bitmap table */
 #define FL_BMTABLE_FLAT 0
-/// A grided bitmap table
+/* A grided bitmap table */
 #define FL_BMTABLE_GRID 1
 
 
@@ -40,25 +40,25 @@
 #define FL_BMTABLE_BOXTYPE FL_UP_BOX
 
 
-///
+/**/
 FL_OBJECT *fl_create_bmtable(int, FL_Coord, FL_Coord, 
 FL_Coord, FL_Coord, char const *);
-///
+/**/
 FL_OBJECT *fl_add_bmtable(int, FL_Coord, FL_Coord, 
  FL_Coord, FL_Coord, char const *);
 
 /** Same as fl_get_button_numb() */
 int fl_get_bmtable_numb(FL_OBJECT *ob);
-///
+/**/
 void fl_set_bmtable(FL_OBJECT *, int pushed, int pos);
 
 /** Number of columns and rows, and the background bitmap */
 void fl_set_bmtable_data(FL_OBJECT *, int, int, int, int , unsigned char const *);
-///
+/**/
 void fl_set_bmtable_pixmap_data(FL_OBJECT *, int, int, char **);
-///
+/**/
 void fl_set_bmtable_file(FL_OBJECT *, int, int, char const *);
-///
+/**/
 void fl_set_bmtable_pixmap_file(FL_OBJECT *, int, int, char const *);
 
 /** Adjust bitmap origin (ox, oy) and cell dimensions (dx, dy) incrementally */
@@ -66,7 +66,7 @@
 
 /** The number of items is by default nc x nr, but you can change it */
 void fl_set_bmtable_maxitems(FL_OBJECT *, int);
-///
+/**/
 int fl_get_bmtable_maxitems(FL_OBJECT *); 
 
 /** Returns the index of the selected item or -1 if none was selected */



Re: LyX 1.1.4fix2 with Sun CC 5.0

2000-03-29 Thread lyx-devel

On Wed, Mar 29, 2000 at 06:44:45PM +0200, Lars Gullik Bjønnes wrote:
 [EMAIL PROTECTED] writes:
 
 | On Wed, Mar 29, 2000 at 04:05:20PM +0200, Lars Gullik Bjønnes wrote:
 |  [EMAIL PROTECTED] writes:
 |  
 |  
 |  You should try the lyx version from cvs, I think some fixes to these
 |  problems is in there.
 |  
 |  | // Dirty hack to get blue symbols quickly
 |  | -   char * sx = strstr(data[2], "");
 |  | +   const char * sx = strstr(const_castchar *(data[2]),
 | "");
 
 What happens if you _only_ make this change:
   char const * sx = strsr(data[2], "");
  ^

CC -DHAVE_CONFIG_H -I. -I. -I../../src -I../../images -I./../
-I/opt/TWWfsw/libxforms/include -I/opt/TWWfsw/xpm/include
-I/usr/openwin/include -xO3 -c math_symbols.C -o math_symbols.o
"../../src/insets/insetbib.h", line 132: Warning: InsetBibtex::display
hides the virtual function Inset::display(bool).
"math_symbols.C", line 547: Error: The left operand cannot be assigned
to.
1 Error(s) and 1 Warning(s) detected.
gmake: *** [math_symbols.lo] Error 1

Makes sense considering line 546-548 is:
546:if (sx) {
547:  for (int k = 0; k  8; ++k) sx[k] = '0';
548:}

The Early Access release of Sun CC 6.0 is out so I'm going to download
it and give it a whirl. We'll see if their C++ conformance is better.
BTW, IRIX C++ 7.2.1.3m breaks too (they don't have iostream). The
7.3 compiler is out which we'll get in a weeks time and I'll try again
and let you know how it goes.

-- 
albert chin ([EMAIL PROTECTED])



Re: LyX 1.1.4fix2 with Sun CC 5.0

2000-03-29 Thread lyx-devel

On Wed, Mar 22, 2000 at 04:07:40PM +0100, Jean-Marc Lasgouttes wrote:
> > "Albert" == Albert Chin-A-Young <[EMAIL PROTECTED]> writes:
> 
> Albert> Just tried compiling lyx 1.1.4fix2 on Solaris 2.6 with Sun CC
> Albert> 5.0: CC -DHAVE_CONFIG_H -I. -I. -I../../src -I../../images
> Albert> -I./../ -I/opt/TWWfsw/libxforms/include
> Albert> -I/opt/TWWfsw/xpm/include -I/usr/openwin/include -xO3 -c
> Albert> math_symbols.C -o math_symbols.o
> Albert> "../../src/insets/insetbib.h", line 132: Warning:
> Albert> InsetBibtex::display hides the virtual function
> Albert> Inset::display(bool). "math_symbols.C", line 545: Error:
> Albert> Cannot use const char* to initialize char*. 1 Error(s) and 1
> Albert> Warning(s) detected.
> 
> Albert> According to NEWS: ... Many changes have also been done to
> Albert> help compile LyX with Sun CC 5.0 and SGI STL 3.2.
> 
> Albert> Has 1.1.4 been verified to compile with Sun CC 5.0? I'm using
> Albert> CC=cc CFLAGS="-mr -Qn -xdepend -xO3" CXX=CC CXXFLAGS=-xO3.
> 
> The changes that were compatible with other compilers are in. There is
> even a test in configurefor solaris7 broken (IMO) putenv() argument.
> However, there are still fixes that have not been done to the source,
> partly because we do not know how to do it right, or partly because we
> forgot about them.
> 
> Patches would be appreciated. Or maybe CC options to make it less
> strict.

Ok, I've attached two patches to help. I'm now stuck at src/layout.C.
Can anyone help?

CC -DHAVE_CONFIG_H -I. -I. -I. -I../images
-I/opt/TWWfsw/libxforms/include -I/opt/TWWfsw/xpm/include
-I/usr/openwin/include  -xO3 -c layout.C
"layout.C", line 1217: Error: Cannot use std::pair to
initialize std::pair.
"layout.C", line 1246: Error: Cannot use std::pair to
initialize std::pair.
2 Error(s) detected.

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- src/mathed/math_symbols.C.orig  Tue Mar 28 17:59:10 2000
+++ src/mathed/math_symbols.C   Tue Mar 28 19:17:18 2000
@@ -542,7 +542,7 @@
XpmCreateDataFromImage(fl_display, const_cast(), sbima, sbima, 
0);

// Dirty hack to get blue symbols quickly
-   char * sx = strstr(data[2], "");
+   const char * sx = strstr(

Re: LyX 1.1.4fix2 with Sun CC 5.0

2000-03-29 Thread lyx-devel

On Wed, Mar 29, 2000 at 06:44:45PM +0200, Lars Gullik Bjønnes wrote:
> [EMAIL PROTECTED] writes:
> 
> | On Wed, Mar 29, 2000 at 04:05:20PM +0200, Lars Gullik Bjønnes wrote:
> | > [EMAIL PROTECTED] writes:
> | > 
> | > 
> | > You should try the lyx version from cvs, I think some fixes to these
> | > problems is in there.
> | > 
> | > | // Dirty hack to get blue symbols quickly
> | > | -   char * sx = strstr(data[2], "");
> | > | +   const char * sx = strstr( | "");
> 
> What happens if you _only_ make this change:
>   char const * sx = strsr(data[2], "");
>  ^

CC -DHAVE_CONFIG_H -I. -I. -I../../src -I../../images -I./../
-I/opt/TWWfsw/libxforms/include -I/opt/TWWfsw/xpm/include
-I/usr/openwin/include -xO3 -c math_symbols.C -o math_symbols.o
"../../src/insets/insetbib.h", line 132: Warning: InsetBibtex::display
hides the virtual function Inset::display(bool).
"math_symbols.C", line 547: Error: The left operand cannot be assigned
to.
1 Error(s) and 1 Warning(s) detected.
gmake: *** [math_symbols.lo] Error 1

Makes sense considering line 546-548 is:
546:if (sx) {
547:  for (int k = 0; k < 8; ++k) sx[k] = '0';
548:}

The Early Access release of Sun CC 6.0 is out so I'm going to download
it and give it a whirl. We'll see if their C++ conformance is better.
BTW, IRIX C++ 7.2.1.3m breaks too (they don't have ). The
7.3 compiler is out which we'll get in a weeks time and I'll try again
and let you know how it goes.

-- 
albert chin ([EMAIL PROTECTED])