Pelo menos para a implementação GNU de dc
, há um DEFAULT_LINE_MAX
de 70 caracteres codificados, embora isso possa ser substituído definindo uma variável de ambiente DC_LINE_LENGTH
. De dc/numeric.c
:
559 static int out_col = 0;
560 static int line_max = -1; /* negative means "need to check environment" */
561 #define DEFAULT_LINE_MAX 70
562
563 static void
564 set_line_max_from_environment(void)
565 {
566 const char *env_line_len = getenv("DC_LINE_LENGTH");
567 line_max = DEFAULT_LINE_MAX;
568 errno = 0;
569 if (env_line_len) {
570 char *endptr;
571 long proposed_line_len = strtol(env_line_len, &endptr, 0);
572 line_max = (int)proposed_line_len;
573
574 /* silently enforce sanity */
575 while (isspace(*endptr))
576 ++endptr;
577 if (*endptr || errno || line_max != proposed_line_len
578 || line_max < 0 || line_max == 1)
579 line_max = DEFAULT_LINE_MAX;
580 }
581 }
582
Então
$ dc
999999999999999999999999999999999999999999999999999999999999999999999999
p
999999999999999999999999999999999999999999999999999999999999999999999\
999
q
mas
$ DC_LINE_LENGTH=0 dc
999999999999999999999999999999999999999999999999999999999999999999999999
p
999999999999999999999999999999999999999999999999999999999999999999999999
q
$