Cannot get strcpy_P to work with single array

I have been fighting this for over an hour, and have tried every pointer manipulation I can think of. Maybe my c is a little rusty? I have a version that works with an array of these progmem buffers, but I need another function that takes a single one. Comments?

#include <avr/pgmspace.h>

const prog_char progString[] PROGMEM = "Testing";
char progmemBuffer[30];

void setup()
{
Serial.begin(19200);
Serial.flush();
Serial.println("Booted");
}

void loop()
{
delay(1000);
Serial.print("Address of progString = ");
Serial.println((int)&progString[0]);
formatData(progString, 42);
}

void formatData(const prog_char name, float value) {
Serial.print("Address of string = ");
Serial.println((int)&(name[0]));
delay(1000);
Serial.print("Dereferenced = ");
Serial.println((int)pgm_read_word(&(name[0])));
delay(1000);
strcpy_P(progmemBuffer, (char
)pgm_read_word(&(name[0])));
Serial.print("buffer = ");
Serial.println(progmemBuffer);
}

thanks,
brian

Try simplifying. What results do you get if you run this:

#include <avr/pgmspace.h>

const char progString[] PROGMEM = "Testing";  

void setup()			  
{
  Serial.begin(19200);
  Serial.flush();
  Serial.println("Booted");
}

void loop()			  
{
  delay(1000);
  Serial.print("Address of progString = ");
  Serial.println((int)progString);
  formatData(progString, 42.0);
}

void formatData(const char name[], float value) {
  char buffer[30];
  Serial.print("Address of name = ");
  Serial.println((int)name);
  delay(1000);
  strcpy_P(buffer, name);
  Serial.print("buffer = ");
  Serial.println(buffer);
}

Yep, looks much better! I guess I was thrown off by the double-array code I have, which includes the pgm_read_word usage. Thanks again!

brian

  Serial.begin(19200);
  Serial.flush();

Open the serial port. Block until all sent data (you haven't sent any) has been shifted out. Why?