All
My code (C file) has comment formats as below:
/* ... */
/* ...
* ...
*/
In order to use Function list, I tried to modify functionList.xml as below:
<parser
displayName="C"
id ="c_function"
commentExpr="(?x)
| (?s:\x2F\x2A(.|\0x0A)*?\x2A\2F) # regex - /\*(.|\n)*?\*/
But it doesn't work.
I tried the reg with find command on notepad++, and it worked.
I have no clue what happen.
Is there anyone who is kind to give me suggestion?
Thanks.
Related
Is it somehow possible in Doxygen to create a custom tag, which creates a documentation using a placeholder tag as its input?
What I want to accomplish is to create a custom tag for requirements. As our DOORS Urls are quite long, and diverge from SW-component to SW-component, I want to create something similar to this:
#file somefile.c
#doorsdocurl <URL to DOORS document> -> this is going to be my placeholder
...
...
...
/**
* #brief somedescription
* #req{doorsdocurl: <reqID1, reqID2,...> } -> this is going to be the second custom tag
*/
void jambo()
{
}
Is this somehow achievable with Doxygen? From what I have read, one has to put his custom tags within the ALIASES variable
In your Doxyfile you would need something like:
ALIASES = "doorsdocurl_sw_1=<URL to DOORS document>" \
"req{2}=\1 \2<br>"
and the code would look like:
/**
* #brief somedescription
*
* #req{#doorsdocurl_sw_1,reqID1}
* #req{#doorsdocurl_sw_1,reqID2}
*/
void jambo()
{
}
The \req command can of course be extended with other commands, in this respect the command xrefitem might be useful, see the manual (http://www.doxygen.nl/manual/commands.html#cmdxrefitem)
I am a noob to doxygen so please forgive if I am asking a basic question. I have gone through complete documentation but couldn't figure out a solution to this myself. Here's what I have in my code:
typedef struct{
uint32_t event;
void (*action)(void);
} CommandChain;
CommandChain commandRepo[] = {
{.event = 0, .action = NULL},
{.event = 1, .action = Start_Timer},
{.event = 2, .action = Start_Gps}
}
Where action corresponds to the functions I have elsewhere defined. I need to create an XML output where I have a field of Event and a corresponding Action. I need it in a parseable format. Like: #event_id 2 #triggers Gps
So, I can check what event will trigger what action.
PS. I know '#' is used for the commands in doxygen, just using to make my point somehow clearer.
Yes, see doxygen's Custom Commands:
Here is an example of an alias definition with a single argument:
ALIASES += l{1}="\ref \1"
The above adds support for a #l command with a single argument, which expands to \ref \1 in the output, where \1 is the argument text. I think you can use this to build what you need.
I'm trying to access the methods of a dataset in Progress, where the dataset is defined as a preprocessor item. I'm just learning 4GL... maybe this isn't even possible? Here is the scenario in code:
/*My Procedure*/
{Receipt/Receipt_ds.i}
def var hReceipt as handle no-undo.
def var hDataSet as handle no-undo.
run Receipt/Receipt.p persistent set hReceipt.
run GetData in hReceipt ({&input-output_dataset_ReceiptDataSet}).
/* do some stuff */
/* get the handle to the dataset??? Obvious syntax issue here. */
hDataSet = DATASET {&input-output_dataset_ReceiptDataSet}:HANDLE.
/* Empty the DataSet (this is what I want to do)*/
hDataSet:EMPTY-DATASET().
and here's my include file:
/*Receipt/Recipt_ds.i*/
define dataset ReceiptDataSet for
ttRcvHead,
ttRcvDtl,
data-relation for ttRcvHead, ttRcvDtl relation-fields(
stuff, stuff
).
&global-define input-output_dataset_ReceiptDataSet input-output dataset ReceiptDataSet
Clearly my code does not have the correct syntax as mentioned in my comment. Does anyone know what the right way of doing this would be?
This piece:
hDataSet = DATASET {&input-output_dataset_ReceiptDataSet}:HANDLE
is doing this:
hDataSet = DATASET input-output dataset ReceiptDataSet:HANDLE
which isn't working as you've discerned. You need to get to this form instead:
hDataSet = DATASET ReceiptDataSet:HANDLE
If you put a
&GLOBAL-DEFINE pdsName ReceiptDataSet
in your include file and then referenced that where appropriate, then this construct would work:
hDataSet = DATASET {&pdsName}:HANDLE
For starters you need to define a pre-processor before you attempt to use it.
Not at the end of the file.
The next thing that comes to mind is why? Why are you trying to use a pre-processor for this purpose? It clearly isn't to make the code any shorter or more understandable. One reason might be because your code snippet is some sort of common template but that doesn't seem to be the case here.
Is it possible to print the content of a file (supporting extensions like r,tex,txt,rnw) using R?
Reproducible file:
sink('myFile')
cat('\nThis is some text')
cat('\n')
cat('\nEnd of file')
sink()
Now I am looking for a function in R that prints the content of R as...
>PRINT_FILE_CONTENT('myFile')
This is some text
End of file
>
I hope I am clear. I will appreciate any help?
This seems to work:
cat(readLines("myFile"),sep="\n")
although I did get
Warning message:
In readLines("myFile") : incomplete final line found on 'myFile'
at the end ... you could wrap it in suppressWarnings() if you like.
I'm using glob function for a autocompletion function. I'm showing you the problem because it's difficult to explain:
matched = ~/.tcsh
glob(matched, 0, NULL, &pglob);
glob put all matched files in a char ** and when I print it I have:
case[0] = .tcshrc
case[1] =
I should have .tcshrc~ in case[1], but nothing =S, I've seen a flag "GLOB_TILDE" like this "
glob(matched, GLOB_TILDE, NULL, &pglob);
But it doesn't change anything! Can someone help me?
The GLOB_TILDE flag only affects the output when the ~ appears at the beginning of the glob. See here:
http://www.gnu.org/s/libc/manual/html_node/More-Flags-for-Globbing.html
As for your problem, it appears to me that your matched value is wrong. Seems like you should be sticking a * at the end of it for it to be useful for autocompletion, i.e.:
matched = ~/.tcsh*
I'm a little bit confused as how your previous example found even the first one. The bottom part of this man page article has some interesting examples too:
http://www.opengroup.org/onlinepubs/000095399/functions/glob.html