PageRenderTime 21ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/modules/freetype2/builds/atari/FNames.SIC

http://github.com/zpao/v8monkey
Unknown | 37 lines | 34 code | 3 blank | 0 comment | 0 complexity | 9cf5aa1f5b1bd54baa8c1c6588d8c263 MD5 | raw file
 1/* the following changes file names for PureC projects */
 2
 3if (argc > 0)
 4{
 5	ordner = argv[0];
 6	if (basename(ordner) == "") /* ist Ordner */
 7	{
 8		ChangeFilenames(ordner);
 9	}
10}
11
12proc ChangeFilenames(folder)
13local i,entries,directory,file;
14{
15	entries = filelist(directory,folder);
16	for (i = 0; i < entries; ++i)
17	{
18		file = directory[i,0];
19		if ((directory[i,3]&16) > 0) /* subdirectory */
20		{
21			ChangeFilenames(folder+file+"\\");
22		}
23		else
24		{
25			if ((stricmp(suffix(file),".h")==0)|(stricmp(suffix(file),".c")==0))
26			ChangeFilename(folder,file);
27		}
28	}
29}
30
31proc ChangeFilename(path,datei)
32local newfile,err;
33{
34	newfile=datei;
35	newfile[0]=(newfile[0] | 32) ^ 32;
36	err=files.rename("-q",path+datei,newfile);
37}