emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About the new frame title


From: Angelo Graziosi
Subject: Re: About the new frame title
Date: Fri, 25 Sep 2020 15:31:49 +0200 (CEST)

> Il 25/09/2020 14:41 Eli Zaretskii ha scritto:
> 
> This will work, but the idea was to compute the value at compile time,

Not sure if this works as you want, just a STC,

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main()
{
  int n, m, nb;

  srand (time(NULL));

  if (rand() % 2 == 0)
  {
    const char title[] = "GNU Emacs at ";
     n = sizeof (title)-1;
     m = sizeof(title[0]);
  }
  else
  {
    const char title[] = "GNU Emacs";
     n = sizeof (title)-1;
     m = sizeof(title[0]);
  }

  nb = n/m;

  printf("%d\n",n);
  printf("%d\n",m);
  printf("%d\n",nb);

  return 0;
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]