Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1111 connectés 

  FORUM HardWare.fr
  Programmation

  A la recherche du .h perdu!!!

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

A la recherche du .h perdu!!!

n°66608
Babekiller
Posté le 20-10-2001 à 18:47:40  profilanswer
 

Bon ça fais pas très longtemps que je fais du c mais voila je sais pas comment récupérer les libraries graph.h et dir.h!!  
 
Un site a me proposer?

mood
Publicité
Posté le 20-10-2001 à 18:47:40  profilanswer
 

n°66642
tfj57
Posté le 21-10-2001 à 01:24:36  profilanswer
 

Quel compilateur ?
 
A+

n°66665
Babekiller
Posté le 21-10-2001 à 11:38:53  profilanswer
 

Ben soit VC++ ou Dev Cpp!
Mais je me demande si il me faut pas un autre compilateur?
 
merci ...

n°66675
Babekiller
Posté le 21-10-2001 à 14:37:48  profilanswer
 

up

n°66677
wpk
Posté le 21-10-2001 à 14:44:05  profilanswer
 

si t'est passé sous windows, graph.h n'existe plus...
et si mes souvenirs sont bons dir.h c'est du specific borland

n°66683
Babekiller
Posté le 21-10-2001 à 15:07:37  profilanswer
 

Bon alors Question je complie ca avec quoi?
 
 
/* Definition des entetes */
 
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <dos.h>
#include <dir.h>
 
/* Definition des constantes */
 
#define Donnee  0x378
#define Etat  0x379
#define Commande 0x37a
 
#define ERROR  0x08
#define SLCT  0x10
#define PE   0x20
#define ACK   0x40
#define BUSY  0x80
 
#define STROBE  0x01
#define AUTOFEED 0x02
#define INIT  0x04
#define SLCTIN  0x08
#define IRQENABLE 0x10
 
#define SIZE_BLOCK 0x1a1
 
extern void transmit( char );
 
 
 
 
void transmit(char data)
{
 
// Verification du signal ACK
asm  mov  dx, Etat
 
waitreq:
asm{
  in  al, dx
  and  al, 040h
  je  waitreq
 
// Preparation de l'octet a transmettre
  mov  al, data
  mov  dx, Donnee
  out  dx, al
 
// Activation du signal STROBE
  mov  dx, Commande
  in  al, dx
  or  al, 001h
  out  dx, al
 
// Attente de fin du signal ACK
  mov  dx, Etat
}
endreq:
asm{
  in  al, dx
  and  al, 040h
  jne  endreq
 
// Desactivation du signal STROBE
  mov  dx, Commande
  in  al, dx
  and  al, 0FEh
  out  dx, al
 
 
 }
}
 
 
 
 
 
 
 
 
 
void main( int argc,char *argv[] )
{
long total;
unsigned int indice, indice_lu;
unsigned char value[ 0x200 ],octet_cde,octet;
FILE *fichier;
unsigned char *ptrlec, *ptrecr;
unsigned char buffer[ 4096 ];
struct ffblk ffblk;
 
 
 if (argc !=2)
 {
  printf(" Usage : player nomdefichier.mp3\n" );
  printf("    ou : player *.mp3\n\n" );
  exit( 1 );
 }
 
 if (findfirst(argv[1],&ffblk,0) != 0)
 {
  printf( "Erreur ouverture %s\n",argv[1] );
  exit( 1 );
 }
 
 do
 {
 
  if ((fichier = fopen(ffblk.ff_name,"rb" )) == NULL)
  {
   printf("\nErreur d'ouverture fichier %s",ffblk.ff_name);
   continue;
  }
  printf("\nEcoute du fichier %s         ",ffblk.ff_name);
 
  octet_cde = inp( Commande );
 
  total = ffblk.ff_fsize;
 
  while (total!=0)
  {
   if (total > SIZE_BLOCK)
   {
    fread(value,1,SIZE_BLOCK,fichier);
    total -= SIZE_BLOCK;
    indice_lu = SIZE_BLOCK;
   }
   else
   {
    fread(value,1,total,fichier);
    indice_lu = total;
    total = 0;
   }
   for(indice = 0; indice != indice_lu ; indice++)
   {
      transmit(value[indice]);
 
 
   }
   if ((total % 50) == 0)
   {
    if (kbhit())
    {
     switch(getch())
     {
      case 27 : fclose(fichier);
       exit(0);
       break;
      case ' ' : getch();
       break;
      case 's' :
      case 'S' : total = 0;
       break;
      }
    }
   }
  }
  fclose( fichier );
 }
 while (findnext(&ffblk) == 0);
}

n°66684
wpk
Posté le 21-10-2001 à 15:12:16  profilanswer
 

arf, un vieu de la vieille  :D  
 
ben tu reecris ton code windows complient (par exemple les in et out tu peux oublier, sous win t'est en mode protegé, seul le code en ring 0 peut utiliser les in et out)...

n°66690
Babekiller
Posté le 21-10-2001 à 16:00:19  profilanswer
 

Cool je peus allez me pendre alors ??
 
Et si je prend TurboC Ver3.0 ça reglera mon Prob?


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation

  A la recherche du .h perdu!!!

 

Sujets relatifs
[C++] Recherche cours sur les socketsidée de nouveau format son.... à méditer -> recherche codeur pour aide
[HTML] recherche "dico des bannières"referencement moteurs de recherche
Jacky PC recherche un webmaster/webdisigner[PHP] recherche tutorials sur PHP que l'on peut downloader
[ADA] URGENT ! recherche logiciel[php mysql] recherche dans une db sur différentes tables...
[PHP] Crée une fonction de recherche sur une base MySQL[PHP] Moteur de recherche interne
Plus de sujets relatifs à : A la recherche du .h perdu!!!


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR