Sign in

username:

password:



Not a member?

Search rabbit-semi



Search tips

Subscribe to rabbit-semi



Ads

Discussion Groups

Discussion Groups | Rabbit-Semi | Problem with rabbitweb

This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. Rabbit Semi is a spin-off from Z-World who makes a variety of embedded modules and tools. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions, flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.

Problem with rabbitweb - Omar - Jun 1 21:34:53 2008

Hello,
I use Rabbit web, and need to put a zhtml page into a directory
different of root.

I have:
...
#ximport "/frmparams.zhtml" frmparams_zhtml
#ximport "/Encabe2.jpg" encabe2
...

and resources

SSPEC_RESOURCETABLE_START
...

SSPEC_RESOURCE_XMEMFILE("/iec/frmparams.zhtml",frmparams_zhtml),
SSPEC_RESOURCE_XMEMFILE("/Encabe2.jpg",encabe2),

...

SSPEC_RESOURCETABLE_END

But the compiler get me this message.

"A char array that has an initializer the same length as the array
will not be null-terminated."

I have a typedef struc in userblock with somes variables declarated.

have you some idea where i can search the problem ?

(I have use the thermometer sample of Dynamic C and it works fine !)

Best regards

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )


Re: Problem with rabbitweb - Scott Henion - Jun 1 22:05:39 2008

Omar wrote:
> Hello,
> I use Rabbit web, and need to put a zhtml page into a directory
> different of root.
>
> I have:
> ...
> #ximport "/frmparams.zhtml" frmparams_zhtml
> #ximport "/Encabe2.jpg" encabe2
> ...
>
> and resources
>
> SSPEC_RESOURCETABLE_START
> ...
>
> SSPEC_RESOURCE_XMEMFILE("/iec/frmparams.zhtml",frmparams_zhtml),
> SSPEC_RESOURCE_XMEMFILE("/Encabe2.jpg",encabe2),
>
> ...
>
> SSPEC_RESOURCETABLE_END
> But the compiler get me this message.
>
> "A char array that has an initializer the same length as the array
> will not be null-terminated."
>
> I have a typedef struc in userblock with somes variables declarated.
>
> have you some idea where i can search the problem ?
>
> (I have use the thermometer sample of Dynamic C and it works fine !)
>
> Best regards
>
>

SSPEC_RESOURCE_XMEMFILE("/iec/frmparams.zhtml",frmparams_zhtml),

The file name is 20 characters. I think that is the default max URL
length. I don't remember the #define, check the html and zserver docs,
ther eis a define for the max path length.

Or you could make the path/name shorter: "/iec/frmprms.zhtml"

--
------------------------------------------
| Scott G. Henion| s...@shdesigns.org |
| Consultant | Stone Mountain, GA |
| SHDesigns http://www.shdesigns.org |
------------------------------------------
Rabbit libs: http://www.shdesigns.org/rabbit/
today's fortune
You can't push on a string.
------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Problem with rabbitweb - witt...@ecs.csus.edu - Jun 1 22:21:48 2008

> Hello,
> I use Rabbit web, and need to put a zhtml page into a directory
> different of root.
>
> I have:
> ...
> #ximport "/frmparams.zhtml" frmparams_zhtml
> #ximport "/Encabe2.jpg" encabe2
> ...
>
> and resources
>
> SSPEC_RESOURCETABLE_START
> ...
>
> SSPEC_RESOURCE_XMEMFILE("/iec/frmparams.zhtml",frmparams_zhtml),
> SSPEC_RESOURCE_XMEMFILE("/Encabe2.jpg",encabe2),
>
> ...
>
> SSPEC_RESOURCETABLE_END

Omar --

The SSPEC_MAXNAME define is too small for you. Check out
LIB\TCPCIP\ZSERVER.LIB for details.

In your main code, before you #use things, do this:

#define SSPEC_MAXNAME 32 /* Want long file paths */

The default is 20 chars, and you are using them all right now!
Remember to leave one char for the terminating NUL-char.

As the comment in ZSERVER.LIB do warn, this will increase your
data-section overhead.
HTH,
*the other brian

> But the compiler get me this message.
>
> "A char array that has an initializer the same length as the array
> will not be null-terminated."
>
> I have a typedef struc in userblock with somes variables declarated.
>
> have you some idea where i can search the problem ?
>
> (I have use the thermometer sample of Dynamic C and it works fine !)
>
> Best regards
>

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Problem with rabbitweb - Omar - Jun 4 4:52:13 2008

Yes, This has been the problem !

Thank you very much !

--- In r...@yahoogroups.com, wittb@... wrote:
>
> > Hello,
> > I use Rabbit web, and need to put a zhtml page into a directory
> > different of root.
> >
> > I have:
> > ...
> > #ximport "/frmparams.zhtml" frmparams_zhtml
> > #ximport "/Encabe2.jpg" encabe2
> > ...
> >
> > and resources
> >
> > SSPEC_RESOURCETABLE_START
> > ...
> >
> > SSPEC_RESOURCE_XMEMFILE("/iec/frmparams.zhtml",frmparams_zhtml),
> > SSPEC_RESOURCE_XMEMFILE("/Encabe2.jpg",encabe2),
> >
> > ...
> >
> > SSPEC_RESOURCETABLE_END
>
> Omar --
>
> The SSPEC_MAXNAME define is too small for you. Check out
> LIB\TCPCIP\ZSERVER.LIB for details.
>
> In your main code, before you #use things, do this:
>
> #define SSPEC_MAXNAME 32 /* Want long file paths */
>
> The default is 20 chars, and you are using them all right now!
> Remember to leave one char for the terminating NUL-char.
>
> As the comment in ZSERVER.LIB do warn, this will increase your
> data-section overhead.
> HTH,
> *the other brian
>
> >
> >
> >
> >
> > But the compiler get me this message.
> >
> > "A char array that has an initializer the same length as the array
> > will not be null-terminated."
> >
> > I have a typedef struc in userblock with somes variables declarated.
> >
> > have you some idea where i can search the problem ?
> >
> > (I have use the thermometer sample of Dynamic C and it works fine !)
> >
> > Best regards
> >
> >
>
------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )