Advertisement
Guest User

Untitled

a guest
Apr 15th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1.     fscanf(fin,"%[^\n]", buff); //lê o .req até o final
  2.     const char space = ' '; //declaração do char espaço
  3.     char * const spc_at = strchr(buff, space); //procura um espaço entre o GET e o nome do arquivo
  4.     if(spc_at != NULL){
  5.         *spc_at = '\0'; //separa o GET do arquivo a ser processado
  6.         sprintf(file_req, "%s", spc_at + 1); //armazena o nome do arquivo na string file_req
  7.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement