mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Small fixes + literate patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@880 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
71924df1d5
commit
b4500f209d
@ -1,3 +1,10 @@
|
|||||||
|
2000-07-13 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
|
* lib/examples/Literate.lyx: small patch!
|
||||||
|
|
||||||
|
* src/insets/insetbib.C (Read): added this function because of wrong
|
||||||
|
Write (without [begin|end]_inset).
|
||||||
|
|
||||||
2000-07-11 Juergen Vigna <jug@sad.it>
|
2000-07-11 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* src/BufferView2.C (open_new_inset): changed to a bool returnvalue
|
* src/BufferView2.C (open_new_inset): changed to a bool returnvalue
|
||||||
|
@ -266,7 +266,7 @@ Both noweave and notangle routines, always output one single line for each
|
|||||||
\newline
|
\newline
|
||||||
if (noweb_try(0))
|
if (noweb_try(0))
|
||||||
\newline
|
\newline
|
||||||
output_error(1, 0, "noweb");
|
output_error(1, err_line, "noweb");
|
||||||
\newline
|
\newline
|
||||||
}
|
}
|
||||||
\newline
|
\newline
|
||||||
@ -309,7 +309,15 @@ char *noweb_msgs[] = {
|
|||||||
\newline
|
\newline
|
||||||
"This can't happen:",
|
"This can't happen:",
|
||||||
\newline
|
\newline
|
||||||
"non-numeric line number in"
|
"non-numeric line number in"
|
||||||
|
\newline
|
||||||
|
};
|
||||||
|
\newline
|
||||||
|
|
||||||
|
\newline
|
||||||
|
char *noweb_msgs_mimic_gcc[] = {
|
||||||
|
\newline
|
||||||
|
": unescaped << in documentation chunk"
|
||||||
\newline
|
\newline
|
||||||
};
|
};
|
||||||
\newline
|
\newline
|
||||||
@ -320,7 +328,7 @@ A noweb error message can be any string that contains a matching pair of
|
|||||||
< <\SpecialChar ~
|
< <\SpecialChar ~
|
||||||
\SpecialChar ~
|
\SpecialChar ~
|
||||||
\SpecialChar ~
|
\SpecialChar ~
|
||||||
> >, or any of the above strings.
|
> >, or any of the above strings
|
||||||
\layout Scrap
|
\layout Scrap
|
||||||
|
|
||||||
<<Function bodies>>=
|
<<Function bodies>>=
|
||||||
@ -331,13 +339,39 @@ noweb_try (int buf_line)
|
|||||||
\newline
|
\newline
|
||||||
{
|
{
|
||||||
\newline
|
\newline
|
||||||
char *s, *b;
|
char *s, *t, *b;
|
||||||
\newline
|
\newline
|
||||||
int i;
|
int i;
|
||||||
\newline
|
\newline
|
||||||
|
|
||||||
\newline
|
\newline
|
||||||
b = buffer[buf_line];
|
b = buffer[buf_line];
|
||||||
|
\newline
|
||||||
|
err_line = 0;
|
||||||
|
\newline
|
||||||
|
|
||||||
|
\newline
|
||||||
|
for (i=0; i<1; i++) {
|
||||||
|
\newline
|
||||||
|
s = (char *)strstr (b, noweb_msgs_mimic_gcc[i]);
|
||||||
|
\newline
|
||||||
|
if (s != NULL) {
|
||||||
|
\newline
|
||||||
|
t = (char *)strchr(buffer[buf_line], ':');
|
||||||
|
\newline
|
||||||
|
err_line = atoi(t+1);
|
||||||
|
\newline
|
||||||
|
t = buffer[buf_line];
|
||||||
|
\newline
|
||||||
|
++s;
|
||||||
|
\newline
|
||||||
|
while (*(t++) = *(s++));
|
||||||
|
\newline
|
||||||
|
return 1;
|
||||||
|
\newline
|
||||||
|
}
|
||||||
|
\newline
|
||||||
|
}
|
||||||
\newline
|
\newline
|
||||||
s = (char *)strstr(b, "<<");
|
s = (char *)strstr(b, "<<");
|
||||||
\newline
|
\newline
|
||||||
@ -345,25 +379,25 @@ noweb_try (int buf_line)
|
|||||||
\newline
|
\newline
|
||||||
s = (char *)strstr(s+2, ">>");
|
s = (char *)strstr(s+2, ">>");
|
||||||
\newline
|
\newline
|
||||||
if (s != NULL)
|
if (s != NULL) {
|
||||||
\newline
|
\newline
|
||||||
return 1;
|
return 1;
|
||||||
\newline
|
|
||||||
} else {
|
|
||||||
\newline
|
|
||||||
for (i=0; i<12; i++) {
|
|
||||||
\newline
|
|
||||||
s = (char *)strstr (b, noweb_msgs[i]);
|
|
||||||
\newline
|
|
||||||
if (s != NULL)
|
|
||||||
\newline
|
|
||||||
break;
|
|
||||||
\newline
|
\newline
|
||||||
}
|
}
|
||||||
\newline
|
\newline
|
||||||
if (s != NULL)
|
} else {
|
||||||
\newline
|
\newline
|
||||||
return 1;
|
for (i = 0; i < 12; ++i) {
|
||||||
|
\newline
|
||||||
|
s = (char *)strstr (b, noweb_msgs[i]);
|
||||||
|
\newline
|
||||||
|
if (s != NULL) {
|
||||||
|
\newline
|
||||||
|
return 1;
|
||||||
|
\newline
|
||||||
|
}
|
||||||
|
\newline
|
||||||
|
}
|
||||||
\newline
|
\newline
|
||||||
}
|
}
|
||||||
\newline
|
\newline
|
||||||
@ -761,7 +795,7 @@ To combine the scan of noweb error messages and xlc error messages is very
|
|||||||
\newline
|
\newline
|
||||||
if (noweb_try(0))
|
if (noweb_try(0))
|
||||||
\newline
|
\newline
|
||||||
output_error(1, 0, "noweb");
|
output_error(1, err_line, "noweb");
|
||||||
\newline
|
\newline
|
||||||
else if (xlc_try(0))
|
else if (xlc_try(0))
|
||||||
\newline
|
\newline
|
||||||
@ -797,7 +831,7 @@ To combine the scan of noweb error messages and gcc error messages is simple
|
|||||||
\newline
|
\newline
|
||||||
if (last_buf_line == 0 && noweb_try(0)) {
|
if (last_buf_line == 0 && noweb_try(0)) {
|
||||||
\newline
|
\newline
|
||||||
output_error(1, 0, "noweb");
|
output_error(1, err_line, "noweb");
|
||||||
\newline
|
\newline
|
||||||
continue;
|
continue;
|
||||||
\newline
|
\newline
|
||||||
@ -922,4 +956,6 @@ build-script
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
\newline
|
\newline
|
||||||
notangle -Rbuild-script $1 | sh
|
notangle -Rbuild-script $1 | sh
|
||||||
|
\layout LyX-Code
|
||||||
|
|
||||||
\the_end
|
\the_end
|
||||||
|
@ -141,6 +141,20 @@ void InsetBibKey::Write(Buffer const *, ostream & os) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// This is necessary here because this is written without begin_inset
|
||||||
|
// This should be changed!!! (Jug)
|
||||||
|
void InsetBibKey::Read(Buffer const *, LyXLex & lex)
|
||||||
|
{
|
||||||
|
string token;
|
||||||
|
|
||||||
|
if (lex.EatLine()) {
|
||||||
|
token = lex.GetString();
|
||||||
|
scanCommand(token);
|
||||||
|
} else
|
||||||
|
lex.printError("InsetCommand: Parse error: `$$Token'");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
string InsetBibKey::getScreenLabel() const
|
string InsetBibKey::getScreenLabel() const
|
||||||
{
|
{
|
||||||
if (! getOptions().empty())
|
if (! getOptions().empty())
|
||||||
|
@ -44,6 +44,8 @@ public:
|
|||||||
/// Currently \bibitem is used as a LyX2.x command, so we need this method.
|
/// Currently \bibitem is used as a LyX2.x command, so we need this method.
|
||||||
void Write(Buffer const *, std::ostream &) const;
|
void Write(Buffer const *, std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
void Read(Buffer const *, LyXLex & lex);
|
||||||
|
///
|
||||||
virtual string getScreenLabel() const;
|
virtual string getScreenLabel() const;
|
||||||
///
|
///
|
||||||
void Edit(BufferView *, int x, int y, unsigned int button);
|
void Edit(BufferView *, int x, int y, unsigned int button);
|
||||||
|
@ -37,8 +37,8 @@ public:
|
|||||||
|
|
||||||
/// Parse the command.
|
/// Parse the command.
|
||||||
void scanCommand(string const & cmd);
|
void scanCommand(string const & cmd);
|
||||||
/// Will not be used when lyxf3
|
///
|
||||||
void Read(Buffer const *, LyXLex & lex);
|
virtual void Read(Buffer const *, LyXLex & lex);
|
||||||
///
|
///
|
||||||
virtual int Latex(Buffer const *, std::ostream &,
|
virtual int Latex(Buffer const *, std::ostream &,
|
||||||
bool fragile, bool free_spc) const;
|
bool fragile, bool free_spc) const;
|
||||||
|
@ -47,7 +47,7 @@ using std::endl;
|
|||||||
|
|
||||||
#define cellstart(p) ((p % 2) == 0)
|
#define cellstart(p) ((p % 2) == 0)
|
||||||
|
|
||||||
//#define USE_NEW_LAYOUT 1
|
#define USE_NEW_LAYOUT 1
|
||||||
|
|
||||||
InsetTabular::InsetTabular(Buffer * buf, int rows, int columns)
|
InsetTabular::InsetTabular(Buffer * buf, int rows, int columns)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user