|
Doxygen Source Code Documentation
PurgeComments.m File Reference
Go to the source code of this file.
|
Functions |
| if (nargin==1) |
skip the help | lines (top comments) if there are any if(C(1) |
| if (~isempty(Loc_1)) |
| fprintf ('C purged of heading is:\n') |
| fprintf ('%c', C) |
| CnoCom (1:length(FirstChunk)) |
| fprintf ('CnoCom at first chunk:\n') |
| fprintf ('%c', CnoCom(1:nCnoCom)) |
| while (cnt< length(Loc_1)) |
make sure next line is not
a comment | if (cend+1==Loc_1(cnt+1)) |
end | while (lop) |
end looks like it is a cycle
through block | fprintf (1,'Looping, cnt=%g/%g\n', cnt, length(Loc_1)) |
| if (cnt< length(Loc_1)) if(cend+1 |
| CnoCom (1+nCnoCom:nCnoCom+length(GoodChunk)) |
| fprintf ('CnoCom at middle chunk(cnt=%g):\n', cnt) |
| CnoCom (1+nCnoCom:nCnoCom+length(LastChunk)) |
| fprintf ('Last Chunk:\n') |
| fprintf ('%c', LastChunk) |
| fprintf ('\n ***\nFinal CnoCom\n ***\n') |
Variables |
| function [CnoCom] |
default is Output | Parameters |
| ch = '%' |
end Debug Flag | DBG = 1 |
initailize return variables | err = 1 |
| CnoCom = [] |
| Com = '' |
| end [err, Loc_1] = FindChar (C, ch) |
| cnt = 1 |
| nC = length(C) |
| FirstChunk = C(1:Loc_1(1)-1) |
| nCnoCom = length(FirstChunk) |
skip that | line [err, Cnext, cend] = NextString (C, 'NewLine', Loc_1(cnt)) |
make sure next line is not
a comment | lop = 1 |
end looks like it is a | comment |
end end end copy the next good | piece |
end end end copy the next
good if you did not run out
of cnt in the looping condition
above | GoodChunk = C(cend+1:Loc_1(cnt+1)-1) |
end end append last piece
if any | LastChunk = NextString (C, 'NewLine', Loc_1(cnt)) C(cend+1:nC) |
end | return |
Function Documentation
CnoCom |
( |
1+nCnoCom:nCnoCom+ |
length(LastChunk) |
) |
|
|
CnoCom |
( |
1+nCnoCom:nCnoCom+ |
length(GoodChunk) |
) |
|
|
CnoCom |
( |
1: |
length(FirstChunk) |
) |
|
|
fprintf |
( |
'\n ***\nFinal CnoCom\n ***\n' |
|
) |
|
|
fprintf |
( |
'Last Chunk:\n' |
|
) |
|
|
fprintf |
( |
'CnoCom at middle chunk(cnt=%g):\n' |
, |
|
|
cnt |
|
|
) |
|
|
end looks like it is a cycle through block fprintf |
( |
1 |
, |
|
|
' |
Looping, |
|
|
cnt |
= %g/%g\n' , |
|
|
cnt |
, |
|
|
length(Loc_1) |
|
|
) |
|
|
fprintf |
( |
'%c' |
, |
|
|
CnoCom(1:nCnoCom) |
|
|
) |
|
|
fprintf |
( |
'CnoCom at first chunk:\n' |
|
) |
|
|
fprintf |
( |
'C purged of heading is:\n' |
|
) |
|
|
skip the help lines |
( |
top |
comments |
) |
|
|
Variable Documentation
|
Definition at line 37 of file PurgeComments.m.
Referenced by blanktrim(), check_disk_space(), e_rsle(), find_string(), FTOSH_getopts(), getAndMoveToFrontDecode(), getname(), getnum(), getRLEpair(), gettok(), glutBitmapCharacter(), glutBitmapLength(), glutBitmapWidth(), glutStrokeCharacter(), glutStrokeLength(), glutStrokeWidth(), ind_printf(), jinit_memory_mgr(), l_C(), l_CHAR(), l_L(), l_R(), l_read(), loadAndRLEsource(), main(), mri_read_ppm(), mri_read_ppm3(), mri_read_ppm_header(), mri_try_7D(), mri_try_mri(), mri_try_pgm(), NC_check_name(), parse_switches(), pbm_getc(), plotpak_pwrit(), plotpak_pwritf(), ppmd_text(), process_COM(), pwrit_(), pwritf_(), rd_A(), rd_AW(), rd_count(), rd_ed(), rd_F(), rd_H(), rd_I(), rd_L(), rd_POS(), rd_Z(), read_pbm_integer(), read_scan_integer(), read_text_integer(), REG_command_line(), set_quant_slots(), Strchr(), t_getc(), text_getc(), TFIM_getopts(), THD_unzblock(), THD_zblock(), tross_Add_Note(), tross_Addto_History(), tross_Append_History(), tross_commandline(), tross_Copy_History(), tross_datetime(), tross_Encode_String(), tross_Expand_String(), tross_Get_History(), tross_Get_Note(), tross_Make_History(), tross_Replace_History(), tross_Store_Note(), TT_read_opts(), TTget_ppm(), undoReversibleTransformation_fast(), undoReversibleTransformation_small(), x_getc(), x_rsne(), xrd_SL(), y_getc(), zzchar_(), and zzstro_(). |
else no comments CnoCom = [] |
|
increment and go on cnt = 1 |
|
end[err, Loc_1] = FindChar (C, ch) |
|
|