コード例 #1
0
ファイル: gen-bidi-type-tab.c プロジェクト: behdad/fribidi
static void
init_tab_derived_bidi_class_txt (
  void
)
{
  clear_tab ();
}
コード例 #2
0
static void
init_tab_mirroring_txt (
  void
)
{
  clear_tab ();
}
コード例 #3
0
static void
init (
  void
)
{
  minshaped = FRIBIDI_UNICODE_CHARS;
  maxshaped = 0;

  clear_tab ();
}
コード例 #4
0
ファイル: tab.c プロジェクト: forflo/snippetbin
int main(void){
	char tab[Zeilen][Spalten],dateiname[30];
	int knopf,i=1;
	clear_tab(tab);
	printf("Bitte geben sie die Noten-Datei an:\n");
	scanf("%s",dateiname); 
	printf("In Datei schreiben?\n1/ja 0/nein:\n"); 
	scanf("%i",&knopf); 
	put_display_notes(dateiname,tab,knopf);
	return 0;
}
コード例 #5
0
static void
init (
  void
)
{
  register int i;

  for (i = 0; i < type_names_count; i++)
    names[i] = 0;
  for (i = type_names_count - 1; i >= 0; i--)
    names[type_names[i].key] = type_names[i].name;

  clear_tab ();
}
コード例 #6
0
ファイル: tab.c プロジェクト: forflo/snippetbin
	/*Hauptaufgabe: Schreibt die einzelnen noten, bzw. Akkorde in den Tab-Block und behandelt die Ausgabe auf den
	Bildschrim und das Schreiben in die Datei*/
int put_display_notes(char *dateiname,char tab[][Spalten],int knopf){
	FILE *datei;
	int a,b=0,sp_nr=3,bund;
	char buffer,erlaubte_zeichen[]="eHGDAE",erlaubte_zahlen[]="0123456789"; 
	if((datei=fopen(dateiname,"r+"))==NULL){
		printf("Datei konnte nicht geoeffnet werden\n");
		return 0; 
	}
	while((buffer=fgetc(datei))!=EOF){ 
		while(buffer!='\n'){
			for(a=0;a<6;a++) 
				if(buffer==erlaubte_zeichen[a]){
					bund=a;
					continue; 
				}
			for(a=0;a<10;a++) 
				if(buffer==erlaubte_zahlen[a]){
					tab[bund][sp_nr]=erlaubte_zahlen[a];
					continue; 
				}
			buffer=fgetc(datei); 
		}
	/*
	Hier wird gecheckt ob schon ein Tabulaturblock voll ist, wenn ja wird er ausgegeben, und bei
	bedarf in die Datei geschrieben
	*/
		if(sp_nr>=Spalten-1){ 
			output_tab(tab);
			if(knopf==1) 
				write_tab_to_disk(tab);
			clear_tab(tab);
			sp_nr=1; 
			b++; 
		}
		sp_nr+=2; 
	}
	/*
	Hier wird gechekct ob entweder ein Rest in die Datei bzw auf den Bildschrim zu schreiben ist oder nur ein Tabulatur-
	Block zu einem Teil gefüllt wurde
	*/
	if(b==0 || sp_nr<Spalten-1){
		output_tab(tab); 
		if(knopf==1)
			write_tab_to_disk(tab);
	} 
	fclose(datei); 
	return 1;
}
コード例 #7
0
ファイル: gen-bidi-type-tab.c プロジェクト: behdad/fribidi
static void
init_tab_unicode_data_txt (
  void
)
{
  register FriBidiChar c;

  clear_tab ();

  for (c = 0x0590; c < 0x0600; c++)
    table[c] = RTL;
  for (c = 0x07C0; c < 0x0900; c++)
    table[c] = RTL;
  for (c = 0xFB1D; c < 0xFB50; c++)
    table[c] = RTL;

  for (c = 0x0600; c < 0x07C0; c++)
    table[c] = AL;
  for (c = 0xFB50; c < 0xFDD0; c++)
    table[c] = AL;
  for (c = 0xFDF0; c < 0xFE00; c++)
    table[c] = AL;
  for (c = 0xFE70; c < 0xFF00; c++)
    table[c] = AL;

  for (c = 0x2060; c < 0x2070; c++)
    table[c] = BN;
  for (c = 0xFDD0; c < 0xFDF0; c++)
    table[c] = BN;
  for (c = 0xFFF0; c < 0xFFF9; c++)
    table[c] = BN;
  for (c = 0xFFFF; c < FRIBIDI_UNICODE_CHARS; c += 0x10000)
    table[c - 1] = table[c] = BN;

  if (FRIBIDI_UNICODE_CHARS > 0x10000)
    {
      for (c = 0x10800; c < 0x11000; c++)
	table[c] = RTL;

      for (c = 0xE0000; c < 0xE1000; c++)
	table[c] = BN;
    }
}
コード例 #8
0
ファイル: main.c プロジェクト: jizzz/42projects
int					main(int ac, char **av)
{
	int				fd;
	char			**tetris;
	char			*solution;

	if (ac != 2)
		ft_exit();
	fd = open(av[1], O_RDONLY);
	if (fd < 0)
		ft_exit();
	tetris = check_file(fd);
	close(fd);
	if (tetris == NULL)
		ft_exit();
	solution = solver(tetris);
	if (solution == NULL)
		ft_exit();
	ft_putstr(solution);
	clear_tab(tetris);
	free(solution);
	return (0);
}