Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #14913

Re: warning: string length greater than '509'

From JohnF <john@please.see.sig.for.email.com>
Newsgroups comp.lang.c
Subject Re: warning: string length greater than '509'
Date 2011-12-23 13:04 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <jd1u8l$qut$1@reader1.panix.com> (permalink)
References <jd1jij$m7g$1@reader1.panix.com> <4EF45CC7.7759@mindspring.com>

Show all headers | View raw


pete <pfiland@mindspring.com> wrote:
> JohnF wrote:
>> 
>> warning: string length '1008' is greater than the
>> length '509'
>> static  char latexwrapper[16384] =
>>         "\\documentclass[10pt]{article}\n"
>>         "\\usepackage[latin1]{inputenc}\n"
>>         "\\usepackage{amsmath}\n"
>>         "\\usepackage{amsfonts}\n"
>>         "...lots-more-junk...";
>
> if latexwrapper is supposed to be constant,

Nope, it contains embedded keywords like %%expression%%
(always something delimited by %%...%%) that later gets
substituted with the user's input expression, and various
other substitutions like font size and similar
gobbledy-gook. (And, yeah, I make sure the 16384 allocation
doesn't overflow.)

>   static  char latexwrapper[33][510] = /* {"",""} */

One big long contiguous string is what's really required
to neatly solve the problem. An array of shorter ones
represents the situation in a way that requires more
lines of code in several different places. (But I appreciate
how you calculated [33] to match my 16384 total:)

> The number (509) appears more than once in the C90 standard 
Yes, it's a very nice number, indeed.
-- 
John Forkosh  ( mailto:  j@f.com  where j=john and f=forkosh )

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

warning: string length greater than '509' JohnF <john@please.see.sig.for.email.com> - 2011-12-23 10:01 +0000
  Re: warning: string length greater than '509' jacob navia <jacob@spamsink.net> - 2011-12-23 11:19 +0100
  Re: warning: string length greater than '509' pete <pfiland@mindspring.com> - 2011-12-23 05:49 -0500
    Re: warning: string length greater than '509' jacob navia <jacob@spamsink.net> - 2011-12-23 13:52 +0100
      Re: warning: string length greater than '509' Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-12-28 03:27 -0800
        Re: warning: string length greater than '509' James Kuyper <jameskuyper@verizon.net> - 2011-12-28 08:16 -0500
        Re: warning: string length greater than '509' Keith Thompson <kst-u@mib.org> - 2011-12-28 13:04 -0800
          Re: warning: string length greater than '509' Tim Rentsch <txr@alumni.caltech.edu> - 2012-01-25 16:47 -0800
    Re: warning: string length greater than '509' JohnF <john@please.see.sig.for.email.com> - 2011-12-23 13:04 +0000
      Re: warning: string length greater than '509' Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-12-23 09:36 -0500
  Re: warning: string length greater than '509' Robert Wessel <robertwessel2@yahoo.com> - 2011-12-23 04:59 -0600
    Re: warning: string length greater than '509' JohnF <john@please.see.sig.for.email.com> - 2011-12-23 12:41 +0000
      Re: warning: string length greater than '509' jt@toerring.de (Jens Thoms Toerring) - 2011-12-23 13:50 +0000
      Re: warning: string length greater than '509' James Kuyper <jameskuyper@verizon.net> - 2011-12-23 09:14 -0500
      Re: warning: string length greater than '509' Robert Wessel <robertwessel2@yahoo.com> - 2011-12-23 12:27 -0600
        Re: warning: string length greater than '509' Seebs <usenet-nospam@seebs.net> - 2011-12-23 19:04 +0000
          Re: warning: string length greater than '509' Robert Wessel <robertwessel2@yahoo.com> - 2011-12-23 16:11 -0600
        New C standard (was Re: warning: string length greater than '509') Keith Thompson <kst-u@mib.org> - 2011-12-23 12:21 -0800
          Re: New C standard (was Re: warning: string length greater than '509') Jens Gustedt <jens.gustedt@loria.fr> - 2011-12-23 22:54 +0100
          Re: New C standard (was Re: warning: string length greater than '509') Robert Wessel <robertwessel2@yahoo.com> - 2011-12-23 16:27 -0600
          Re: New C standard (was Re: warning: string length greater than '509') rudolf <r.thered@gmail.com> - 2011-12-23 15:36 -0800
          new edition of Harbison and Steele? Patrick Scheible <kkt@zipcon.net> - 2011-12-26 18:57 -0800
            Re: new edition of Harbison and Steele? Keith Thompson <kst-u@mib.org> - 2011-12-27 02:48 -0800
              Re: new edition of Harbison and Steele? Patrick Scheible <kkt@zipcon.net> - 2011-12-27 11:45 -0800
        Re: warning: string length greater than '509' JohnF <john@please.see.sig.for.email.com> - 2011-12-24 05:42 +0000
          Re: warning: string length greater than '509' Robert Wessel <robertwessel2@yahoo.com> - 2011-12-24 00:47 -0600
            Re: warning: string length greater than '509' JohnF <john@please.see.sig.for.email.com> - 2011-12-24 08:51 +0000
  Re: warning: string length greater than '509' Stars and Midnight China Blue <chine.bleu@yahoo.com> - 2011-12-23 03:34 -0800
  Re: warning: string length greater than '509' Kaz Kylheku <kaz@kylheku.com> - 2011-12-23 16:48 +0000

csiph-web