]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - clvm_cmds.c
com: rename BSD strlcpy and strlcat
[xonotic/darkplaces.git] / clvm_cmds.c
index 29ade032f819644c920cbe4c736279a43859af09..c93d5584bcf0448f0b450f91f064967bf8481233 100644 (file)
@@ -618,7 +618,7 @@ static void VM_CL_lightstyle (prvm_prog_t *prog)
                VM_Warning(prog, "VM_CL_lightstyle >= MAX_LIGHTSTYLES\n");
                return;
        }
-       strlcpy (cl.lightstyle[i].map, c, sizeof (cl.lightstyle[i].map));
+       dp_strlcpy (cl.lightstyle[i].map, c, sizeof (cl.lightstyle[i].map));
        cl.lightstyle[i].map[MAX_STYLESTRING - 1] = 0;
        cl.lightstyle[i].length = (int)strlen(cl.lightstyle[i].map);
 }
@@ -1639,7 +1639,7 @@ void VM_loadfont(prvm_prog_t *prog)
                if (i >= 0 && i < dp_fonts.maxsize)
                {
                        f = &dp_fonts.f[i];
-                       strlcpy(f->title, fontname, sizeof(f->title)); // replace name
+                       dp_strlcpy(f->title, fontname, sizeof(f->title)); // replace name
                }
        }
        if (!f)
@@ -1664,7 +1664,7 @@ void VM_loadfont(prvm_prog_t *prog)
                c = cm;
        }
        if(!c || (c - filelist) >= MAX_QPATH)
-               strlcpy(mainfont, filelist, sizeof(mainfont));
+               dp_strlcpy(mainfont, filelist, sizeof(mainfont));
        else
        {
                memcpy(mainfont, filelist, c - filelist);
@@ -1691,7 +1691,7 @@ void VM_loadfont(prvm_prog_t *prog)
                }
                if(!c || (c-filelist) >= MAX_QPATH)
                {
-                       strlcpy(f->fallbacks[i], filelist, sizeof(mainfont));
+                       dp_strlcpy(f->fallbacks[i], filelist, sizeof(mainfont));
                }
                else
                {
@@ -2071,7 +2071,7 @@ static void VM_CL_getstats (prvm_prog_t *prog)
                VM_Warning(prog, "VM_CL_getstats: index>MAX_CL_STATS-4 or index<0\n");
                return;
        }
-       strlcpy(t, (char*)&cl.stats[i], sizeof(t));
+       dp_strlcpy(t, (char*)&cl.stats[i], sizeof(t));
        PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, t);
 }
 
@@ -2393,7 +2393,7 @@ static void VM_CL_getplayerkey (prvm_prog_t *prog)
        t[0] = 0;
 
        if(!strcasecmp(c, "name"))
-               strlcpy(t, cl.scores[i].name, sizeof(t));
+               dp_strlcpy(t, cl.scores[i].name, sizeof(t));
        else
                if(!strcasecmp(c, "frags"))
                        dpsnprintf(t, sizeof(t), "%i", cl.scores[i].frags);
@@ -4128,7 +4128,7 @@ static void VM_CL_R_PolygonBegin (prvm_prog_t *prog)
        prog->polygonbegin_model = mod;
        if (texname == NULL || texname[0] == 0)
                texname = "$whiteimage";
-       strlcpy(prog->polygonbegin_texname, texname, sizeof(prog->polygonbegin_texname));
+       dp_strlcpy(prog->polygonbegin_texname, texname, sizeof(prog->polygonbegin_texname));
        prog->polygonbegin_drawflags = drawflags;
        prog->polygonbegin_numvertices = 0;
 }