On 2010-03-09, epanda wrote:
> Hi,
> 
> I am using cppCheck to generate some error list.
> 
> error list is well display with gcc errorformat but I would like while
> cppCheck is progressing to display the percent progress.
> 
> I encounter 2 pbs:
> 1/ when I redirect to c:\\infos.txt, nothing is created while when I
> copy this command into a console cmd under xp it is working.
> 
>       let cmd = "cppCheck " . a:dir . " -a -q --enable=all --template \"gcc
> \" 1> c:\\infos.txt"
>       cexpr system(cmd)
>       copen

I don't have any documentation on cppCheck, so I'm just guessing
here.  It looks to me as thought your cmd is redirecting the stdout
of cppCheck to c:\infos.txt.  Therefore, system(cmd) doesn't have
any output to put into the quickfix list.  I think you need to
either remove that redirection or use :cfile to read c:\infos.txt
into the quickfix list.

> 2/ when I put this command into cmd xp console I obtain this file
> content.
> I would like to display into echo or status line the changing value of
> progress :
> 
> Checking C:\trunk\sources\one.cpp...
> 1/20 files checked 5% done
> Checking C:\trunk\sources\two.cpp...
> 2/20 files checked 10% done
> Checking C:\trunk\sources\three.cpp...
> 3/20 files checked 15% done

Again, this is a guess, but often programs will check to see if they
are being run in a tty (or a DOS console) and if so will generate
extra output for the benefit of the user looking at the
terminal/console.  They will not generate this extra output if they
are being run from within some program.  I think cppCheck knows that
it is being run from within system(), which does not present a tty
or console interface to cppCheck, and is therefore not generating
this progress report.

Regards,
Gary

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to