def _AddSources(sources, base_path, base_path_components, result):
 for source in sources:
  if ((not len(source)) or source.startswith('!!!') or source.startswith('$')):
   continue
  org_source = source
  source = (source[0] + source[1:].replace('//', '/'))
  if source.startswith('../'):
   source = _ResolveParent(source, base_path_components)
   if len(source):
    result.append(source)
   continue
  result.append((base_path + source))
  if debug:
   print 'AddSource', org_source, result[(len(result) - 1)]

def _AddSources ( sources , base_path , base_path_components , result ) : for source in sources : if ( ( not len ( source ) ) or source . startswith ( '!!!' ) or source . startswith ( '$' ) ) : continue org_source = source source = ( source [ 0 ] + source [ 1 : ] . replace ( '//' , '/' ) ) if source . startswith ( '../' ) : source = _ResolveParent ( source , base_path_components ) if len ( source ) : result . append ( source ) continue result . append ( ( base_path + source ) ) if debug : print 'AddSource' , org_source , result [ ( len ( result ) - 1 ) ]
extracts valid sources from |sources| and adds them to |result| .