> Pavel Sanda wrote:
> 
> > well for the basic checks i usually see in Andre's syntax warnings we
> > really dont need any third party code. few lines of greping will do. as my
> > python skills are very limited i can write some set of tests in bash, but
> > that will unusable for ms folks.
> 
> Why bother with scripts if Andre' works pretty well?

we have already some stuff commited ;) write basic skeleton was hour
and few minutes to add the first check on commas produce something like
the attached.
one can even automatically produce patch if there is somebody willing to commit.

pavel
../ledpar/src/BiblioInfo.cpp:
485:            cmd = cmd.substr(0,n);
../ledpar/src/Buffer.cpp:
1281:           top += params().language->code().substr(0,2);
../ledpar/src/Bullet.cpp:
31:Bullet const ITEMIZE_DEFAULTS[4] = { Bullet(0, 8),//"\(\bullet\)"
32:                                  Bullet(0, 0),//"\normalfont\bfseries{--}"
33:                                  Bullet(0, 6),//"\(\ast\)"
../ledpar/src/Font.cpp:
1006:   Lexer lex(0,0);
../ledpar/src/Changes.cpp:
181:            // range (pos,pos+x) becomes (pos,pos+x-1)
185:            // range (pos-x,pos) stays (pos-x,pos)
206:            // range (pos,pos+x) becomes (pos+1,pos+x+1)
211:            // range (pos-x,pos) stays as it is
../ledpar/src/Color.cpp:
98:     r = hexstrToInt(x11hexname.substr(1,2));
99:     g = hexstrToInt(x11hexname.substr(3,2));
100:    b = hexstrToInt(x11hexname.substr(5,2));
../ledpar/src/Converter.cpp:
654:            G_.addEdge(s,t);
../ledpar/src/CutAndPaste.cpp:
465:                                    s, it.paragraph().id(), it.pos(), 
it.pos() + 1));
../ledpar/src/FloatList.cpp:
33:// š not absolutely global but somewhere where documents,layouts and
../ledpar/src/Layout.cpp:
659:    { "box",        END_LABEL_BOX },
660:    { "filled_box", END_LABEL_FILLED_BOX },
661:    { "no_label",   END_LABEL_NO_LABEL },
../ledpar/src/LyX.cpp:
725:    // if lyxrc returns (0,0), then use session info
1123:   kbmap->bind("~C-~S-~M-dead_ogonek",FuncRequest(LFUN_ACCENT_OGONEK));
../ledpar/src/LyXAction.cpp:
126:            { LFUN_BUFFER_NEW_TEMPLATE,"buffer-new-template", NoBuffer, 
Buffer },
../ledpar/src/LyXFunc.cpp:
1128:                                           changeExtension(dviname,".ps");
1806:                   Lexer lex(0,0);
1838:                   Lexer lex(0,0);
../ledpar/src/LyXRC.cpp:
178:    { "\viewer" ,LyXRC::RC_VIEWER}
../ledpar/src/Paragraph.cpp:
1061:   : itemdepth(par.itemdepth),     text_(par.text_),
../ledpar/src/Server.cpp:
280:                            read_buffer_= split(read_buffer_, cmd,'n');
../ledpar/src/TextClass.cpp:
1071:           n = n.substr(0,i);
../ledpar/src/TextClassList.cpp:
202:            //     Declare(LaTeX|DocBook)Classs*([([^,]*)(,.*)*])*s*{(.*)}
../ledpar/src/TextMetrics.cpp:
1627:   Row const & row = pm.getRow(cur.pos(),cur.boundary());
2113:                   pi.pain.fillRectangle(x + min(x1,x2), y1, abs(x2 - x1), 
y2 - y1,
../ledpar/src/Undo.cpp:
365:    d->doRecordUndo(kind, c, c.pit(), c.pit(),      cur, false, true);
../ledpar/src/VCBackend.cpp:
84:     // Check if *,v exists.
93:             // Check if RCS/*,v exists.
../ledpar/src/Variables.cpp:
58:             var = str.substr(match.first,match.second);
../ledpar/src/output_docbook.cpp:
193:                            par = makeEnvironment(buf, os, runparams, 
paragraphs, par,send);
199:                    par = makeParagraph(buf, os, runparams, paragraphs, 
par,send);
279:                    par = makeCommand(buf, os, runparams, paragraphs, 
par,send);
285:                    par = makeEnvironment(buf, os, runparams, paragraphs, 
par,send);
290:                    par = makeParagraph(buf, os, runparams, paragraphs, 
par,send);
332:                    par = makeCommand(buf, os, runparams, paragraphs, 
par,send);
338:                    par = makeEnvironment(buf, os, runparams, paragraphs, 
par,send);
343:                    par = makeParagraph(buf, os, runparams, paragraphs, 
par,send);
../ledpar/src/frontends/qt4/EmptyTable.cpp:
31:     viewport()->resize(cellsize*rows,cellsize*columns);
../ledpar/src/frontends/qt4/FileDialog.cpp:
167:            toqstr(title_),toqstr(startsWith)))));
../ledpar/src/frontends/qt4/GuiApplication.cpp:
180:    LoaderQueue::setPriority(10,100);
../ledpar/src/frontends/qt4/GuiDocument.cpp:
186:            preamble_coords_[current_id_] = make_pair(0,0);
848:    for (int n = 0; !token(items,'|',n).empty(); ++n)
850:                    addItem(toqstr(token(items,'|',n)));
893:    for (int n = 0; !token(items,'|',n).empty(); ++n) {
../ledpar/src/frontends/qt4/GuiFontMetrics.cpp:
66:             //return metrics_.leftBearing(toqstr(docstring(1,c)));
91:             // metrics_.rightBearing(toqstr(docstring(1,c)));
111:            QString const s = toqstr(docstring(1,c));
203:            r = metrics_.boundingRect(toqstr(docstring(1,c)));
226:            value = metrics_.width(toqstr(docstring(1,c)));
../ledpar/src/frontends/qt4/GuiLog.cpp:
149:    Lexer lex(0,0);
../ledpar/src/frontends/qt4/GuiNomencl.cpp:
90:     description.replace('n',"\\");
../ledpar/src/frontends/qt4/GuiSelectionManager.cpp:
163:    selectedLV->setCurrentIndex(selectedLV->model()->index(0,0));
../ledpar/src/frontends/qt4/GuiSetBorder.cpp:
34:     setMinimumSize(w,h);
35:     setMaximumSize(w,h);
62:     paint.drawLine(m + l ,h - m, m + l ,h - (m + l));
66:     paint.drawLine(h - m, h - (m + l), h - (m + l),h - (m + l));
../ledpar/src/frontends/qt4/GuiView.cpp:
947:    // it is possible to get current toolbar status like this,...
../ledpar/src/frontends/qt4/GuiToolbar.cpp:
502:    // now because move(x,y) does not work for toolbar.
../ledpar/src/frontends/qt4/TocWidget.cpp:
94:             ? depth : getIndexDepth(index.parent(),depth);
114:            tocTV->model()->index(0,0),
../ledpar/src/frontends/qt4/GuiWorkArea.cpp:
678:    QRect cur_r(0,0,0,0);
../ledpar/src/frontends/frontend_helpers.cpp:
111:                    pair<docstring,docstring> const & dir1,
112:                    pair<docstring,docstring> const & dir2)
138:                       pair<docstring,docstring> const & dir1,
139:                       pair<docstring,docstring> const & dir2)
189:                   pair<docstring,docstring> const & dir1,
190:                   pair<docstring,docstring> const & dir2)
../ledpar/src/insets/ExternalSupport.cpp:
388:    return int(std::count(str.begin(), str.end(),'n'));
../ledpar/src/insets/InsetBox.cpp:
56:     translator.addPair("Doublebox",InsetBox::Doublebox);
488:    Lexer lex(0,0);
../ledpar/src/insets/InsetBibtex.cpp:
599:            //   (matching delimiters, missing commas,...
../ledpar/src/insets/InsetERT.cpp:
445:    Lexer lex(0,0);
../ledpar/src/insets/InsetBranch.cpp:
321:    Lexer lex(0,0);
../ledpar/src/insets/InsetCitation.cpp:
205:    // CITEP:       (author,year)
../ledpar/src/insets/InsetCommand.cpp:
199:    Lexer lex(0,0);
../ledpar/src/insets/InsetExternal.cpp:
892:    Lexer lex(0,0);
../ledpar/src/insets/InsetFloat.cpp:
420:    Lexer lex(0,0);
../ledpar/src/insets/InsetGraphics.cpp:
366:            if (contains(params().rotateOrigin,"Top"))
368:            else if (contains(params().rotateOrigin,"Bottom"))
370:            else if (contains(params().rotateOrigin,"Baseline"))
850:    return int(std::count(latex_str.begin(), latex_str.end(),'n'));
1015:   Lexer lex(0,0);
../ledpar/src/insets/InsetInclude.cpp:
365:            
DocFileName(changeExtension(included_file.absFilename(),".tex")).
../ledpar/src/insets/InsetListingsParams.cpp:
742:            // key=value,key=value1 is stored in params_ as 
key=value,key_=value1.
760:            // key=value,key=value1 is allowed in listings
../ledpar/src/insets/InsetNote.cpp:
373:    Lexer lex(0,0);
../ledpar/src/insets/InsetQuotes.cpp:
45: * g    ,,german``
46: * p    ,,polish''
../ledpar/src/insets/InsetTabular.cpp:
792:                    if (isPartOfMultiColumn(row,column))
1509:           l_getline(is,line);
1510:           if (!prefixIs(line,"<column")) {
4258:                                   tabular.cellIndex(i,j),
4271:                                   tabular.cellIndex(i,j),
4342:                                   tabular.cellIndex(i,j), setLines);
4833:   Lexer lex(0,0);
../ledpar/src/insets/InsetWrap.cpp:
305:    Lexer lex(0,0);
../ledpar/src/insets/InsetVSpace.cpp:
248:    Lexer lex(0,0);
../ledpar/src/insets/InsetHyperlink.cpp:
82:                             url.replace(pos,1,backslash + chars_url[k]);
99:                             name.replace(pos,1,"\textbackslash{}");
105:                            name.replace(pos,1,backslash + chars_name[k] + 
braces);
113:                    name.replace(pos,1,"$\sim$");
../ledpar/src/mathed/InsetMathAMSArray.cpp:
117:                            from_utf8(N_("Can't add vertical grid lines in 
'%1$s'")),       name_));
../ledpar/src/mathed/InsetMathNest.cpp:
110:// with the correctly adjusted x,y values. But this means that we'd have
768:    //      sprintf(dispatch_buffer, "%d %d",);
../ledpar/src/mathed/InsetMathSplit.cpp:
75:                             from_utf8(N_("Can't add vertical grid lines in 
'%1$s'")),       name_));
../ledpar/src/mathed/MathExtern.cpp:
1155:                   out = out.substr(0,i)
1171:                   out = out.substr(0,j - 1)
1173:                           + out.substr(j,i - j)
1174:                           + out.substr(i + 5,k - i - 4)
../ledpar/src/mathed/MathMacro.cpp:
101:            CursorSlice const & sl, bool boundary, int & x, int & y) const
../ledpar/src/mathed/MathSupport.cpp:
569:                      inh_series, Font::UP_SHAPE,Color::foreground},
../ledpar/src/support/FileName.cpp:
303:                    } else if (prefixIs(str,"%TGIF")) {
306:                    } else if (prefixIs(str,"#FIG")) {
309:                    } else if (prefixIs(str,"GIF")) {
325:            else if (contains(str,"EPSF"))
345:                    if (contains(str,"EPSF"))
../ledpar/src/support/ForkedCallQueue.cpp:
56:     // If we fail to fork the process, then emit the signal
59:             pro.second->operator()(0,1);
../ledpar/src/support/Forkedcall.cpp:
183:    // The weird (std::max)(a,b) signature prevents expansion
../ledpar/src/support/filetools.cpp:
943:            readBB_lyxerrMessage(file_, zipped,"no(e)ps-format");
952:            getline(is,s);
../ledpar/src/support/lyxsum.cpp:
133:    return do_crc(beg,end);
159:    return do_crc(beg,end);
../ledpar/src/support/minizip/zipunzip.cpp:
111:            hFind = FindFirstFile(f,&ff32);
114:                    
FileTimeToLocalFileTime(&(ff32.ftLastWriteTime),&ftLocal);
115:                    
FileTimeToDosDateTime(&ftLocal,((LPWORD)dt)+1,((LPWORD)dt)+0);
132:    if (strcmp(f,"-")!=0) {
138:            strncpy(name, f,MAXFILENAME-1);
145:            if (stat(name,&s)==0) {
215:                    NULL,0,NULL,0,NULL /* comment*/,
217:                    Z_DEFAULT_COMPRESSION,            // compression level
221:                    NULL,                                             // 
password,
225:                    printf("error in opening %s in zipfilen",filenameinzip);
238:                                    printf("error in reading 
%sn",filenameinzip);
306:    strcpy(buffer,newdir);
324:                    printf("couldn't create directory %sn",buffer);
345:    FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite;
347:    hFile = CreateFile(filename,GENERIC_READ | GENERIC_WRITE,
348:            0,NULL,OPEN_EXISTING,0,NULL);
349:    GetFileTime(hFile,&ftCreate,&ftLastAcc,&ftLastWrite);
350:    DosDateTimeToFileTime((WORD)(dosdate>>16),(WORD)dosdate,&ftLocal);
351:    LocalFileTimeToFileTime(&ftLocal,&ftm);
352:    SetFileTime(hFile,&ftm,&ftLastAcc,&ftm);
371:    utime(filename,&ut);
393:    err = 
unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
396:            printf("error %d with zipfile in unzGetCurrentFileInfon",err);
433:            err = unzOpenCurrentFilePassword(uf,password);
435:                    printf("error %d with zipfile in 
unzOpenCurrentFilePasswordn",err);
446:                            fout=fopen(write_filename,"wb");
450:                            printf("error opening %sn",write_filename);
457:                            err = unzReadCurrentFile(uf,buf,size_buf);
459:                                    printf("error %d with zipfile in 
unzReadCurrentFilen",err);
463:                                    if (fwrite(buf,err,1,fout)!=1) {
473:                            
change_file_date(write_filename,file_info.dosDate,
480:                            printf("error %d with zipfile in 
unzCloseCurrentFilen",err);
522:            printf("error %d with zipfile in unzGetGlobalInfo n",err);
535:                            printf("error %d with zipfile in 
unzGoToNextFilen",err);
../ledpar/src/support/mkdir.cpp:
79:     strcpy(buffer,newdir);
../ledpar/src/tex2lyx/preamble.cpp:
121: *   bibformat={tabular,ibidem,numbered}

Reply via email to