- * Copyright (c) 1999-2013,2017 Free Software Foundation, Inc. *
+ * Copyright 2019,2020 Thomas E. Dickey *
+ * Copyright 1999-2013,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
," -f use tigetnum rather than <term.h> mapping"
," -m SIZE set margin (default: 2)"
," -s MSECS delay 1% of the time (default: 1 msecs)"
," -f use tigetnum rather than <term.h> mapping"
," -m SIZE set margin (default: 2)"
," -s MSECS delay 1% of the time (default: 1 msecs)"
- putenv(strcat(strcpy(malloc(6 + strlen(optarg)), "TERM="), optarg));
+ need = 6 + strlen(optarg);
+ my_env = malloc(need);
+ _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg);
+ putenv(my_env);
- x = (int) (c * ranf()) + m_option;
- y = (int) (r * ranf()) + m_option;
- p = (ranf() > 0.9) ? '*' : ' ';
+ int x = (int) (c * ranf()) + m_option;
+ int y = (int) (r * ranf()) + m_option;
+ int p = (ranf() > 0.9) ? '*' : ' ';
tputs(tparm3(cursor_address, y, x), 1, outc);
if (my_colors > 0) {
tputs(tparm3(cursor_address, y, x), 1, outc);
if (my_colors > 0) {
if (ranf() > 0.01) {
tputs(tparm2(set_a_foreground, z), 1, outc);
} else {
if (ranf() > 0.01) {
tputs(tparm2(set_a_foreground, z), 1, outc);
} else {