Analyser/Analyse_Indentation [ Functions ]
FUNCTION
Figure out how text is indented. SYNPOPSIS
INPUTS
- arg_item -- the item to be analysed.
SOURCE
{ int i; int indent = -1; assert( arg_item->no_lines > 0 ); for ( i = 0; i < arg_item->no_lines; ++i ) { if ( arg_item->lines[i]->kind == ITEM_LINE_PLAIN ) { char *line = arg_item->lines[i]->line; if ( Is_Empty_Line( line ) ) { /* Empty */ indent = 0; } else { indent = Get_Indent( line ); break; } } } assert( indent >= 0 ); return indent; }