Skip to content
Snippets Groups Projects
Commit 2d78daa7 authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

Add module support by osdd_abstract -- names and module creators BUGFIX

parent 6e8cbeb3
No related branches found
No related tags found
No related merge requests found
......@@ -212,7 +212,7 @@ void display_state_new_by_outputs_help(FILE * f)
static
void display_state_new_by_outputs(struct osd_set *set, int argc, char ** argv,Display *dpy,int names_len, char ** names)
{
static const char short_opts[] = "f:s:";
static const char short_opts[] = "f:s:n:";
static const struct option long_opts[] = {
{ "font", required_argument, NULL, 'f' },
{ "line-spacing", required_argument, NULL, 's' },
......@@ -221,7 +221,7 @@ static const struct option long_opts[] = {
};
fprintf(stderr,"NEW DISPLAY:\n");
for(int i=0;i<argc;i++) fprintf(stderr,"\t%s\n",argv[i]);
char * expanding_name = "display%d";
char * expanding_name = "";
char *font_name = "times-64:bold";
double line_spacing = 0.2;
int opt;
......@@ -237,6 +237,9 @@ static const struct option long_opts[] = {
case 's':
line_spacing = atof(optarg);
break;
case 'n':
expanding_name = optarg;
break;
default:
display_state_new_by_outputs_help(stderr);
exit(0);
......
......@@ -6,5 +6,5 @@ pkill -f not2osd
not2osd &
tmp=$(mktemp)
echo "Xft.render: False" > $tmp
XENVIRONMENT=$tmp ./osdd -D | bash
XENVIRONMENT=$tmp ./osdd -D DISPLAY_BY_OUTPUTS default d [ -n d%d ] | bash
......@@ -137,7 +137,7 @@ void osd_set_add(struct osd_set *set, struct osd_abstract abs, int names_len, ch
{
for(int i=0;i<names_len;i++)
{
printf("NAME |%s|\n",names[i]);
fprintf(stderr,"NAME |%s|\n",names[i]);
struct osd_set_trie *trie = osd_set_trie_find(&set->trie,names[i],1);
trie->vals = xrealloc(trie->vals,sizeof(trie->vals[0])*(trie->num_vals+1));
trie->vals[trie->num_vals++] = set->len;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment