need help converting C for reflow oven to Arduino

I'm converting the C example for the sparkfun reflow oven from C for PIC16F88 to Arduino for ATMega328P.

Here's the soure:
http://www.crossroadsfencing.com/ToasterControl-v021.C
from here

Got most of it figured out I think, getting these errors to finish up:

oven_controller.cpp:722:13: error: macro "putc" requires 2 arguments, but only 1 given << lot of occurrences of this
oven_controller:49: error: expected initializer before 'serverX' << and this one twice
oven_controller:81: error: expected initializer before 'serverX'

Not sure how to fix it.
Probably need something in the EEPROM section aslo, not sure what.
Little help please?

My conversion, in thirds:

/*
    4-26-05
 Copyright Spark Fun Electronics© 2005
 Nathan Seidle 
 spark@sparkfun.com
 
 Basic control and monitoring of a Toaster oven for SMD reflowing.
 
 The unit responds to these commands:
 
 0x31 ('1') - Relay On : Activates the heating elements
 0x32 ('2') - Relay Off : Deactivates the heating elements
 
 0x63 ('c') - Temperature Check : Unit takes a temperature reading and responds with the 10-bit reading in two bytes
 0x74 ('t') - Time Check : Unit reports total seconds run (ex: 138)
 0x72 ('r') - Reset Time : Resets the total seconds.
 
 Safety settings : The reflow toaster controller will shut off the relay if it does not 
 receive the Relay On command after 30 seconds.
 
 This is a really nice example program that includes examples on how to do the following:
 Standard HD44780 parallel interface to LCD
 Print decimal numbers and strings to serial output as well as an LCD
 Reading buttons
 Real time clock (RTC) interrupts using an internal osc (not very accurate, but it works)
 Doing an ADC on a thermocouple to get temperature
 EEPROM Read and Write functions are also available for storing profiles
 Oh, and of course we blink the Status LED
 
 I've pulled all the functions into this one file for all of you who want to wade through the code.
 
 We use a simple, cheap, thermocouple with the expensive AD595AQ Amplifier
 
 */
//#define Clock_8MHz
//#define Baud_9600

/* Rewritten for ATMega328 */
#define STATUS_LED      13

#define BUTTON_UP       11
#define BUTTON_DOWN     10
#define BUTTON_SELECT   9

#define RELAY           12

// #define OFF 0  Replaced with Low
// #define ON  1  Replaced with High

#define D7              7
#define D6              6
#define D5              5
#define D4              4
#define E               15
#define R_W             16
#define RS              17

#define     CLR_DISP        0b00000001    //Clear display
#define     CUR_HOME        0b00000010    //Move cursor home and clear screen memory
#define     DISP_ON         0b00001100    //Turn visible LCD on
#define     SET_CURSOR      0b10000000    //SET_CURSOR + X : Sets cursor position to X

byte m_seconds = 0;
byte seconds = 0;
int total_seconds = 0;
//#include "\Global\Code\C\16F88.h" // Device hardware map
//#include "\Global\Code\C\int16CXX.H" // Device interrupt definitions

#pragma config |= 0x2902
#pragma origin 4 //Used for boot loading and interrupts

//Global Variables
//============================
//byte m_seconds;
//byte seconds;
//int total_seconds; //Used in VB for thresholds
//============================
//End Global Variables

//Interrupt Vectors
//============================
void interrupt serverX() // ???
{
  int_save_registers
    char sv_FSR = FSR;  // save FSR if required

  if(TMR1IF) //Timer1 Overflow Interrupt
  {
    //Setup Timer1 to fire every 100ms
    //1 TMR1 click is 4us (with prescaler of 8). 100ms / .004ms = 25000 clicks
    //65535 - 25000 = 40535 = 0x9E57
    TMR1ON = 0; 
    TMR1H = 0x9E; 
    TMR1L = 0x57; 
    TMR1ON = 1;

    m_seconds++;
    if(m_seconds == 10)
    {
      m_seconds = 0;
      seconds++;
      total_seconds++;
    }

    TMR1IF = 0; //Clear INT Flag
  }

  FSR = sv_FSR;               // restore FSR if saved
  int_restore_registers 
}
//============================

//Function definitions
//============================
//#include "d:\Pics\code\Delay.c"   // Delays
//#include "d:\Pics\code\Stdio.c"   // Print routines


int check_temp(void);
void delay_ms(int16 x);

void send_char(byte);
void send_cmd(byte);
//void send_string(const char* incoming_string);
void LCD_wait(void);
void init_lcd(void);
void printf_lcd(const char *nate, int my_byte);

void putc(byte);
void getc();
void scanc();
void bin2Hex(char x);
void printf(const char *nate, int my_byte);

//============================
//End Function Definitions

void setup () {
  // some kind of LCD Library for these 7??
  pinMode (D4, OUTPUT);
  digitalWrite (D4, LOW);
  pinMode (D5, OUTPUT);
  digitalWrite (D5, LOW);
  pinMode (D6, OUTPUT);
  digitalWrite (D6, LOW);
  pinMode (D7, OUTPUT);
  digital Write (D7, LOW);
  pinMode (RELAY, OUTPUT);
  digitalWrite (RELAY, LOW); //  = off
  pinMode (STATUS_LED, OUTPUT);
  digitalWrite (STATUS_LED, HIGH); // = off
  pinMode (RS, OUTPUT);
  digitalWrite (RS, LOW);
  pinMode (R_W, OUTPUT);
  digitalWrite (R_W, LOW);
  pinMode (E, OUTPUT);
  digitalWrite (E, LOW);

  pinMode (BUTTON_UP, INPUT);
  digitalWrite (BUTTON_UP, HIGH);
  pinMode (BUTTON_DOWN, INPUT);
  digitalWrite (BUTTON_DOWN, HIGH);
  pinMode (BUTTON_SELECT, INPUT);
  pinMode (BUTTON_SELECT, HIGH);
  pinMode (A5, TEMP);

  Serial.begin (19200);
  Serial.flush;

  //Setup Timer1 for delay between measurements
  T1CON = 0b00110000; //Prescale of 1:8 - 1 timer click = 4us with 8MHz internal osc

  //Setup interrupts
  TMR1IE = 1;
  PEIE = 1;
  GIE = 1;

  TMR1ON = 1;

  init_lcd();

  printf_lcd(" SparkFun.com", 0);
  send_cmd(SET_CURSOR + 64);
  printf_lcd("ReflowToaster v2", 0);
  delay(750);
  send_cmd(CLR_DISP);

}

void loop ()
{
  byte choice;
  int adc_reading;
  unsigned long temperature;

  while(1)
  {
    if(seconds > 30)
    {
      RELAY = LOW; // off

      printf("Emergency shut down", 0);

      send_cmd(CLR_DISP);
      printf_lcd("Emergency                               shut down", 0);

      while(1)
      {
        STATUS_LED ^= 1; // ???
        delay (500);
      }
    }

    //Scan for buttons as we wait
    //====================================================
    if(digitalRead(BUTTON_SELECT) == 0)
    {
      while(digitalRead(BUTTON_SELECT) == 0); //Wait for user to remove finger

      send_cmd(CLR_DISP);
      printf_lcd("Select", 0);

      printf("#SELECT$", 0);
    }
    if(digitalRead(BUTTON_UP) == 0)
    {
      while(digitalRead(BUTTON_UP) == 0); //Wait for user to remove finger

      send_cmd(CLR_DISP);
      printf_lcd("Up", 0);

      printf("#UP$", 0);
    }
    if(digitalRead(BUTTON_DOWN) == 0)
    {
      while(digitalRead(BUTTON_DOWN) == 0); //Wait for user to remove finger

      send_cmd(CLR_DISP);
      printf_lcd("Down", 0);

      printf("#DOWN$", 0);
    }
    //====================================================
    //Check for an incoming serial command
    //====================================================
    if(Serial.available >0)
    {
      choice = Serial.read();

      seconds = 0; //Reset the emergency shutdown time-out

      switch(choice){

      case: 
        'c' //Check temp
        {
          adc_reading = check_temp();

          temperature = adc_reading * 5000UL; //75 * 5000 = 375000
          temperature /= 1024; //375000 / 1024 = 366mV
          //temperature /= 10; //366mV / 10mV/C = 36.6C = 97.88F

          printf("#%d$", temperature); //Reports temp in mV

          //Now make it pretty for the LCD
          //====================================================
          send_cmd(CLR_DISP);
          printf_lcd("Temp=", 0);

          unsigned long digit_100s; 
          unsigned long digit_10s; 
          unsigned long digit_1s;

          digit_100s = temperature / 100;

          temperature %= 100; //Mod operator to cut off the 100s from temperature variable
          digit_10s = temperature / 10;


          temperature %= 10;
          digit_1s = temperature;

          // convert to byte for display ??

          printf_lcd("%d", digit_100s);
          printf_lcd("%d.", digit_10s);
          printf_lcd("%dC", digit_1s);
          //====================================================
          break;
        }

      case: 
        't' //Check time
        {
          send_cmd(CLR_DISP);
          printf_lcd("Time=%d", total_seconds);

          printf("#%d$", total_seconds); 
          break;
        }

      case: 
        'r' //Reset time
        {
          m_seconds = 0;
          seconds = 0;
          total_seconds = 0;

          send_cmd(CLR_DISP);
          printf_lcd("Time Reset", 0);

          printf("#OK$", 0);
          break;
        }

      case: 
        '1' //Turn on oven
        {
          send_cmd(CLR_DISP);
          printf_lcd("Relay On", 0);

          printf("#ON$", 0);
          digitalWrite (RELAY, HIGH);
          break;
        }

      case: 
        '2' //Turn off oven
        {
          send_cmd(CLR_DISP);
          printf_lcd("Relay Off", 0);

          printf("#OFF$", 0);
          digitalWrite(RELAY, LOW);
          break;
        }

        digitalWrite (STATUS_LED, ^= 1);  // hi?  lo?
      }  // end switch:choice
      //====================================================


    } // End if serial available
  } // End While
}//End Loop




//Initializes the 4-bit parallel interface to the HD44780
void init_lcd(void)
{
  //Wait for LCD busy bit to clear
  LCD_wait();

  digitalWrite(  RS , 0);               
  digitalWrite(R_W , 0);

  //Tell the LCD we are using 4bit data communication
  //===============================================================
  delay(100);
  digitalWrite (D4, HIGH);
  digitalWrite (D5, HIGH);
  //  PORTA = 0b.0000.0011;
  digitalWrite (E, 1); 
  digitalWrite (E, 0);

  delay(50);
  digitalWrite (D4, HIGH);
  digitalWrite (D5, HIGH);
  //  PORTA = 0b.0000.0011;
  digitalWrite (E, 1); 
  digitalWrite (E, 0);


  delay(10);
  digitalWrite (D4, HIGH);
  digitalWrite (D5, HIGH);
  //  PORTA = 0b.0000.0011;
  digitalWrite (E, 1); 
  digitalWrite (E, 0);

  delay(10);
  digitalWrite (D4, LOW);
  digitalWrite (D5, HIGH);
  //  PORTA = 0b.0000.0010;
  digitalWrite (E, 1); 
  digitalWrite (E, 0);


  send_cmd(DISP_ON);
  send_cmd(CLR_DISP);
  //===============================================================

  //    cursor_position = 0;
} 

//Checks the busy flag and waits until LCD is ready for next command
void LCD_wait(void)
{
  bit i = 1;

  //  TRISA = 0b.0001.1111;

  digitalWrite (R_W, 1); //Tell LCD to output status
  digitalWrite (RS, 0);               


  while(i == 1)
  {
    digitalWrite(E , 1); 
    i = digitalRead (D7); //Read data bit 7 - Busy Flag
    digitalWrite (E, 0);

    digitalWrite (E, 1); 
    digitalWrite (E, 0); //Toggle E to get the second four bits of the status byte - but we don't care
  }

  //  TRISA = 0b.0001.0000; //0 = Output, 1 = Input (TEMP on RA4)
}

//Sends an ASCII character to the LCD
void send_char(char c)
{
  LCD_wait();

  digitalWrite ( R_W, 0); //set LCD to write
  digitalWrite ( RS, 1); //set LCD to data mode

  D7 = c.7;
  D6 = c.6;
  D5 = c.5;
  D4 = c.4;
  digitalWrite (E, 1); 
  digitalWrite (E, 0); //Toggle the Enable Pin

  D7 = c.3;
  D6 = c.2;
  D5 = c.1;
  D4 = c.0;
  digitalWrite (E, 1); 
  digitalWrite (E, 0);
}

//Sends an LCD command
void send_cmd(char d)
{
  LCD_wait();

  //TRISC = 0b.0000.0000;   //0 = Output, 1 = Input

    digitalWrite(R_W, 0); //set LCD to write

  D7 = d.7;
  D6 = d.6;
  D5 = d.5;
  D4 = d.4;
  digitalWrite(E, 1); 
  digitalWrite(E, 0);

  D7 = d.3;
  D6 = d.2;
  D5 = d.1;
  D4 = d.0;
  digitalWrite(E, 1); 
  digitalWrite(E, 0);
}

//Sends a given string to the LCD. Will start printing from
//current cursor position.
/*
void send_string(const char *incoming_string)
 {
 byte x;
 
 for(x = 0 ; incoming_string[x] != '\0' ; x++)
 send_char(incoming_string[x]);
 }
 */

//Returns the current temperature
#define AVG_AMT 16
int check_temp(void)
{
  byte x;
  int amount, total = 0;

  //Read Channel 4
  ADCON0 = 0b01100001; //Select Fosc/16 for 8mhz, and channel RA4/AN4, A/D on
  ADCON1 = 0b11000000; //Right justified, ADCS2 = 1 

  for(x = 0 ; x < AVG_AMT ; x++)
  {
    delay(1);

    GO = 1; //Convert RA1 to digital

    while(GO == 1);

    amount.high8 = ADRESH;
    amount.low8 = ADRESL;

    total += amount; //Add on to the total
  }
  amount = total / AVG_AMT;

  return(amount);
}

//Reads e_data from the onboard eeprom at e_address
byte onboard_eeread(byte e_address)
{
  EEPGD = 0; //Point to EEPROM Memory

  //Do a read
  EEADR = e_address; //Set the address to read
  RD = 1; //Read it

  return(EEDATA); //Read that EEPROM value
}    

//Write e_data to the onboard eeprom at e_address
void onboard_eewrite(byte e_data, byte e_address)
{
  bit temp_GIE = GIE;

  EEPGD = 0; //Point to EEPROM data block
  FREE = 0; //Preform write only  

  EEIF = 0; //Clear the write completion intr flag
  EEADR = e_address; //Set the address
  EEDATA = e_data; //Give it the data
  WREN = 1; //Enable EE Writes
  GIE = 0; //Disable Intrs

  //Specific EEPROM write steps
  EECON2 = 0x55;
  EECON2 = 0xAA;
  WR = 1;
  //Specific EEPROM write steps

  while(EEIF == 0); //Wait for write to complete
  EEIF = 0; //Clear the write completion intr flag

  WREN = 0; //Disable EEPROM Writes

  GIE = temp_GIE; //Set GIE to its original state
}

final third

//Sends nate to the Transmit Register
/*  Covered  by Serial.begin ??
 void putc(byte nate)
 {
 while(TXIF == 0);
 TXREG = nate;
 }
 */
/*  Covered by Serial.begin ??
 byte getc(void)
 {
 while(RCIF == 0);
 
 return (RCREG);
 }    
 */
/*  Covered by Serial.begin ??
 byte scanc(void)
 {
 int16 counter = 0;
 
 while(RCIF == 0)
 {
 counter++;
 if(counter == 1000) return 0;
 }
 
 return (RCREG);
 }    
 */

//Returns ASCII Decimal and Hex values
byte bin2Hex(char x)
{
  skip(x);
#pragma return[16] = "0123456789ABCDEF"
}

//Prints a string including variables
void printf(const char *nate, int my_byte)
{

  byte i, k, m, temp;
  byte high_byte = 0, low_byte = 0;
  byte y, z;

  byte decimal_output[5];

  for(i = 0 ; ; i++)
  {
    //delay_ms(3);

    k = nate[i];

    if (k == '\0') 
      break;

    else if (k == '%') //Print var
    {
      i++;
      k = nate[i];

      if (k == '\0') 
        break;
      else if (k == '\\') //Print special characters
      {
        i++;
        k = nate[i];

        putc(k);


      } //End Special Characters
      else if (k == 'b') //Print Binary
      {
        for( m = 0 ; m < 8 ; m++ )
        {
          if (my_byte.7 == 1) putc('1');
          if (my_byte.7 == 0) putc('0');
          if (m == 3) putc(' ');

          my_byte = my_byte << 1;
        }
      } //End Binary               
      else if (k == 'd') //Print Decimal
      {
        //Print negative sign and take 2's compliment

        if(my_byte < 0)
        {
          putc('-');
          my_byte *= -1;
        }


        if (my_byte == 0)
          putc('0');
        else
        {
          //Divide number by a series of 10s
          for(m = 4 ; my_byte > 0 ; m--)
          {
            temp = my_byte % (int)10;
            decimal_output[m] = temp;
            my_byte = my_byte / (int)10;               
          }

          for(m++ ; m < 5 ; m++)
            putc(bin2Hex(decimal_output[m]));
        }

      } //End Decimal
      else if (k == 'h') //Print Hex
      {
        //New trick 3-15-04
        putc('0');
        putc('x');

        if(my_byte > 0x00FF)
        {
          putc(bin2Hex(my_byte.high8 >> 4));
          putc(bin2Hex(my_byte.high8 & 0b00001111));
        }

        putc(bin2Hex(my_byte.low8 >> 4));
        putc(bin2Hex(my_byte.low8 & 0b00001111));

        /*high_byte.3 = my_byte.7;
         high_byte.2 = my_byte.6;
         high_byte.1 = my_byte.5;
         high_byte.0 = my_byte.4;
         
         low_byte.3 = my_byte.3;
         low_byte.2 = my_byte.2;
         low_byte.1 = my_byte.1;
         low_byte.0 = my_byte.0;
         
         putc('0');
         putc('x');
         
         putc(bin2Hex(high_byte));
         putc(bin2Hex(low_byte));*/
      } //End Hex
      else if (k == 'f') //Print Float
      {
        putc('!');
      } //End Float
      else if (k == 'u') //Print Direct Character
      {
        //All ascii characters below 20 are special and screwy characters
        //if(my_byte > 20) 
        putc(my_byte);
      } //End Direct

    } //End Special Chars           

    else
      putc(k);
  }    
}

//Prints a string to the LCD including variables
void printf_lcd(const char *nate, int my_byte)
{

  byte i, k, m, temp;
  byte high_byte = 0, low_byte = 0;
  byte y, z;

  byte decimal_output[5];

  for(i = 0 ; ; i++)
  {
    //delay_ms(3);

    k = nate[i];

    if (k == '\0') 
      break;

    else if (k == '%') //Print var
    {
      i++;
      k = nate[i];

      if (k == '\0') 
        break;
      else if (k == '\\') //Print special characters
      {
        i++;
        k = nate[i];

        send_char(k);


      } //End Special Characters
      else if (k == 'b') //Print Binary
      {
        for( m = 0 ; m < 8 ; m++ )
        {
          if (my_byte.7 == 1) send_char('1');
          if (my_byte.7 == 0) send_char('0');
          if (m == 3) send_char(' ');

          my_byte = my_byte << 1;
        }
      } //End Binary               
      else if (k == 'd') //Print Decimal
      {
        //Print negative sign and take 2's compliment

        if(my_byte < 0)
        {
          send_char('-');
          my_byte *= -1;
        }


        if (my_byte == 0)
          send_char('0');
        else
        {
          //Divide number by a series of 10s
          for(m = 4 ; my_byte > 0 ; m--)
          {
            temp = my_byte % (int)10;
            decimal_output[m] = temp;
            my_byte = my_byte / (int)10;               
          }

          for(m++ ; m < 5 ; m++)
            send_char(bin2Hex(decimal_output[m]));
        }

      } //End Decimal
      else if (k == 'h') //Print Hex
      {
        //New trick 3-15-04
        send_char('0');
        send_char('x');

        if(my_byte > 0x00FF)
        {
          send_char(bin2Hex(my_byte.high8 >> 4));
          send_char(bin2Hex(my_byte.high8 & 0b00001111));
        }

        send_char(bin2Hex(my_byte.low8 >> 4));
        send_char(bin2Hex(my_byte.low8 & 0b00001111));

        /*high_byte.3 = my_byte.7;
         high_byte.2 = my_byte.6;
         high_byte.1 = my_byte.5;
         high_byte.0 = my_byte.4;
         
         low_byte.3 = my_byte.3;
         low_byte.2 = my_byte.2;
         low_byte.1 = my_byte.1;
         low_byte.0 = my_byte.0;
         
         putc('0');
         putc('x');
         
         putc(bin2Hex(high_byte));
         putc(bin2Hex(low_byte));*/
      } //End Hex
      else if (k == 'u') //Print Direct Character
      {
        //All ascii characters below 20 are special and screwy characters
        //if(my_byte > 20) 
        send_char(my_byte);
      } //End Direct

    } //End Special Chars           

    else
      send_char(k);
  }    
}

//General short delay  >> Replaced with standard delay(ms)
/* void delay_ms(int x)
 {
 //Clocks out at 1006us per 1ms
 byte y, z;
 for ( ; x > 0 ; x--)
 for ( y = 0 ; y < 4 ; y++)
 for ( z = 0 ; z < 69 ; z++);
 
 }*/

The putc() function in PIC CCS C sends a character over serial. If you want to continue to use serial, replace it with hardware serial or NSS.

Okay, got that fixed.

Just left with this now:

oven_controller:49: error: expected initializer before 'serverX'
oven_controller:81: error: expected initializer before 'serverX'

/*
    4-26-05
 Copyright Spark Fun Electronics© 2005
 Nathan Seidle 
 spark@sparkfun.com
 
 //#define Clock_8MHz
//#define Baud_9600

/* Rewritten for ATMega328 */
#define STATUS_LED      13

#define BUTTON_UP       11
#define BUTTON_DOWN     10
#define BUTTON_SELECT   9

#define RELAY           12

// #define OFF 0  Replaced with Low
// #define ON  1  Replaced with High

#define D7              7
#define D6              6
#define D5              5
#define D4              4
#define E               15
#define R_W             16
#define RS              17

#define     CLR_DISP        0b00000001    //Clear display
#define     CUR_HOME        0b00000010    //Move cursor home and clear screen memory
#define     DISP_ON         0b00001100    //Turn visible LCD on
#define     SET_CURSOR      0b10000000    //SET_CURSOR + X : Sets cursor position to X

byte m_seconds = 0;
byte seconds = 0;
int total_seconds = 0;
//#include "\Global\Code\C\16F88.h" // Device hardware map
//#include "\Global\Code\C\int16CXX.H" // Device interrupt definitions

#pragma config |= 0x2902
#pragma origin 4 //Used for boot loading and interrupts

//Global Variables
//============================
//byte m_seconds;
//byte seconds;
//int total_seconds; //Used in VB for thresholds
//============================
//End Global Variables

//Interrupt Vectors
//============================
void interrupt serverX() // ???           <<<<<<<<<<<<<<<<<<<<<<
{
  int_save_registers
    char sv_FSR = FSR;  // save FSR if required

  if(TMR1IF) //Timer1 Overflow Interrupt
  {
    //Setup Timer1 to fire every 100ms
    //1 TMR1 click is 4us (with prescaler of 8). 100ms / .004ms = 25000 clicks
    //65535 - 25000 = 40535 = 0x9E57
    TMR1ON = 0; 
    TMR1H = 0x9E; 
    TMR1L = 0x57; 
    TMR1ON = 1;

    m_seconds++;
    if(m_seconds == 10)
    {
      m_seconds = 0;
      seconds++;
      total_seconds++;
    }

    TMR1IF = 0; //Clear INT Flag
  }

  FSR = sv_FSR;               // restore FSR if saved
  int_restore_registers 
}
//============================

serverX is a function declared as an ISR for a timer interrupt to report milliseconds and seconds. This is not necessary as arduino provides us with the nice millis() function. Replace references to the total_seconds, seconds, and m_seconds with variations of millis() as the code calls for. Service these variables in the main loop, checking if the right amount of time has passed, as with the blink without delay example.