All pastes #343517 Raw Edit

Mine

public c v1 · immutable
·published 2007-02-07 02:30 UTC
rendered paste body
//These are the Includes#include <stdio.h>#include <string.h>#include <unistd.h>#include <fcntl.h>#include <errno.h>#include <termios.h>int main(void){      int fd; //This variable represents port existence.      // The ports ttyS1, ttyS2, and ttyS3 output 3 telling that they DO exist      fd = open("/dev/ttyS0", O_RDWR | O_NOCTTY | O_NDELAY); //Open the port.      if (fd == 0) //If fd doesnt exist, then it didn't connect.      {       printf("Failed to connect...\n\a");      }      else      {        fcntl(fd, F_SETFL, 0);  //Supposed to display port data (broken)	printf("%d\n", fd);     //Supposed to display port data (fixed)      }      return (fd);}