libDXF 0.0.1
A library with DXF related functions written in C.

dimstyle.c

Go to the documentation of this file.
00001 
00042 #include "dimstyle.h"
00043 
00044 
00053 DxfDimStyle *
00054 dxf_dimstyle_new ()
00055 {
00056 #if DEBUG
00057         DXF_DEBUG_BEGIN
00058 #endif
00059         DxfDimStyle *dimstyle = NULL;
00060         size_t size;
00061 
00062         size = sizeof (DxfDimStyle);
00063         /* avoid malloc of 0 bytes */
00064         if (size == 0) size = 1;
00065         if ((dimstyle = malloc (size)) == NULL)
00066         {
00067                 fprintf (stderr,
00068                   (_("Error in %s () could not allocate memory for a DxfDimStyle struct.\n")),
00069                   __FUNCTION__);
00070                 dimstyle = NULL;
00071         }
00072         else
00073         {
00074                 memset (dimstyle, 0, size);
00075         }
00076 #if DEBUG
00077         DXF_DEBUG_END
00078 #endif
00079         return (dimstyle);
00080 }
00081 
00082 
00090 DxfDimStyle *
00091 dxf_dimstyle_init
00092 (
00093         DxfDimStyle *dimstyle
00096 )
00097 {
00098 #if DEBUG
00099         DXF_DEBUG_BEGIN
00100 #endif
00101         /* Do some basic checks. */
00102         if (dimstyle == NULL)
00103         {
00104                 fprintf (stderr,
00105                   (_("Warning in %s () a NULL pointer was passed.\n")),
00106                   __FUNCTION__);
00107                 dimstyle = dxf_dimstyle_new ();
00108         }
00109         if (dimstyle == NULL)
00110         {
00111               fprintf (stderr,
00112                 (_("Error in %s () could not allocate memory for a DxfDimStyle struct.\n")),
00113                 __FUNCTION__);
00114               return (NULL);
00115         }
00116         dxf_dimstyle_set_dimstyle_name (dimstyle, strdup (""));
00117         dxf_dimstyle_set_dimpost (dimstyle, strdup (""));
00118         dxf_dimstyle_set_dimapost (dimstyle, strdup (""));
00119         dxf_dimstyle_set_dimblk (dimstyle, strdup (""));
00120         dxf_dimstyle_set_dimblk1 (dimstyle, strdup (""));
00121         dxf_dimstyle_set_dimblk2 (dimstyle, strdup (""));
00122         dxf_dimstyle_set_dimscale (dimstyle, 0.0);
00123         dxf_dimstyle_set_dimasz (dimstyle, 0.0);
00124         dxf_dimstyle_set_dimexo (dimstyle, 0.0);
00125         dxf_dimstyle_set_dimdli (dimstyle, 0.0);
00126         dxf_dimstyle_set_dimexe (dimstyle, 0.0);
00127         dxf_dimstyle_set_dimrnd (dimstyle, 0.0);
00128         dxf_dimstyle_set_dimdle (dimstyle, 0.0);
00129         dxf_dimstyle_set_dimtp (dimstyle, 0.0);
00130         dxf_dimstyle_set_dimtm (dimstyle, 0.0);
00131         dxf_dimstyle_set_flag (dimstyle, 0);
00132         dxf_dimstyle_set_dimtol (dimstyle, 0);
00133         dxf_dimstyle_set_dimlim (dimstyle, 0);
00134         dxf_dimstyle_set_dimtih (dimstyle, 0);
00135         dxf_dimstyle_set_dimtoh (dimstyle, 0);
00136         dxf_dimstyle_set_dimse1 (dimstyle, 0);
00137         dxf_dimstyle_set_dimse2 (dimstyle, 0);
00138         dxf_dimstyle_set_dimtad (dimstyle, 0);
00139         dxf_dimstyle_set_dimzin (dimstyle, 0);
00140         dxf_dimstyle_set_dimtxt (dimstyle, 0.0);
00141         dxf_dimstyle_set_dimcen (dimstyle, 0.0);
00142         dxf_dimstyle_set_dimtsz (dimstyle, 0.0);
00143         dxf_dimstyle_set_dimaltf (dimstyle, 0.0);
00144         dxf_dimstyle_set_dimlfac (dimstyle, 0.0);
00145         dxf_dimstyle_set_dimtvp (dimstyle, 0.0);
00146         dxf_dimstyle_set_dimtfac (dimstyle, 0.0);
00147         dxf_dimstyle_set_dimgap (dimstyle, 0.0);
00148         dxf_dimstyle_set_dimalt (dimstyle, 0);
00149         dxf_dimstyle_set_dimaltd (dimstyle, 0);
00150         dxf_dimstyle_set_dimtofl (dimstyle, 0);
00151         dxf_dimstyle_set_dimsah (dimstyle, 0);
00152         dxf_dimstyle_set_dimtix (dimstyle, 0);
00153         dxf_dimstyle_set_dimsoxd (dimstyle, 0);
00154         dxf_dimstyle_set_dimclrd (dimstyle, DXF_COLOR_BYLAYER);
00155         dxf_dimstyle_set_dimclre (dimstyle, DXF_COLOR_BYLAYER);
00156         dxf_dimstyle_set_dimclrt (dimstyle, DXF_COLOR_BYLAYER);
00157         dxf_dimstyle_set_next (dimstyle, NULL);
00158 #if DEBUG
00159         DXF_DEBUG_END
00160 #endif
00161         return (dimstyle);
00162 }
00163 
00164 
00171 int
00172 dxf_dimstyle_write
00173 (
00174         DxfFile *fp,
00176         DxfDimStyle *dimstyle
00179 )
00180 {
00181 #if DEBUG
00182         DXF_DEBUG_BEGIN
00183 #endif
00184         char *dxf_entity_name = strdup ("DIMSTYLE");
00185 
00186         /* Do some basic checks. */
00187         if (fp == NULL)
00188         {
00189                 fprintf (stderr,
00190                   (_("Error in %s () a NULL file pointer was passed.\n")),
00191                   __FUNCTION__);
00192                 /* Clean up. */
00193                 free (dxf_entity_name);
00194                 return (EXIT_FAILURE);
00195         }
00196         if (dimstyle == NULL)
00197         {
00198                 fprintf (stderr,
00199                   (_("Error in %s () a NULL pointer was passed.\n")),
00200                   __FUNCTION__);
00201                 /* Clean up. */
00202                 free (dxf_entity_name);
00203                 return (EXIT_FAILURE);
00204         }
00205         if (strcmp (dxf_dimstyle_get_dimstyle_name (dimstyle), "") == 0)
00206         {
00207                 fprintf (stderr,
00208                   (_("Error in %s () dimstyle_name value is empty for the %s entity.\n")),
00209                   __FUNCTION__, dxf_entity_name);
00210                 fprintf (stderr,
00211                   (_("\tskipping %s table.\n")),
00212                   dxf_entity_name);
00213                 /* Clean up. */
00214                 free (dxf_entity_name);
00215                 return (EXIT_FAILURE);
00216         }
00217         if (!dxf_dimstyle_get_dimstyle_name (dimstyle))
00218         {
00219                 fprintf (stderr,
00220                   (_("Error in %s () dimstyle_name value is NULL for the %s entity.\n")),
00221                   __FUNCTION__, dxf_entity_name);
00222                 fprintf (stderr,
00223                   (_("\tskipping %s table.\n")),
00224                   dxf_entity_name);
00225                 /* Clean up. */
00226                 free (dxf_entity_name);
00227                 return (EXIT_FAILURE);
00228         }
00229         if (fp->acad_version_number < AutoCAD_13)
00230         {
00231                 fprintf (stderr,
00232                   (_("Warning in %s () illegal DXF version for this %s entity with id-code: %x.\n")),
00233                   __FUNCTION__, dxf_entity_name, dimstyle->id_code);
00234         }
00235         if (!dxf_dimstyle_get_dimpost (dimstyle))
00236         {
00237                 dxf_dimstyle_set_dimpost (dimstyle, strdup (""));
00238         }
00239         if (!dxf_dimstyle_get_dimapost (dimstyle))
00240         {
00241                 dxf_dimstyle_set_dimapost (dimstyle, strdup (""));
00242         }
00243         if (!dxf_dimstyle_get_dimblk (dimstyle))
00244         {
00245                 dxf_dimstyle_set_dimblk (dimstyle, strdup (""));
00246         }
00247         if (!dxf_dimstyle_get_dimblk1 (dimstyle))
00248         {
00249                 dxf_dimstyle_set_dimblk1 (dimstyle, strdup (""));
00250         }
00251         if (!dxf_dimstyle_get_dimblk2 (dimstyle))
00252         {
00253                 dxf_dimstyle_set_dimblk2 (dimstyle, strdup (""));
00254         }
00255         /* Start writing output. */
00256         fprintf (fp->fp, "  0\n%s\n", dxf_entity_name);
00257         if (dxf_dimstyle_get_id_code (dimstyle) != -1)
00258         {
00259                 fprintf (fp->fp, "105\n%x\n", dxf_dimstyle_get_id_code (dimstyle));
00260         }
00261         if (fp->acad_version_number >= AutoCAD_13)
00262         {
00263                 fprintf (fp->fp, "100\nAcDbSymbolTableRecord\n");
00264         }
00265         if (fp->acad_version_number >= AutoCAD_13)
00266         {
00267                 fprintf (fp->fp, "100\nAcDbDimStyleTableRecord\n");
00268         }
00269         fprintf (fp->fp, "  2\n%s\n", dxf_dimstyle_get_dimstyle_name (dimstyle));
00270         fprintf (fp->fp, " 70\n%d\n", dxf_dimstyle_get_flag (dimstyle));
00271         fprintf (fp->fp, "  3\n%s\n", dxf_dimstyle_get_dimpost (dimstyle));
00272         fprintf (fp->fp, "  4\n%s\n", dxf_dimstyle_get_dimapost (dimstyle));
00273         if (fp->acad_version_number < AutoCAD_2000)
00274         {
00275                 fprintf (fp->fp, "  5\n%s\n", dxf_dimstyle_get_dimblk (dimstyle));
00276         }
00277         if (fp->acad_version_number < AutoCAD_2000)
00278         {
00279                 fprintf (fp->fp, "  6\n%s\n", dxf_dimstyle_get_dimblk1 (dimstyle));
00280         }
00281         if (fp->acad_version_number < AutoCAD_2000)
00282         {
00283                 fprintf (fp->fp, "  7\n%s\n", dxf_dimstyle_get_dimblk2 (dimstyle));
00284         }
00285         fprintf (fp->fp, " 40\n%f\n", dxf_dimstyle_get_dimscale (dimstyle));
00286         fprintf (fp->fp, " 41\n%f\n", dxf_dimstyle_get_dimasz (dimstyle));
00287         fprintf (fp->fp, " 42\n%f\n", dxf_dimstyle_get_dimexo (dimstyle));
00288         fprintf (fp->fp, " 43\n%f\n", dxf_dimstyle_get_dimdli (dimstyle));
00289         fprintf (fp->fp, " 44\n%f\n", dxf_dimstyle_get_dimexe (dimstyle));
00290         fprintf (fp->fp, " 45\n%f\n", dxf_dimstyle_get_dimrnd (dimstyle));
00291         fprintf (fp->fp, " 46\n%f\n", dxf_dimstyle_get_dimdle (dimstyle));
00292         fprintf (fp->fp, " 47\n%f\n", dxf_dimstyle_get_dimtp (dimstyle));
00293         fprintf (fp->fp, " 48\n%f\n", dxf_dimstyle_get_dimtm (dimstyle));
00294         fprintf (fp->fp, "140\n%f\n", dxf_dimstyle_get_dimtxt (dimstyle));
00295         fprintf (fp->fp, "141\n%f\n", dxf_dimstyle_get_dimcen (dimstyle));
00296         fprintf (fp->fp, "142\n%f\n", dxf_dimstyle_get_dimtsz (dimstyle));
00297         fprintf (fp->fp, "143\n%f\n", dxf_dimstyle_get_dimaltf (dimstyle));
00298         fprintf (fp->fp, "144\n%f\n", dxf_dimstyle_get_dimlfac (dimstyle));
00299         fprintf (fp->fp, "145\n%f\n", dxf_dimstyle_get_dimtvp (dimstyle));
00300         fprintf (fp->fp, "146\n%f\n", dxf_dimstyle_get_dimtfac (dimstyle));
00301         fprintf (fp->fp, "147\n%f\n", dxf_dimstyle_get_dimgap (dimstyle));
00302         fprintf (fp->fp, " 71\n%d\n", dxf_dimstyle_get_dimtol (dimstyle));
00303         fprintf (fp->fp, " 72\n%d\n", dxf_dimstyle_get_dimlim (dimstyle));
00304         fprintf (fp->fp, " 73\n%d\n", dxf_dimstyle_get_dimtih (dimstyle));
00305         fprintf (fp->fp, " 74\n%d\n", dxf_dimstyle_get_dimtoh (dimstyle));
00306         fprintf (fp->fp, " 75\n%d\n", dxf_dimstyle_get_dimse1 (dimstyle));
00307         fprintf (fp->fp, " 76\n%d\n", dxf_dimstyle_get_dimse2 (dimstyle));
00308         fprintf (fp->fp, " 77\n%d\n", dxf_dimstyle_get_dimtad (dimstyle));
00309         fprintf (fp->fp, " 78\n%d\n", dxf_dimstyle_get_dimzin (dimstyle));
00310         fprintf (fp->fp, "170\n%d\n", dxf_dimstyle_get_dimalt (dimstyle));
00311         fprintf (fp->fp, "171\n%d\n", dxf_dimstyle_get_dimaltd (dimstyle));
00312         fprintf (fp->fp, "172\n%d\n", dxf_dimstyle_get_dimtofl (dimstyle));
00313         fprintf (fp->fp, "173\n%d\n", dxf_dimstyle_get_dimsah (dimstyle));
00314         fprintf (fp->fp, "174\n%d\n", dxf_dimstyle_get_dimtix (dimstyle));
00315         fprintf (fp->fp, "175\n%d\n", dxf_dimstyle_get_dimsoxd (dimstyle));
00316         fprintf (fp->fp, "176\n%d\n", dxf_dimstyle_get_dimclrd (dimstyle));
00317         fprintf (fp->fp, "177\n%d\n", dxf_dimstyle_get_dimclre (dimstyle));
00318         fprintf (fp->fp, "178\n%d\n", dxf_dimstyle_get_dimclrt (dimstyle));
00319         if ((fp->acad_version_number >= AutoCAD_13)
00320           && (fp->acad_version_number < AutoCAD_2000))
00321         {
00322                 fprintf (fp->fp, "270\n%d\n", dxf_dimstyle_get_dimunit (dimstyle));
00323                 fprintf (fp->fp, "271\n%d\n", dxf_dimstyle_get_dimdec (dimstyle));
00324                 fprintf (fp->fp, "272\n%d\n", dxf_dimstyle_get_dimtdec (dimstyle));
00325                 fprintf (fp->fp, "273\n%d\n", dxf_dimstyle_get_dimaltu (dimstyle));
00326                 fprintf (fp->fp, "274\n%d\n", dxf_dimstyle_get_dimalttd (dimstyle));
00327                 fprintf (fp->fp, "340\n%s\n", dxf_dimstyle_get_dimtxsty (dimstyle));
00328                 fprintf (fp->fp, "275\n%d\n", dxf_dimstyle_get_dimaunit (dimstyle));
00329                 fprintf (fp->fp, "280\n%d\n", dxf_dimstyle_get_dimjust (dimstyle));
00330                 fprintf (fp->fp, "281\n%d\n", dxf_dimstyle_get_dimsd1 (dimstyle));
00331                 fprintf (fp->fp, "282\n%d\n", dxf_dimstyle_get_dimsd2 (dimstyle));
00332                 fprintf (fp->fp, "283\n%d\n", dxf_dimstyle_get_dimtolj (dimstyle));
00333                 fprintf (fp->fp, "284\n%d\n", dxf_dimstyle_get_dimtzin (dimstyle));
00334                 fprintf (fp->fp, "285\n%d\n", dxf_dimstyle_get_dimaltz (dimstyle));
00335                 fprintf (fp->fp, "286\n%d\n", dxf_dimstyle_get_dimalttz (dimstyle));
00336                 fprintf (fp->fp, "287\n%d\n", dxf_dimstyle_get_dimfit (dimstyle));
00337                 fprintf (fp->fp, "288\n%d\n", dxf_dimstyle_get_dimupt (dimstyle));
00338                 fprintf (fp->fp, "  0\nENDTAB\n");
00339         }
00340         /* Clean up. */
00341         free (dxf_entity_name);
00342 #if DEBUG
00343         DXF_DEBUG_END
00344 #endif
00345         return (EXIT_SUCCESS);
00346 }
00347 
00348 
00359 DxfDimStyle *
00360 dxf_dimstyle_read
00361 (
00362         DxfFile *fp,
00364         DxfDimStyle *dimstyle
00367 )
00368 {
00369 #if DEBUG
00370         DXF_DEBUG_BEGIN
00371 #endif
00372         char *temp_string = NULL;
00373 
00374         /* Do some basic checks. */
00375         if (fp == NULL)
00376         {
00377                 fprintf (stderr,
00378                   (_("Error in %s () a NULL file pointer was passed.\n")),
00379                   __FUNCTION__);
00380                 /* Clean up. */
00381                 free (temp_string);
00382                 return (NULL);
00383         }
00384         if (dimstyle == NULL)
00385         {
00386                 fprintf (stderr,
00387                   (_("Warning in %s () a NULL pointer was passed.\n")),
00388                   __FUNCTION__);
00389                 dimstyle = dxf_dimstyle_new ();
00390                 dimstyle = dxf_dimstyle_init (dimstyle);
00391         }
00392         (fp->line_number)++;
00393         fscanf (fp->fp, "%[^\n]", temp_string);
00394         while (strcmp (temp_string, "0") != 0)
00395         {
00396                 if (ferror (fp->fp))
00397                 {
00398                         fprintf (stderr,
00399                           (_("Error in %s () while reading from: %s in line: %d.\n")),
00400                           __FUNCTION__, fp->filename, fp->line_number);
00401                         /* Clean up. */
00402                         free (temp_string);
00403                         fclose (fp->fp);
00404                         return (NULL);
00405                 }
00406                 if (strcmp (temp_string, "2") == 0)
00407                 {
00408                         /* Now follows a string containing a dimension
00409                          * style name. */
00410                         (fp->line_number)++;
00411                         fscanf (fp->fp, "%s\n", dimstyle->dimstyle_name);
00412                 }
00413                 else if (strcmp (temp_string, "3") == 0)
00414                 {
00415                         /* Now follows a string containing a general
00416                          * dimensioning suffix. */
00417                         (fp->line_number)++;
00418                         fscanf (fp->fp, "%s\n", dimstyle->dimpost);
00419                 }
00420                 else if (strcmp (temp_string, "4") == 0)
00421                 {
00422                         /* Now follows a string containing an alternate
00423                          * dimensioning suffix. */
00424                         (fp->line_number)++;
00425                         fscanf (fp->fp, "%s\n", dimstyle->dimapost);
00426                 }
00427                 else if ((fp->acad_version_number < AutoCAD_2000)
00428                         && (strcmp (temp_string, "5") == 0))
00429                 {
00430                         /* Now follows a string containing an arrow
00431                          * block name. */
00432                         (fp->line_number)++;
00433                         fscanf (fp->fp, "%s\n", dimstyle->dimblk);
00434                 }
00435                 else if ((fp->acad_version_number < AutoCAD_2000)
00436                         && (strcmp (temp_string, "6") == 0))
00437                 {
00438                         /* Now follows a string containing a first arrow
00439                          * block name. */
00440                         (fp->line_number)++;
00441                         fscanf (fp->fp, "%s\n", dimstyle->dimblk1);
00442                 }
00443 #if 0
00444 
00448                 else if ((fp->acad_version_number >= AutoCAD_2000)
00449                         && (strcmp (temp_string, "6") == 0))
00450                 {
00451                         /* Now follows a string containing a sequential
00452                          * id number. */
00453                         (fp->line_number)++;
00454                         fscanf (fp->fp, "%x\n", &dimstyle->id_code);
00455                 }
00456 #endif
00457                 else if ((fp->acad_version_number < AutoCAD_2000)
00458                         && (strcmp (temp_string, "7") == 0))
00459                 {
00460                         /* Now follows a string containing a first arrow
00461                          * block name. */
00462                         (fp->line_number)++;
00463                         fscanf (fp->fp, "%s\n", dimstyle->dimblk2);
00464                 }
00465 #if 0
00466 
00470                 else if ((fp->acad_version_number >= AutoCAD_2000)
00471                         && (strcmp (temp_string, "7") == 0))
00472                 {
00473                         /* Now follows a string containing a sequential
00474                          * id number. */
00475                         (fp->line_number)++;
00476                         fscanf (fp->fp, "%x\n", &dimstyle->id_code);
00477                 }
00478 #endif
00479                 else if (strcmp (temp_string, "40") == 0)
00480                 {
00481                         /* Now follows a string containing an overall
00482                          * dimensioning scale factor. */
00483                         (fp->line_number)++;
00484                         fscanf (fp->fp, "%lf\n", &dimstyle->dimscale);
00485                 }
00486                 else if (strcmp (temp_string, "41") == 0)
00487                 {
00488                         /* Now follows a string containing a
00489                          * dimensioning arrow size. */
00490                         (fp->line_number)++;
00491                         fscanf (fp->fp, "%lf\n", &dimstyle->dimasz);
00492                 }
00493                 else if (strcmp (temp_string, "42") == 0)
00494                 {
00495                         /* Now follows a string containing a
00496                          * extension line offset. */
00497                         (fp->line_number)++;
00498                         fscanf (fp->fp, "%lf\n", &dimstyle->dimexo);
00499                 }
00500                 else if (strcmp (temp_string, "43") == 0)
00501                 {
00502                         /* Now follows a string containing a
00503                          * dimension line increment. */
00504                         (fp->line_number)++;
00505                         fscanf (fp->fp, "%lf\n", &dimstyle->dimdli);
00506                 }
00507                 else if (strcmp (temp_string, "44") == 0)
00508                 {
00509                         /* Now follows a string containing a
00510                          * extension line extension. */
00511                         (fp->line_number)++;
00512                         fscanf (fp->fp, "%lf\n", &dimstyle->dimexe);
00513                 }
00514                 else if (strcmp (temp_string, "45") == 0)
00515                 {
00516                         /* Now follows a string containing a
00517                          * rounding value for dimension distances. */
00518                         (fp->line_number)++;
00519                         fscanf (fp->fp, "%lf\n", &dimstyle->dimrnd);
00520                 }
00521                 else if (strcmp (temp_string, "46") == 0)
00522                 {
00523                         /* Now follows a string containing a
00524                          * dimension line extension. */
00525                         (fp->line_number)++;
00526                         fscanf (fp->fp, "%lf\n", &dimstyle->dimdle);
00527                 }
00528                 else if (strcmp (temp_string, "47") == 0)
00529                 {
00530                         /* Now follows a string containing a
00531                          * plus tolerance. */
00532                         (fp->line_number)++;
00533                         fscanf (fp->fp, "%lf\n", &dimstyle->dimtp);
00534                 }
00535                 else if (strcmp (temp_string, "48") == 0)
00536                 {
00537                         /* Now follows a string containing a
00538                          * minus tolerance. */
00539                         (fp->line_number)++;
00540                         fscanf (fp->fp, "%lf\n", &dimstyle->dimtm);
00541                 }
00542                 else if (strcmp (temp_string, "70") == 0)
00543                 {
00544                         /* Now follows a string containing a flag. */
00545                         (fp->line_number)++;
00546                         fscanf (fp->fp, "%d\n", &dimstyle->flag);
00547                 }
00548                 else if (strcmp (temp_string, "71") == 0)
00549                 {
00550                         /* Now follows a string containing a dimension
00551                          * tolerances flag. */
00552                         (fp->line_number)++;
00553                         fscanf (fp->fp, "%d\n", &dimstyle->dimtol);
00554                 }
00555                 else if (strcmp (temp_string, "72") == 0)
00556                 {
00557                         /* Now follows a string containing a dimension
00558                          * limits flag. */
00559                         (fp->line_number)++;
00560                         fscanf (fp->fp, "%d\n", &dimstyle->dimlim);
00561                 }
00562                 else if (strcmp (temp_string, "73") == 0)
00563                 {
00564                         /* Now follows a string containing a dimension
00565                          * text inside horizontal flag. */
00566                         (fp->line_number)++;
00567                         fscanf (fp->fp, "%d\n", &dimstyle->dimtih);
00568                 }
00569                 else if (strcmp (temp_string, "74") == 0)
00570                 {
00571                         /* Now follows a string containing a dimension
00572                          * text outside horizontal flag. */
00573                         (fp->line_number)++;
00574                         fscanf (fp->fp, "%d\n", &dimstyle->dimtoh);
00575                 }
00576                 else if (strcmp (temp_string, "75") == 0)
00577                 {
00578                         /* Now follows a string containing a first
00579                          * extension line suppression flag. */
00580                         (fp->line_number)++;
00581                         fscanf (fp->fp, "%d\n", &dimstyle->dimse1);
00582                 }
00583                 else if (strcmp (temp_string, "76") == 0)
00584                 {
00585                         /* Now follows a string containing a second
00586                          * extension line suppression flag. */
00587                         (fp->line_number)++;
00588                         fscanf (fp->fp, "%d\n", &dimstyle->dimse2);
00589                 }
00590                 else if (strcmp (temp_string, "77") == 0)
00591                 {
00592                         /* Now follows a string containing a text above
00593                          * dimension line flag. */
00594                         (fp->line_number)++;
00595                         fscanf (fp->fp, "%d\n", &dimstyle->dimtad);
00596                 }
00597                 else if (strcmp (temp_string, "78") == 0)
00598                 {
00599                         /* Now follows a string containing a zero
00600                          * suppression for "feet & inch" dimensions
00601                          * flag. */
00602                         (fp->line_number)++;
00603                         fscanf (fp->fp, "%d\n", &dimstyle->dimzin);
00604                 }
00605                 else if ((fp->acad_version_number >= AutoCAD_13)
00606                         && (strcmp (temp_string, "100") == 0))
00607                 {
00608                         /* Now follows a string containing the
00609                          * subclass marker value. */
00610                         (fp->line_number)++;
00611                         fscanf (fp->fp, "%s\n", temp_string);
00612                         if ((strcmp (temp_string, "AcDbSymbolTableRecord") != 0)
00613                         && (strcmp (temp_string, "AcDbDimStyleTableRecord") != 0))
00614                         {
00615                                 fprintf (stderr,
00616                                   (_("Warning in %s () found a bad subclass marker in: %s in line: %d.\n")),
00617                                   __FUNCTION__, fp->filename, fp->line_number);
00618                         }
00619                 }
00620                 else if (strcmp (temp_string, "105") == 0)
00621                 {
00622                         /* Now follows a string containing a sequential
00623                          * id number. */
00624                         (fp->line_number)++;
00625                         fscanf (fp->fp, "%x\n", &dimstyle->id_code);
00626                 }
00627                 else if (strcmp (temp_string, "140") == 0)
00628                 {
00629                         /* Now follows a string containing a
00630                          * dimensioning text height. */
00631                         (fp->line_number)++;
00632                         fscanf (fp->fp, "%lf\n", &dimstyle->dimtxt);
00633                 }
00634                 else if (strcmp (temp_string, "141") == 0)
00635                 {
00636                         /* Now follows a string containing a size of
00637                          * center mark/lines. */
00638                         (fp->line_number)++;
00639                         fscanf (fp->fp, "%lf\n", &dimstyle->dimcen);
00640                 }
00641                 else if (strcmp (temp_string, "142") == 0)
00642                 {
00643                         /* Now follows a string containing a
00644                          * dimensioning tick size: 0 = no ticks. */
00645                         (fp->line_number)++;
00646                         fscanf (fp->fp, "%lf\n", &dimstyle->dimtsz);
00647                 }
00648                 else if (strcmp (temp_string, "143") == 0)
00649                 {
00650                         /* Now follows a string containing a
00651                          * alternate unit scale factor. */
00652                         (fp->line_number)++;
00653                         fscanf (fp->fp, "%lf\n", &dimstyle->dimaltf);
00654                 }
00655                 else if (strcmp (temp_string, "144") == 0)
00656                 {
00657                         /* Now follows a string containing a linear
00658                          * measurements scale factor. */
00659                         (fp->line_number)++;
00660                         fscanf (fp->fp, "%lf\n", &dimstyle->dimlfac);
00661                 }
00662                 else if (strcmp (temp_string, "145") == 0)
00663                 {
00664                         /* Now follows a string containing a text
00665                          * vertical position. */
00666                         (fp->line_number)++;
00667                         fscanf (fp->fp, "%lf\n", &dimstyle->dimtvp);
00668                 }
00669                 else if (strcmp (temp_string, "146") == 0)
00670                 {
00671                         /* Now follows a string containing a dimension
00672                          * tolerance display scale factor. */
00673                         (fp->line_number)++;
00674                         fscanf (fp->fp, "%lf\n", &dimstyle->dimtfac);
00675                 }
00676                 else if (strcmp (temp_string, "147") == 0)
00677                 {
00678                         /* Now follows a string containing a dimension
00679                          * line gap. */
00680                         (fp->line_number)++;
00681                         fscanf (fp->fp, "%lf\n", &dimstyle->dimgap);
00682                 }
00683                 else if (strcmp (temp_string, "170") == 0)
00684                 {
00685                         /* Now follows a string containing a alternate
00686                          * unit dimensioning flag. */
00687                         (fp->line_number)++;
00688                         fscanf (fp->fp, "%d\n", &dimstyle->dimalt);
00689                 }
00690                 else if (strcmp (temp_string, "171") == 0)
00691                 {
00692                         /* Now follows a string containing a alternate
00693                          * unit decimal places. */
00694                         (fp->line_number)++;
00695                         fscanf (fp->fp, "%d\n", &dimstyle->dimaltd);
00696                 }
00697                 else if (strcmp (temp_string, "172") == 0)
00698                 {
00699                         /* Now follows a string containing a text
00700                          * outside extensions, force line extensions
00701                          * between extensions flag. */
00702                         (fp->line_number)++;
00703                         fscanf (fp->fp, "%d\n", &dimstyle->dimtofl);
00704                 }
00705                 else if (strcmp (temp_string, "173") == 0)
00706                 {
00707                         /* Now follows a string containing a use
00708                          * separate arrow blocks flag. */
00709                         (fp->line_number)++;
00710                         fscanf (fp->fp, "%d\n", &dimstyle->dimsah);
00711                 }
00712                 else if (strcmp (temp_string, "174") == 0)
00713                 {
00714                         /* Now follows a string containing a force text
00715                          * inside extensions flag. */
00716                         (fp->line_number)++;
00717                         fscanf (fp->fp, "%d\n", &dimstyle->dimtix);
00718                 }
00719                 else if (strcmp (temp_string, "175") == 0)
00720                 {
00721                         /* Now follows a string containing a suppress
00722                          * outside-extensions dimension lines flag. */
00723                         (fp->line_number)++;
00724                         fscanf (fp->fp, "%d\n", &dimstyle->dimsoxd);
00725                 }
00726                 else if (strcmp (temp_string, "176") == 0)
00727                 {
00728                         /* Now follows a string containing a dimension
00729                          * line color value. */
00730                         (fp->line_number)++;
00731                         fscanf (fp->fp, "%d\n", &dimstyle->dimclrd);
00732                 }
00733                 else if (strcmp (temp_string, "177") == 0)
00734                 {
00735                         /* Now follows a string containing a dimension
00736                          * extension line color value. */
00737                         (fp->line_number)++;
00738                         fscanf (fp->fp, "%d\n", &dimstyle->dimclre);
00739                 }
00740                 else if (strcmp (temp_string, "178") == 0)
00741                 {
00742                         /* Now follows a string containing a dimension
00743                          * text color value. */
00744                         (fp->line_number)++;
00745                         fscanf (fp->fp, "%d\n", &dimstyle->dimclrt);
00746                 }
00747                 else if (strcmp (temp_string, "270") == 0)
00748                 {
00749                         /* Now follows a string containing a units
00750                          * format for all dimension style family members
00751                          * except angular. */
00752                         (fp->line_number)++;
00753                         fscanf (fp->fp, "%d\n", &dimstyle->dimunit);
00754                 }
00755                 else if (strcmp (temp_string, "271") == 0)
00756                 {
00757                         /* Now follows a string containing a number of
00758                          * decimal places for the tolerance values of
00759                          * a primary units dimension. */
00760                         (fp->line_number)++;
00761                         fscanf (fp->fp, "%d\n", &dimstyle->dimdec);
00762                 }
00763                 else if (strcmp (temp_string, "272") == 0)
00764                 {
00765                         /* Now follows a string containing a number of
00766                          * decimal places to display the tolerance
00767                          * values. */
00768                         (fp->line_number)++;
00769                         fscanf (fp->fp, "%d\n", &dimstyle->dimtdec);
00770                 }
00771                 else if (strcmp (temp_string, "273") == 0)
00772                 {
00773                         /* Now follows a string containing a units
00774                          * format for alternate units of all dimension
00775                          * style family members except angular. */
00776                         (fp->line_number)++;
00777                         fscanf (fp->fp, "%d\n", &dimstyle->dimaltu);
00778                 }
00779                 else if (strcmp (temp_string, "274") == 0)
00780                 {
00781                         /* Now follows a string containing a number of
00782                          * decimal places for tolerance values of an
00783                          * alternate units dimension. */
00784                         (fp->line_number)++;
00785                         fscanf (fp->fp, "%d\n", &dimstyle->dimalttd);
00786                 }
00787                 else if (strcmp (temp_string, "275") == 0)
00788                 {
00789                         /* Now follows a string containing an angle
00790                          * format for angular dimensions. */
00791                         (fp->line_number)++;
00792                         fscanf (fp->fp, "%d\n", &dimstyle->dimaunit);
00793                 }
00794                 else if (strcmp (temp_string, "280") == 0)
00795                 {
00796                         /* Now follows a string containing a horizontal
00797                          * dimension text position. */
00798                         (fp->line_number)++;
00799                         fscanf (fp->fp, "%d\n", &dimstyle->dimjust);
00800                 }
00801                 else if (strcmp (temp_string, "281") == 0)
00802                 {
00803                         /* Now follows a string containing suppression
00804                          * of first extension line. */
00805                         (fp->line_number)++;
00806                         fscanf (fp->fp, "%d\n", &dimstyle->dimsd1);
00807                 }
00808                 else if (strcmp (temp_string, "282") == 0)
00809                 {
00810                         /* Now follows a string containing suppression
00811                          * of second extension line. */
00812                         (fp->line_number)++;
00813                         fscanf (fp->fp, "%d\n", &dimstyle->dimsd2);
00814                 }
00815                 else if (strcmp (temp_string, "283") == 0)
00816                 {
00817                         /* Now follows a string containing vertical
00818                          * justification for tolerance values. */
00819                         (fp->line_number)++;
00820                         fscanf (fp->fp, "%d\n", &dimstyle->dimtolj);
00821                 }
00822                 else if (strcmp (temp_string, "284") == 0)
00823                 {
00824                         /* Now follows a string containing suppression
00825                          * of zeros for tolerance values. */
00826                         (fp->line_number)++;
00827                         fscanf (fp->fp, "%d\n", &dimstyle->dimtzin);
00828                 }
00829                 else if (strcmp (temp_string, "285") == 0)
00830                 {
00831                         /* Now follows a string containing toggles
00832                          * suppression of zeros for alternate unit
00833                          * dimension values. */
00834                         (fp->line_number)++;
00835                         fscanf (fp->fp, "%d\n", &dimstyle->dimaltz);
00836                 }
00837                 else if (strcmp (temp_string, "286") == 0)
00838                 {
00839                         /* Now follows a string containing toggles
00840                          * suppression of zeros for tolerance values. */
00841                         (fp->line_number)++;
00842                         fscanf (fp->fp, "%d\n", &dimstyle->dimalttz);
00843                 }
00844                 else if (strcmp (temp_string, "287") == 0)
00845                 {
00846                         /* Now follows a string containing placement of
00847                          * text and arrowheads. */
00848                         (fp->line_number)++;
00849                         fscanf (fp->fp, "%d\n", &dimstyle->dimfit);
00850                 }
00851                 else if (strcmp (temp_string, "288") == 0)
00852                 {
00853                         /* Now follows a string containing cursor
00854                          * functionality for user positioned text. */
00855                         (fp->line_number)++;
00856                         fscanf (fp->fp, "%d\n", &dimstyle->dimupt);
00857                 }
00858                 else if (strcmp (temp_string, "340") == 0)
00859                 {
00860                         /* Now follows a string containing dimension
00861                          * text style. */
00862                         (fp->line_number)++;
00863                         fscanf (fp->fp, "%s\n", dimstyle->dimtxsty);
00864                 }
00865         }
00866         /* Handle omitted members and/or illegal values. */
00867         if (strcmp (dxf_dimstyle_get_dimstyle_name (dimstyle), "") == 0)
00868         {
00869                 fprintf (stderr,
00870                   (_("Error in %s () dimstyle_name value is empty.\n")),
00871                   __FUNCTION__);
00872                 /* Clean up. */
00873                 free (temp_string);
00874                 return (NULL);
00875         }
00876         /* Clean up. */
00877         free (temp_string);
00878 #if DEBUG
00879         DXF_DEBUG_END
00880 #endif
00881         return (dimstyle);
00882 }
00883 
00884 
00892 int
00893 dxf_dimstyle_free
00894 (
00895         DxfDimStyle *dimstyle
00898 )
00899 {
00900 #if DEBUG
00901         DXF_DEBUG_BEGIN
00902 #endif
00903         /* Do some basic checks. */
00904         if (dimstyle == NULL)
00905         {
00906                 fprintf (stderr,
00907                   (_("Error in %s () a NULL pointer was passed.\n")),
00908                   __FUNCTION__);
00909                 return (EXIT_FAILURE);
00910         }
00911         if (dimstyle->next != NULL)
00912         {
00913               fprintf (stderr,
00914                 (_("Error in %s () pointer to next was not NULL.\n")),
00915                 __FUNCTION__);
00916               return (EXIT_FAILURE);
00917         }
00918         free (dxf_dimstyle_get_dimstyle_name (dimstyle));
00919         free (dxf_dimstyle_get_dimpost (dimstyle));
00920         free (dxf_dimstyle_get_dimapost (dimstyle));
00921         free (dxf_dimstyle_get_dimblk (dimstyle));
00922         free (dxf_dimstyle_get_dimblk1 (dimstyle));
00923         free (dxf_dimstyle_get_dimblk2 (dimstyle));
00924         free (dimstyle);
00925         dimstyle = NULL;
00926 #if DEBUG
00927         DXF_DEBUG_END
00928 #endif
00929         return (EXIT_SUCCESS);
00930 }
00931 
00932 
00937 void
00938 dxf_dimstyle_free_chain
00939 (
00940         DxfDimStyle *dimstyles
00943 )
00944 {
00945 #ifdef DEBUG
00946         DXF_DEBUG_BEGIN
00947 #endif
00948         if (dimstyles == NULL)
00949         {
00950                 fprintf (stderr,
00951                   (_("Warning in %s () a NULL pointer was passed.\n")),
00952                   __FUNCTION__);
00953         }
00954         while (dimstyles != NULL)
00955         {
00956                 struct DxfDimStyle *iter = dimstyles->next;
00957                 dxf_dimstyle_free (dimstyles);
00958                 dimstyles = (DxfDimStyle *) iter;
00959         }
00960 #if DEBUG
00961         DXF_DEBUG_END
00962 #endif
00963 }
00964 
00965 
00972 char *
00973 dxf_dimstyle_get_dimstyle_name
00974 (
00975         DxfDimStyle *dimstyle
00978 )
00979 {
00980 #if DEBUG
00981         DXF_DEBUG_BEGIN
00982 #endif
00983         /* Do some basic checks. */
00984         if (dimstyle == NULL)
00985         {
00986                 fprintf (stderr,
00987                   (_("Error in %s () a NULL pointer was passed.\n")),
00988                   __FUNCTION__);
00989                 return (NULL);
00990         }
00991 #if DEBUG
00992         DXF_DEBUG_END
00993 #endif
00994         return (strdup (dimstyle->dimstyle_name));
00995 }
00996 
00997 
01011 DxfDimStyle *
01012 dxf_dimstyle_set_dimstyle_name
01013 (
01014         DxfDimStyle *dimstyle,
01017         char *dimstyle_name
01020 )
01021 {
01022 #if DEBUG
01023         DXF_DEBUG_BEGIN
01024 #endif
01025         /* Do some basic checks. */
01026         if (dimstyle == NULL)
01027         {
01028                 fprintf (stderr,
01029                   (_("Error in %s () a NULL pointer was passed.\n")),
01030                   __FUNCTION__);
01031                 return (NULL);
01032         }
01033         if (dimstyle_name == NULL)
01034         {
01035                 fprintf (stderr,
01036                   (_("Warning in %s () the string name contained a NULL pointer.\n")),
01037                   __FUNCTION__);
01038                 return (NULL);
01039         }
01040         dimstyle->dimstyle_name = strdup (dimstyle_name);
01041 #if DEBUG
01042         DXF_DEBUG_END
01043 #endif
01044         return (dimstyle);
01045 }
01046 
01047 
01054 char *
01055 dxf_dimstyle_get_dimpost
01056 (
01057         DxfDimStyle *dimstyle
01060 )
01061 {
01062 #if DEBUG
01063         DXF_DEBUG_BEGIN
01064 #endif
01065         /* Do some basic checks. */
01066         if (dimstyle == NULL)
01067         {
01068                 fprintf (stderr,
01069                   (_("Error in %s () a NULL pointer was passed.\n")),
01070                   __FUNCTION__);
01071                 return (NULL);
01072         }
01073 #if DEBUG
01074         DXF_DEBUG_END
01075 #endif
01076         return (strdup (dimstyle->dimpost));
01077 }
01078 
01079 
01093 DxfDimStyle *
01094 dxf_dimstyle_set_dimpost
01095 (
01096         DxfDimStyle *dimstyle,
01099         char *dimpost
01102 )
01103 {
01104 #if DEBUG
01105         DXF_DEBUG_BEGIN
01106 #endif
01107         /* Do some basic checks. */
01108         if (dimstyle == NULL)
01109         {
01110                 fprintf (stderr,
01111                   (_("Error in %s () a NULL pointer was passed.\n")),
01112                   __FUNCTION__);
01113                 return (NULL);
01114         }
01115         if (dimpost == NULL)
01116         {
01117                 fprintf (stderr,
01118                   (_("Warning in %s () the string name contained a NULL pointer.\n")),
01119                   __FUNCTION__);
01120                 return (NULL);
01121         }
01122         dimstyle->dimpost = strdup (dimpost);
01123 #if DEBUG
01124         DXF_DEBUG_END
01125 #endif
01126         return (dimstyle);
01127 }
01128 
01129 
01136 char *
01137 dxf_dimstyle_get_dimapost
01138 (
01139         DxfDimStyle *dimstyle
01142 )
01143 {
01144 #if DEBUG
01145         DXF_DEBUG_BEGIN
01146 #endif
01147         /* Do some basic checks. */
01148         if (dimstyle == NULL)
01149         {
01150                 fprintf (stderr,
01151                   (_("Error in %s () a NULL pointer was passed.\n")),
01152                   __FUNCTION__);
01153                 return (NULL);
01154         }
01155 #if DEBUG
01156         DXF_DEBUG_END
01157 #endif
01158         return (strdup (dimstyle->dimapost));
01159 }
01160 
01161 
01175 DxfDimStyle *
01176 dxf_dimstyle_set_dimapost
01177 (
01178         DxfDimStyle *dimstyle,
01181         char *dimapost
01184 )
01185 {
01186 #if DEBUG
01187         DXF_DEBUG_BEGIN
01188 #endif
01189         /* Do some basic checks. */
01190         if (dimstyle == NULL)
01191         {
01192                 fprintf (stderr,
01193                   (_("Error in %s () a NULL pointer was passed.\n")),
01194                   __FUNCTION__);
01195                 return (NULL);
01196         }
01197         if (dimapost == NULL)
01198         {
01199                 fprintf (stderr,
01200                   (_("Warning in %s () the string name contained a NULL pointer.\n")),
01201                   __FUNCTION__);
01202                 return (NULL);
01203         }
01204         dimstyle->dimapost = strdup (dimapost);
01205 #if DEBUG
01206         DXF_DEBUG_END
01207 #endif
01208         return (dimstyle);
01209 }
01210 
01211 
01218 char *
01219 dxf_dimstyle_get_dimblk
01220 (
01221         DxfDimStyle *dimstyle
01224 )
01225 {
01226 #if DEBUG
01227         DXF_DEBUG_BEGIN
01228 #endif
01229         /* Do some basic checks. */
01230         if (dimstyle == NULL)
01231         {
01232                 fprintf (stderr,
01233                   (_("Error in %s () a NULL pointer was passed.\n")),
01234                   __FUNCTION__);
01235                 return (NULL);
01236         }
01237 #if DEBUG
01238         DXF_DEBUG_END
01239 #endif
01240         return (strdup (dimstyle->dimblk));
01241 }
01242 
01243 
01257 DxfDimStyle *
01258 dxf_dimstyle_set_dimblk
01259 (
01260         DxfDimStyle *dimstyle,
01263         char *dimblk
01265 )
01266 {
01267 #if DEBUG
01268         DXF_DEBUG_BEGIN
01269 #endif
01270         /* Do some basic checks. */
01271         if (dimstyle == NULL)
01272         {
01273                 fprintf (stderr,
01274                   (_("Error in %s () a NULL pointer was passed.\n")),
01275                   __FUNCTION__);
01276                 return (NULL);
01277         }
01278         if (dimblk == NULL)
01279         {
01280                 fprintf (stderr,
01281                   (_("Warning in %s () the string contained a NULL pointer.\n")),
01282                   __FUNCTION__);
01283                 return (NULL);
01284         }
01285         dimstyle->dimblk = strdup (dimblk);
01286 #if DEBUG
01287         DXF_DEBUG_END
01288 #endif
01289         return (dimstyle);
01290 }
01291 
01292 
01299 char *
01300 dxf_dimstyle_get_dimblk1
01301 (
01302         DxfDimStyle *dimstyle
01305 )
01306 {
01307 #if DEBUG
01308         DXF_DEBUG_BEGIN
01309 #endif
01310         /* Do some basic checks. */
01311         if (dimstyle == NULL)
01312         {
01313                 fprintf (stderr,
01314                   (_("Error in %s () a NULL pointer was passed.\n")),
01315                   __FUNCTION__);
01316                 return (NULL);
01317         }
01318 #if DEBUG
01319         DXF_DEBUG_END
01320 #endif
01321         return (strdup (dimstyle->dimblk1));
01322 }
01323 
01324 
01338 DxfDimStyle *
01339 dxf_dimstyle_set_dimblk1
01340 (
01341         DxfDimStyle *dimstyle,
01344         char *dimblk1
01347 )
01348 {
01349 #if DEBUG
01350         DXF_DEBUG_BEGIN
01351 #endif
01352         /* Do some basic checks. */
01353         if (dimstyle == NULL)
01354         {
01355                 fprintf (stderr,
01356                   (_("Error in %s () a NULL pointer was passed.\n")),
01357                   __FUNCTION__);
01358                 return (NULL);
01359         }
01360         if (dimblk1 == NULL)
01361         {
01362                 fprintf (stderr,
01363                   (_("Warning in %s () the string contained a NULL pointer.\n")),
01364                   __FUNCTION__);
01365                 return (NULL);
01366         }
01367         dimstyle->dimblk1 = strdup (dimblk1);
01368 #if DEBUG
01369         DXF_DEBUG_END
01370 #endif
01371         return (dimstyle);
01372 }
01373 
01374 
01381 char *
01382 dxf_dimstyle_get_dimblk2
01383 (
01384         DxfDimStyle *dimstyle
01387 )
01388 {
01389 #if DEBUG
01390         DXF_DEBUG_BEGIN
01391 #endif
01392         /* Do some basic checks. */
01393         if (dimstyle == NULL)
01394         {
01395                 fprintf (stderr,
01396                   (_("Error in %s () a NULL pointer was passed.\n")),
01397                   __FUNCTION__);
01398                 return (NULL);
01399         }
01400 #if DEBUG
01401         DXF_DEBUG_END
01402 #endif
01403         return (strdup (dimstyle->dimblk2));
01404 }
01405 
01406 
01420 DxfDimStyle *
01421 dxf_dimstyle_set_dimblk2
01422 (
01423         DxfDimStyle *dimstyle,
01426         char *dimblk2
01429 )
01430 {
01431 #if DEBUG
01432         DXF_DEBUG_BEGIN
01433 #endif
01434         /* Do some basic checks. */
01435         if (dimstyle == NULL)
01436         {
01437                 fprintf (stderr,
01438                   (_("Error in %s () a NULL pointer was passed.\n")),
01439                   __FUNCTION__);
01440                 return (NULL);
01441         }
01442         if (dimblk2 == NULL)
01443         {
01444                 fprintf (stderr,
01445                   (_("Warning in %s () the string contained a NULL pointer.\n")),
01446                   __FUNCTION__);
01447                 return (NULL);
01448         }
01449         dimstyle->dimblk2 = strdup (dimblk2);
01450 #if DEBUG
01451         DXF_DEBUG_END
01452 #endif
01453         return (dimstyle);
01454 }
01455 
01456 
01463 double
01464 dxf_dimstyle_get_dimscale
01465 (
01466         DxfDimStyle *dimstyle
01469 )
01470 {
01471 #if DEBUG
01472         DXF_DEBUG_BEGIN
01473 #endif
01474         /* Do some basic checks. */
01475         if (dimstyle == NULL)
01476         {
01477                 fprintf (stderr,
01478                   (_("Error in %s () a NULL pointer was passed.\n")),
01479                   __FUNCTION__);
01480                 return (EXIT_FAILURE);
01481         }
01482         if (dimstyle->dimscale == 0.0)
01483         {
01484                 fprintf (stderr,
01485                   (_("Error in %s () a value of zero was found in the dimscale member.\n")),
01486                   __FUNCTION__);
01487                 return (EXIT_FAILURE);
01488         }
01489 #if DEBUG
01490         DXF_DEBUG_END
01491 #endif
01492         return (dimstyle->dimscale);
01493 }
01494 
01495 
01500 DxfDimStyle *
01501 dxf_dimstyle_set_dimscale
01502 (
01503         DxfDimStyle *dimstyle,
01506         double dimscale
01509 )
01510 {
01511 #if DEBUG
01512         DXF_DEBUG_BEGIN
01513 #endif
01514         /* Do some basic checks. */
01515         if (dimstyle == NULL)
01516         {
01517                 fprintf (stderr,
01518                   (_("Error in %s () a NULL pointer was passed.\n")),
01519                   __FUNCTION__);
01520                 return (NULL);
01521         }
01522         if (dimscale == 0.0)
01523         {
01524                 fprintf (stderr,
01525                   (_("Error in %s () a value of zero was passed.\n")),
01526                   __FUNCTION__);
01527                 return (NULL);
01528         }
01529         dimstyle->dimscale = dimscale;
01530 #if DEBUG
01531         DXF_DEBUG_END
01532 #endif
01533         return (dimstyle);
01534 }
01535 
01536 
01543 double
01544 dxf_dimstyle_get_dimasz
01545 (
01546         DxfDimStyle *dimstyle
01549 )
01550 {
01551 #if DEBUG
01552         DXF_DEBUG_BEGIN
01553 #endif
01554         /* Do some basic checks. */
01555         if (dimstyle == NULL)
01556         {
01557                 fprintf (stderr,
01558                   (_("Error in %s () a NULL pointer was passed.\n")),
01559                   __FUNCTION__);
01560                 return (EXIT_FAILURE);
01561         }
01562         if (dimstyle->dimasz == 0.0)
01563         {
01564                 fprintf (stderr,
01565                   (_("Error in %s () a value of zero was found in the dimasz member.\n")),
01566                   __FUNCTION__);
01567                 return (EXIT_FAILURE);
01568         }
01569 #if DEBUG
01570         DXF_DEBUG_END
01571 #endif
01572         return (dimstyle->dimasz);
01573 }
01574 
01575 
01580 DxfDimStyle *
01581 dxf_dimstyle_set_dimasz
01582 (
01583         DxfDimStyle *dimstyle,
01586         double dimasz
01589 )
01590 {
01591 #if DEBUG
01592         DXF_DEBUG_BEGIN
01593 #endif
01594         /* Do some basic checks. */
01595         if (dimstyle == NULL)
01596         {
01597                 fprintf (stderr,
01598                   (_("Error in %s () a NULL pointer was passed.\n")),
01599                   __FUNCTION__);
01600                 return (NULL);
01601         }
01602         if (dimasz == 0.0)
01603         {
01604                 fprintf (stderr,
01605                   (_("Error in %s () a value of zero was passed.\n")),
01606                   __FUNCTION__);
01607                 return (NULL);
01608         }
01609         dimstyle->dimasz = dimasz;
01610 #if DEBUG
01611         DXF_DEBUG_END
01612 #endif
01613         return (dimstyle);
01614 }
01615 
01616 
01623 double
01624 dxf_dimstyle_get_dimexo
01625 (
01626         DxfDimStyle *dimstyle
01629 )
01630 {
01631 #if DEBUG
01632         DXF_DEBUG_BEGIN
01633 #endif
01634         /* Do some basic checks. */
01635         if (dimstyle == NULL)
01636         {
01637                 fprintf (stderr,
01638                   (_("Error in %s () a NULL pointer was passed.\n")),
01639                   __FUNCTION__);
01640                 return (EXIT_FAILURE);
01641         }
01642 #if DEBUG
01643         DXF_DEBUG_END
01644 #endif
01645         return (dimstyle->dimexo);
01646 }
01647 
01648 
01653 DxfDimStyle *
01654 dxf_dimstyle_set_dimexo
01655 (
01656         DxfDimStyle *dimstyle,
01659         double dimexo
01662 )
01663 {
01664 #if DEBUG
01665         DXF_DEBUG_BEGIN
01666 #endif
01667         /* Do some basic checks. */
01668         if (dimstyle == NULL)
01669         {
01670                 fprintf (stderr,
01671                   (_("Error in %s () a NULL pointer was passed.\n")),
01672                   __FUNCTION__);
01673                 return (NULL);
01674         }
01675         dimstyle->dimexo = dimexo;
01676 #if DEBUG
01677         DXF_DEBUG_END
01678 #endif
01679         return (dimstyle);
01680 }
01681 
01682 
01689 double
01690 dxf_dimstyle_get_dimdli
01691 (
01692         DxfDimStyle *dimstyle
01695 )
01696 {
01697 #if DEBUG
01698         DXF_DEBUG_BEGIN
01699 #endif
01700         /* Do some basic checks. */
01701         if (dimstyle == NULL)
01702         {
01703                 fprintf (stderr,
01704                   (_("Error in %s () a NULL pointer was passed.\n")),
01705                   __FUNCTION__);
01706                 return (EXIT_FAILURE);
01707         }
01708 #if DEBUG
01709         DXF_DEBUG_END
01710 #endif
01711         return (dimstyle->dimdli);
01712 }
01713 
01714 
01719 DxfDimStyle *
01720 dxf_dimstyle_set_dimdli
01721 (
01722         DxfDimStyle *dimstyle,
01725         double dimdli
01728 )
01729 {
01730 #if DEBUG
01731         DXF_DEBUG_BEGIN
01732 #endif
01733         /* Do some basic checks. */
01734         if (dimstyle == NULL)
01735         {
01736                 fprintf (stderr,
01737                   (_("Error in %s () a NULL pointer was passed.\n")),
01738                   __FUNCTION__);
01739                 return (NULL);
01740         }
01741         dimstyle->dimdli = dimdli;
01742 #if DEBUG
01743         DXF_DEBUG_END
01744 #endif
01745         return (dimstyle);
01746 }
01747 
01748 
01755 double
01756 dxf_dimstyle_get_dimexe
01757 (
01758         DxfDimStyle *dimstyle
01761 )
01762 {
01763 #if DEBUG
01764         DXF_DEBUG_BEGIN
01765 #endif
01766         /* Do some basic checks. */
01767         if (dimstyle == NULL)
01768         {
01769                 fprintf (stderr,
01770                   (_("Error in %s () a NULL pointer was passed.\n")),
01771                   __FUNCTION__);
01772                 return (EXIT_FAILURE);
01773         }
01774 #if DEBUG
01775         DXF_DEBUG_END
01776 #endif
01777         return (dimstyle->dimexe);
01778 }
01779 
01780 
01785 DxfDimStyle *
01786 dxf_dimstyle_set_dimexe
01787 (
01788         DxfDimStyle *dimstyle,
01791         double dimexe
01794 )
01795 {
01796 #if DEBUG
01797         DXF_DEBUG_BEGIN
01798 #endif
01799         /* Do some basic checks. */
01800         if (dimstyle == NULL)
01801         {
01802                 fprintf (stderr,
01803                   (_("Error in %s () a NULL pointer was passed.\n")),
01804                   __FUNCTION__);
01805                 return (NULL);
01806         }
01807         dimstyle->dimexe = dimexe;
01808 #if DEBUG
01809         DXF_DEBUG_END
01810 #endif
01811         return (dimstyle);
01812 }
01813 
01814 
01821 double
01822 dxf_dimstyle_get_dimrnd
01823 (
01824         DxfDimStyle *dimstyle
01827 )
01828 {
01829 #if DEBUG
01830         DXF_DEBUG_BEGIN
01831 #endif
01832         /* Do some basic checks. */
01833         if (dimstyle == NULL)
01834         {
01835                 fprintf (stderr,
01836                   (_("Error in %s () a NULL pointer was passed.\n")),
01837                   __FUNCTION__);
01838                 return (EXIT_FAILURE);
01839         }
01840 #if DEBUG
01841         DXF_DEBUG_END
01842 #endif
01843         return (dimstyle->dimrnd);
01844 }
01845 
01846 
01851 DxfDimStyle *
01852 dxf_dimstyle_set_dimrnd
01853 (
01854         DxfDimStyle *dimstyle,
01857         double dimrnd
01860 )
01861 {
01862 #if DEBUG
01863         DXF_DEBUG_BEGIN
01864 #endif
01865         /* Do some basic checks. */
01866         if (dimstyle == NULL)
01867         {
01868                 fprintf (stderr,
01869                   (_("Error in %s () a NULL pointer was passed.\n")),
01870                   __FUNCTION__);
01871                 return (NULL);
01872         }
01873         dimstyle->dimrnd = dimrnd;
01874 #if DEBUG
01875         DXF_DEBUG_END
01876 #endif
01877         return (dimstyle);
01878 }
01879 
01880 
01887 double
01888 dxf_dimstyle_get_dimdle
01889 (
01890         DxfDimStyle *dimstyle
01893 )
01894 {
01895 #if DEBUG
01896         DXF_DEBUG_BEGIN
01897 #endif
01898         /* Do some basic checks. */
01899         if (dimstyle == NULL)
01900         {
01901                 fprintf (stderr,
01902                   (_("Error in %s () a NULL pointer was passed.\n")),
01903                   __FUNCTION__);
01904                 return (EXIT_FAILURE);
01905         }
01906 #if DEBUG
01907         DXF_DEBUG_END
01908 #endif
01909         return (dimstyle->dimdle);
01910 }
01911 
01912 
01917 DxfDimStyle *
01918 dxf_dimstyle_set_dimdle
01919 (
01920         DxfDimStyle *dimstyle,
01923         double dimdle
01926 )
01927 {
01928 #if DEBUG
01929         DXF_DEBUG_BEGIN
01930 #endif
01931         /* Do some basic checks. */
01932         if (dimstyle == NULL)
01933         {
01934                 fprintf (stderr,
01935                   (_("Error in %s () a NULL pointer was passed.\n")),
01936                   __FUNCTION__);
01937                 return (NULL);
01938         }
01939         dimstyle->dimdle = dimdle;
01940 #if DEBUG
01941         DXF_DEBUG_END
01942 #endif
01943         return (dimstyle);
01944 }
01945 
01946 
01953 double
01954 dxf_dimstyle_get_dimtp
01955 (
01956         DxfDimStyle *dimstyle
01959 )
01960 {
01961 #if DEBUG
01962         DXF_DEBUG_BEGIN
01963 #endif
01964         /* Do some basic checks. */
01965         if (dimstyle == NULL)
01966         {
01967                 fprintf (stderr,
01968                   (_("Error in %s () a NULL pointer was passed.\n")),
01969                   __FUNCTION__);
01970                 return (EXIT_FAILURE);
01971         }
01972 #if DEBUG
01973         DXF_DEBUG_END
01974 #endif
01975         return (dimstyle->dimtp);
01976 }
01977 
01978 
01983 DxfDimStyle *
01984 dxf_dimstyle_set_dimtp
01985 (
01986         DxfDimStyle *dimstyle,
01989         double dimtp
01992 )
01993 {
01994 #if DEBUG
01995         DXF_DEBUG_BEGIN
01996 #endif
01997         /* Do some basic checks. */
01998         if (dimstyle == NULL)
01999         {
02000                 fprintf (stderr,
02001                   (_("Error in %s () a NULL pointer was passed.\n")),
02002                   __FUNCTION__);
02003                 return (NULL);
02004         }
02005         dimstyle->dimtp = dimtp;
02006 #if DEBUG
02007         DXF_DEBUG_END
02008 #endif
02009         return (dimstyle);
02010 }
02011 
02012 
02019 double
02020 dxf_dimstyle_get_dimtm
02021 (
02022         DxfDimStyle *dimstyle
02025 )
02026 {
02027 #if DEBUG
02028         DXF_DEBUG_BEGIN
02029 #endif
02030         /* Do some basic checks. */
02031         if (dimstyle == NULL)
02032         {
02033                 fprintf (stderr,
02034                   (_("Error in %s () a NULL pointer was passed.\n")),
02035                   __FUNCTION__);
02036                 return (EXIT_FAILURE);
02037         }
02038 #if DEBUG
02039         DXF_DEBUG_END
02040 #endif
02041         return (dimstyle->dimtm);
02042 }
02043 
02044 
02049 DxfDimStyle *
02050 dxf_dimstyle_set_dimtm
02051 (
02052         DxfDimStyle *dimstyle,
02055         double dimtm
02058 )
02059 {
02060 #if DEBUG
02061         DXF_DEBUG_BEGIN
02062 #endif
02063         /* Do some basic checks. */
02064         if (dimstyle == NULL)
02065         {
02066                 fprintf (stderr,
02067                   (_("Error in %s () a NULL pointer was passed.\n")),
02068                   __FUNCTION__);
02069                 return (NULL);
02070         }
02071         dimstyle->dimtm = dimtm;
02072 #if DEBUG
02073         DXF_DEBUG_END
02074 #endif
02075         return (dimstyle);
02076 }
02077 
02078 
02089 int
02090 dxf_dimstyle_get_flag
02091 (
02092         DxfDimStyle *dimstyle
02095 )
02096 {
02097 #if DEBUG
02098         DXF_DEBUG_BEGIN
02099 #endif
02100         /* Do some basic checks. */
02101         if (dimstyle == NULL)
02102         {
02103                 fprintf (stderr,
02104                   (_("Error in %s () a NULL pointer was passed.\n")),
02105                   __FUNCTION__);
02106                 return (EXIT_FAILURE);
02107         }
02108 #if DEBUG
02109         DXF_DEBUG_END
02110 #endif
02111         return (dimstyle->flag);
02112 }
02113 
02114 
02119 DxfDimStyle *
02120 dxf_dimstyle_set_flag
02121 (
02122         DxfDimStyle *dimstyle,
02125         int flag
02131 )
02132 {
02133 #if DEBUG
02134         DXF_DEBUG_BEGIN
02135 #endif
02136         /* Do some basic checks. */
02137         if (dimstyle == NULL)
02138         {
02139                 fprintf (stderr,
02140                   (_("Error in %s () a NULL pointer was passed.\n")),
02141                   __FUNCTION__);
02142                 return (NULL);
02143         }
02144         dimstyle->flag = flag;
02145 #if DEBUG
02146         DXF_DEBUG_END
02147 #endif
02148         return (dimstyle);
02149 }
02150 
02151 
02158 int
02159 dxf_dimstyle_get_dimtol
02160 (
02161         DxfDimStyle *dimstyle
02164 )
02165 {
02166 #if DEBUG
02167         DXF_DEBUG_BEGIN
02168 #endif
02169         /* Do some basic checks. */
02170         if (dimstyle == NULL)
02171         {
02172                 fprintf (stderr,
02173                   (_("Error in %s () a NULL pointer was passed.\n")),
02174                   __FUNCTION__);
02175                 return (EXIT_FAILURE);
02176         }
02177 #if DEBUG
02178         DXF_DEBUG_END
02179 #endif
02180         return (dimstyle->dimtol);
02181 }
02182 
02183 
02188 DxfDimStyle *
02189 dxf_dimstyle_set_dimtol
02190 (
02191         DxfDimStyle *dimstyle,
02194         int dimtol
02197 )
02198 {
02199 #if DEBUG
02200         DXF_DEBUG_BEGIN
02201 #endif
02202         /* Do some basic checks. */
02203         if (dimstyle == NULL)
02204         {
02205                 fprintf (stderr,
02206                   (_("Error in %s () a NULL pointer was passed.\n")),
02207                   __FUNCTION__);
02208                 return (NULL);
02209         }
02210         dimstyle->dimtol = dimtol;
02211 #if DEBUG
02212         DXF_DEBUG_END
02213 #endif
02214         return (dimstyle);
02215 }
02216 
02217 
02224 int
02225 dxf_dimstyle_get_dimlim
02226 (
02227         DxfDimStyle *dimstyle
02230 )
02231 {
02232 #if DEBUG
02233         DXF_DEBUG_BEGIN
02234 #endif
02235         /* Do some basic checks. */
02236         if (dimstyle == NULL)
02237         {
02238                 fprintf (stderr,
02239                   (_("Error in %s () a NULL pointer was passed.\n")),
02240                   __FUNCTION__);
02241                 return (EXIT_FAILURE);
02242         }
02243 #if DEBUG
02244         DXF_DEBUG_END
02245 #endif
02246         return (dimstyle->dimlim);
02247 }
02248 
02249 
02254 DxfDimStyle *
02255 dxf_dimstyle_set_dimlim
02256 (
02257         DxfDimStyle *dimstyle,
02260         int dimlim
02263 )
02264 {
02265 #if DEBUG
02266         DXF_DEBUG_BEGIN
02267 #endif
02268         /* Do some basic checks. */
02269         if (dimstyle == NULL)
02270         {
02271                 fprintf (stderr,
02272                   (_("Error in %s () a NULL pointer was passed.\n")),
02273                   __FUNCTION__);
02274                 return (NULL);
02275         }
02276         dimstyle->dimlim = dimlim;
02277 #if DEBUG
02278         DXF_DEBUG_END
02279 #endif
02280         return (dimstyle);
02281 }
02282 
02283 
02290 int
02291 dxf_dimstyle_get_dimtih
02292 (
02293         DxfDimStyle *dimstyle
02296 )
02297 {
02298 #if DEBUG
02299         DXF_DEBUG_BEGIN
02300 #endif
02301         /* Do some basic checks. */
02302         if (dimstyle == NULL)
02303         {
02304                 fprintf (stderr,
02305                   (_("Error in %s () a NULL pointer was passed.\n")),
02306                   __FUNCTION__);
02307                 return (EXIT_FAILURE);
02308         }
02309 #if DEBUG
02310         DXF_DEBUG_END
02311 #endif
02312         return (dimstyle->dimtih);
02313 }
02314 
02315 
02320 DxfDimStyle *
02321 dxf_dimstyle_set_dimtih
02322 (
02323         DxfDimStyle *dimstyle,
02326         int dimtih
02329 )
02330 {
02331 #if DEBUG
02332         DXF_DEBUG_BEGIN
02333 #endif
02334         /* Do some basic checks. */
02335         if (dimstyle == NULL)
02336         {
02337                 fprintf (stderr,
02338                   (_("Error in %s () a NULL pointer was passed.\n")),
02339                   __FUNCTION__);
02340                 return (NULL);
02341         }
02342         dimstyle->dimtih = dimtih;
02343 #if DEBUG
02344         DXF_DEBUG_END
02345 #endif
02346         return (dimstyle);
02347 }
02348 
02349 
02356 int
02357 dxf_dimstyle_get_dimtoh
02358 (
02359         DxfDimStyle *dimstyle
02362 )
02363 {
02364 #if DEBUG
02365         DXF_DEBUG_BEGIN
02366 #endif
02367         /* Do some basic checks. */
02368         if (dimstyle == NULL)
02369         {
02370                 fprintf (stderr,
02371                   (_("Error in %s () a NULL pointer was passed.\n")),
02372                   __FUNCTION__);
02373                 return (EXIT_FAILURE);
02374         }
02375 #if DEBUG
02376         DXF_DEBUG_END
02377 #endif
02378         return (dimstyle->dimtoh);
02379 }
02380 
02381 
02386 DxfDimStyle *
02387 dxf_dimstyle_set_dimtoh
02388 (
02389         DxfDimStyle *dimstyle,
02392         int dimtoh
02395 )
02396 {
02397 #if DEBUG
02398         DXF_DEBUG_BEGIN
02399 #endif
02400         /* Do some basic checks. */
02401         if (dimstyle == NULL)
02402         {
02403                 fprintf (stderr,
02404                   (_("Error in %s () a NULL pointer was passed.\n")),
02405                   __FUNCTION__);
02406                 return (NULL);
02407         }
02408         dimstyle->dimtoh = dimtoh;
02409 #if DEBUG
02410         DXF_DEBUG_END
02411 #endif
02412         return (dimstyle);
02413 }
02414 
02415 
02422 int
02423 dxf_dimstyle_get_dimse1
02424 (
02425         DxfDimStyle *dimstyle
02428 )
02429 {
02430 #if DEBUG
02431         DXF_DEBUG_BEGIN
02432 #endif
02433         /* Do some basic checks. */
02434         if (dimstyle == NULL)
02435         {
02436                 fprintf (stderr,
02437                   (_("Error in %s () a NULL pointer was passed.\n")),
02438                   __FUNCTION__);
02439                 return (EXIT_FAILURE);
02440         }
02441 #if DEBUG
02442         DXF_DEBUG_END
02443 #endif
02444         return (dimstyle->dimse1);
02445 }
02446 
02447 
02452 DxfDimStyle *
02453 dxf_dimstyle_set_dimse1
02454 (
02455         DxfDimStyle *dimstyle,
02458         int dimse1
02461 )
02462 {
02463 #if DEBUG
02464         DXF_DEBUG_BEGIN
02465 #endif
02466         /* Do some basic checks. */
02467         if (dimstyle == NULL)
02468         {
02469                 fprintf (stderr,
02470                   (_("Error in %s () a NULL pointer was passed.\n")),
02471                   __FUNCTION__);
02472                 return (NULL);
02473         }
02474         dimstyle->dimse1 = dimse1;
02475 #if DEBUG
02476         DXF_DEBUG_END
02477 #endif
02478         return (dimstyle);
02479 }
02480 
02481 
02488 int
02489 dxf_dimstyle_get_dimse2
02490 (
02491         DxfDimStyle *dimstyle
02494 )
02495 {
02496 #if DEBUG
02497         DXF_DEBUG_BEGIN
02498 #endif
02499         /* Do some basic checks. */
02500         if (dimstyle == NULL)
02501         {
02502                 fprintf (stderr,
02503                   (_("Error in %s () a NULL pointer was passed.\n")),
02504                   __FUNCTION__);
02505                 return (EXIT_FAILURE);
02506         }
02507 #if DEBUG
02508         DXF_DEBUG_END
02509 #endif
02510         return (dimstyle->dimse2);
02511 }
02512 
02513 
02518 DxfDimStyle *
02519 dxf_dimstyle_set_dimse2
02520 (
02521         DxfDimStyle *dimstyle,
02524         int dimse2
02527 )
02528 {
02529 #if DEBUG
02530         DXF_DEBUG_BEGIN
02531 #endif
02532         /* Do some basic checks. */
02533         if (dimstyle == NULL)
02534         {
02535                 fprintf (stderr,
02536                   (_("Error in %s () a NULL pointer was passed.\n")),
02537                   __FUNCTION__);
02538                 return (NULL);
02539         }
02540         dimstyle->dimse2 = dimse2;
02541 #if DEBUG
02542         DXF_DEBUG_END
02543 #endif
02544         return (dimstyle);
02545 }
02546 
02547 
02554 int
02555 dxf_dimstyle_get_dimtad
02556 (
02557         DxfDimStyle *dimstyle
02560 )
02561 {
02562 #if DEBUG
02563         DXF_DEBUG_BEGIN
02564 #endif
02565         /* Do some basic checks. */
02566         if (dimstyle == NULL)
02567         {
02568                 fprintf (stderr,
02569                   (_("Error in %s () a NULL pointer was passed.\n")),
02570                   __FUNCTION__);
02571                 return (EXIT_FAILURE);
02572         }
02573 #if DEBUG
02574         DXF_DEBUG_END
02575 #endif
02576         return (dimstyle->dimtad);
02577 }
02578 
02579 
02584 DxfDimStyle *
02585 dxf_dimstyle_set_dimtad
02586 (
02587         DxfDimStyle *dimstyle,
02590         int dimtad
02593 )
02594 {
02595 #if DEBUG
02596         DXF_DEBUG_BEGIN
02597 #endif
02598         /* Do some basic checks. */
02599         if (dimstyle == NULL)
02600         {
02601                 fprintf (stderr,
02602                   (_("Error in %s () a NULL pointer was passed.\n")),
02603                   __FUNCTION__);
02604                 return (NULL);
02605         }
02606         dimstyle->dimtad = dimtad;
02607 #if DEBUG
02608         DXF_DEBUG_END
02609 #endif
02610         return (dimstyle);
02611 }
02612 
02613 
02621 int
02622 dxf_dimstyle_get_dimzin
02623 (
02624         DxfDimStyle *dimstyle
02627 )
02628 {
02629 #if DEBUG
02630         DXF_DEBUG_BEGIN
02631 #endif
02632         /* Do some basic checks. */
02633         if (dimstyle == NULL)
02634         {
02635                 fprintf (stderr,
02636                   (_("Error in %s () a NULL pointer was passed.\n")),
02637                   __FUNCTION__);
02638                 return (EXIT_FAILURE);
02639         }
02640 #if DEBUG
02641         DXF_DEBUG_END
02642 #endif
02643         return (dimstyle->dimzin);
02644 }
02645 
02646 
02651 DxfDimStyle *
02652 dxf_dimstyle_set_dimzin
02653 (
02654         DxfDimStyle *dimstyle,
02657         int dimzin
02660 )
02661 {
02662 #if DEBUG
02663         DXF_DEBUG_BEGIN
02664 #endif
02665         /* Do some basic checks. */
02666         if (dimstyle == NULL)
02667         {
02668                 fprintf (stderr,
02669                   (_("Error in %s () a NULL pointer was passed.\n")),
02670                   __FUNCTION__);
02671                 return (NULL);
02672         }
02673         dimstyle->dimzin = dimzin;
02674 #if DEBUG
02675         DXF_DEBUG_END
02676 #endif
02677         return (dimstyle);
02678 }
02679 
02680 
02687 int
02688 dxf_dimstyle_get_id_code
02689 (
02690         DxfDimStyle *dimstyle
02692 )
02693 {
02694 #if DEBUG
02695         DXF_DEBUG_BEGIN
02696 #endif
02697         /* Do some basic checks. */
02698         if (dimstyle == NULL)
02699         {
02700                 fprintf (stderr,
02701                   (_("Error in %s () a NULL pointer was passed.\n")),
02702                   __FUNCTION__);
02703                 return (EXIT_FAILURE);
02704         }
02705 #if DEBUG
02706         DXF_DEBUG_END
02707 #endif
02708         return (dimstyle->id_code);
02709 }
02710 
02711 
02716 DxfDimStyle *
02717 dxf_dimstyle_set_id_code
02718 (
02719         DxfDimStyle *dimstyle,
02722         int id_code
02726 )
02727 {
02728 #if DEBUG
02729         DXF_DEBUG_BEGIN
02730 #endif
02731         /* Do some basic checks. */
02732         if (dimstyle == NULL)
02733         {
02734                 fprintf (stderr,
02735                   (_("Error in %s () a NULL pointer was passed.\n")),
02736                   __FUNCTION__);
02737                 return (NULL);
02738         }
02739         dimstyle->id_code = id_code;
02740 #if DEBUG
02741         DXF_DEBUG_END
02742 #endif
02743         return (dimstyle);
02744 }
02745 
02746 
02753 double
02754 dxf_dimstyle_get_dimtxt
02755 (
02756         DxfDimStyle *dimstyle
02759 )
02760 {
02761 #if DEBUG
02762         DXF_DEBUG_BEGIN
02763 #endif
02764         /* Do some basic checks. */
02765         if (dimstyle == NULL)
02766         {
02767                 fprintf (stderr,
02768                   (_("Error in %s () a NULL pointer was passed.\n")),
02769                   __FUNCTION__);
02770                 return (EXIT_FAILURE);
02771         }
02772 #if DEBUG
02773         DXF_DEBUG_END
02774 #endif
02775         return (dimstyle->dimtxt);
02776 }
02777 
02778 
02783 DxfDimStyle *
02784 dxf_dimstyle_set_dimtxt
02785 (
02786         DxfDimStyle *dimstyle,
02789         double dimtxt
02792 )
02793 {
02794 #if DEBUG
02795         DXF_DEBUG_BEGIN
02796 #endif
02797         /* Do some basic checks. */
02798         if (dimstyle == NULL)
02799         {
02800                 fprintf (stderr,
02801                   (_("Error in %s () a NULL pointer was passed.\n")),
02802                   __FUNCTION__);
02803                 return (NULL);
02804         }
02805         dimstyle->dimtxt = dimtxt;
02806 #if DEBUG
02807         DXF_DEBUG_END
02808 #endif
02809         return (dimstyle);
02810 }
02811 
02812 
02819 double
02820 dxf_dimstyle_get_dimcen
02821 (
02822         DxfDimStyle *dimstyle
02825 )
02826 {
02827 #if DEBUG
02828         DXF_DEBUG_BEGIN
02829 #endif
02830         /* Do some basic checks. */
02831         if (dimstyle == NULL)
02832         {
02833                 fprintf (stderr,
02834                   (_("Error in %s () a NULL pointer was passed.\n")),
02835                   __FUNCTION__);
02836                 return (EXIT_FAILURE);
02837         }
02838 #if DEBUG
02839         DXF_DEBUG_END
02840 #endif
02841         return (dimstyle->dimcen);
02842 }
02843 
02844 
02849 DxfDimStyle *
02850 dxf_dimstyle_set_dimcen
02851 (
02852         DxfDimStyle *dimstyle,
02855         double dimcen
02858 )
02859 {
02860 #if DEBUG
02861         DXF_DEBUG_BEGIN
02862 #endif
02863         /* Do some basic checks. */
02864         if (dimstyle == NULL)
02865         {
02866                 fprintf (stderr,
02867                   (_("Error in %s () a NULL pointer was passed.\n")),
02868                   __FUNCTION__);
02869                 return (NULL);
02870         }
02871         dimstyle->dimcen = dimcen;
02872 #if DEBUG
02873         DXF_DEBUG_END
02874 #endif
02875         return (dimstyle);
02876 }
02877 
02878 
02885 double
02886 dxf_dimstyle_get_dimtsz
02887 (
02888         DxfDimStyle *dimstyle
02891 )
02892 {
02893 #if DEBUG
02894         DXF_DEBUG_BEGIN
02895 #endif
02896         /* Do some basic checks. */
02897         if (dimstyle == NULL)
02898         {
02899                 fprintf (stderr,
02900                   (_("Error in %s () a NULL pointer was passed.\n")),
02901                   __FUNCTION__);
02902                 return (EXIT_FAILURE);
02903         }
02904 #if DEBUG
02905         DXF_DEBUG_END
02906 #endif
02907         return (dimstyle->dimtsz);
02908 }
02909 
02910 
02915 DxfDimStyle *
02916 dxf_dimstyle_set_dimtsz
02917 (
02918         DxfDimStyle *dimstyle,
02921         double dimtsz
02924 )
02925 {
02926 #if DEBUG
02927         DXF_DEBUG_BEGIN
02928 #endif
02929         /* Do some basic checks. */
02930         if (dimstyle == NULL)
02931         {
02932                 fprintf (stderr,
02933                   (_("Error in %s () a NULL pointer was passed.\n")),
02934                   __FUNCTION__);
02935                 return (NULL);
02936         }
02937         dimstyle->dimtsz = dimtsz;
02938 #if DEBUG
02939         DXF_DEBUG_END
02940 #endif
02941         return (dimstyle);
02942 }
02943 
02944 
02951 double
02952 dxf_dimstyle_get_dimaltf
02953 (
02954         DxfDimStyle *dimstyle
02957 )
02958 {
02959 #if DEBUG
02960         DXF_DEBUG_BEGIN
02961 #endif
02962         /* Do some basic checks. */
02963         if (dimstyle == NULL)
02964         {
02965                 fprintf (stderr,
02966                   (_("Error in %s () a NULL pointer was passed.\n")),
02967                   __FUNCTION__);
02968                 return (EXIT_FAILURE);
02969         }
02970 #if DEBUG
02971         DXF_DEBUG_END
02972 #endif
02973         return (dimstyle->dimaltf);
02974 }
02975 
02976 
02981 DxfDimStyle *
02982 dxf_dimstyle_set_dimaltf
02983 (
02984         DxfDimStyle *dimstyle,
02987         double dimaltf
02990 )
02991 {
02992 #if DEBUG
02993         DXF_DEBUG_BEGIN
02994 #endif
02995         /* Do some basic checks. */
02996         if (dimstyle == NULL)
02997         {
02998                 fprintf (stderr,
02999                   (_("Error in %s () a NULL pointer was passed.\n")),
03000                   __FUNCTION__);
03001                 return (NULL);
03002         }
03003         dimstyle->dimaltf = dimaltf;
03004 #if DEBUG
03005         DXF_DEBUG_END
03006 #endif
03007         return (dimstyle);
03008 }
03009 
03010 
03017 double
03018 dxf_dimstyle_get_dimlfac
03019 (
03020         DxfDimStyle *dimstyle
03023 )
03024 {
03025 #if DEBUG
03026         DXF_DEBUG_BEGIN
03027 #endif
03028         /* Do some basic checks. */
03029         if (dimstyle == NULL)
03030         {
03031                 fprintf (stderr,
03032                   (_("Error in %s () a NULL pointer was passed.\n")),
03033                   __FUNCTION__);
03034                 return (EXIT_FAILURE);
03035         }
03036 #if DEBUG
03037         DXF_DEBUG_END
03038 #endif
03039         return (dimstyle->dimlfac);
03040 }
03041 
03042 
03047 DxfDimStyle *
03048 dxf_dimstyle_set_dimlfac
03049 (
03050         DxfDimStyle *dimstyle,
03053         double dimlfac
03056 )
03057 {
03058 #if DEBUG
03059         DXF_DEBUG_BEGIN
03060 #endif
03061         /* Do some basic checks. */
03062         if (dimstyle == NULL)
03063         {
03064                 fprintf (stderr,
03065                   (_("Error in %s () a NULL pointer was passed.\n")),
03066                   __FUNCTION__);
03067                 return (NULL);
03068         }
03069         dimstyle->dimlfac = dimlfac;
03070 #if DEBUG
03071         DXF_DEBUG_END
03072 #endif
03073         return (dimstyle);
03074 }
03075 
03076 
03083 double
03084 dxf_dimstyle_get_dimtvp
03085 (
03086         DxfDimStyle *dimstyle
03089 )
03090 {
03091 #if DEBUG
03092         DXF_DEBUG_BEGIN
03093 #endif
03094         /* Do some basic checks. */
03095         if (dimstyle == NULL)
03096         {
03097                 fprintf (stderr,
03098                   (_("Error in %s () a NULL pointer was passed.\n")),
03099                   __FUNCTION__);
03100                 return (EXIT_FAILURE);
03101         }
03102 #if DEBUG
03103         DXF_DEBUG_END
03104 #endif
03105         return (dimstyle->dimtvp);
03106 }
03107 
03108 
03113 DxfDimStyle *
03114 dxf_dimstyle_set_dimtvp
03115 (
03116         DxfDimStyle *dimstyle,
03119         double dimtvp
03122 )
03123 {
03124 #if DEBUG
03125         DXF_DEBUG_BEGIN
03126 #endif
03127         /* Do some basic checks. */
03128         if (dimstyle == NULL)
03129         {
03130                 fprintf (stderr,
03131                   (_("Error in %s () a NULL pointer was passed.\n")),
03132                   __FUNCTION__);
03133                 return (NULL);
03134         }
03135         dimstyle->dimtvp = dimtvp;
03136 #if DEBUG
03137         DXF_DEBUG_END
03138 #endif
03139         return (dimstyle);
03140 }
03141 
03142 
03149 double
03150 dxf_dimstyle_get_dimtfac
03151 (
03152         DxfDimStyle *dimstyle
03155 )
03156 {
03157 #if DEBUG
03158         DXF_DEBUG_BEGIN
03159 #endif
03160         /* Do some basic checks. */
03161         if (dimstyle == NULL)
03162         {
03163                 fprintf (stderr,
03164                   (_("Error in %s () a NULL pointer was passed.\n")),
03165                   __FUNCTION__);
03166                 return (EXIT_FAILURE);
03167         }
03168 #if DEBUG
03169         DXF_DEBUG_END
03170 #endif
03171         return (dimstyle->dimtfac);
03172 }
03173 
03174 
03179 DxfDimStyle *
03180 dxf_dimstyle_set_dimtfac
03181 (
03182         DxfDimStyle *dimstyle,
03185         double dimtfac
03188 )
03189 {
03190 #if DEBUG
03191         DXF_DEBUG_BEGIN
03192 #endif
03193         /* Do some basic checks. */
03194         if (dimstyle == NULL)
03195         {
03196                 fprintf (stderr,
03197                   (_("Error in %s () a NULL pointer was passed.\n")),
03198                   __FUNCTION__);
03199                 return (NULL);
03200         }
03201         dimstyle->dimtfac = dimtfac;
03202 #if DEBUG
03203         DXF_DEBUG_END
03204 #endif
03205         return (dimstyle);
03206 }
03207 
03208 
03215 double
03216 dxf_dimstyle_get_dimgap
03217 (
03218         DxfDimStyle *dimstyle
03221 )
03222 {
03223 #if DEBUG
03224         DXF_DEBUG_BEGIN
03225 #endif
03226         /* Do some basic checks. */
03227         if (dimstyle == NULL)
03228         {
03229                 fprintf (stderr,
03230                   (_("Error in %s () a NULL pointer was passed.\n")),
03231                   __FUNCTION__);
03232                 return (EXIT_FAILURE);
03233         }
03234 #if DEBUG
03235         DXF_DEBUG_END
03236 #endif
03237         return (dimstyle->dimgap);
03238 }
03239 
03240 
03245 DxfDimStyle *
03246 dxf_dimstyle_set_dimgap
03247 (
03248         DxfDimStyle *dimstyle,
03251         double dimgap
03254 )
03255 {
03256 #if DEBUG
03257         DXF_DEBUG_BEGIN
03258 #endif
03259         /* Do some basic checks. */
03260         if (dimstyle == NULL)
03261         {
03262                 fprintf (stderr,
03263                   (_("Error in %s () a NULL pointer was passed.\n")),
03264                   __FUNCTION__);
03265                 return (NULL);
03266         }
03267         dimstyle->dimgap = dimgap;
03268 #if DEBUG
03269         DXF_DEBUG_END
03270 #endif
03271         return (dimstyle);
03272 }
03273 
03274 
03281 int
03282 dxf_dimstyle_get_dimalt
03283 (
03284         DxfDimStyle *dimstyle
03287 )
03288 {
03289 #if DEBUG
03290         DXF_DEBUG_BEGIN
03291 #endif
03292         /* Do some basic checks. */
03293         if (dimstyle == NULL)
03294         {
03295                 fprintf (stderr,
03296                   (_("Error in %s () a NULL pointer was passed.\n")),
03297                   __FUNCTION__);
03298                 return (EXIT_FAILURE);
03299         }
03300 #if DEBUG
03301         DXF_DEBUG_END
03302 #endif
03303         return (dimstyle->dimalt);
03304 }
03305 
03306 
03311 DxfDimStyle *
03312 dxf_dimstyle_set_dimalt
03313 (
03314         DxfDimStyle *dimstyle,
03317         int dimalt
03320 )
03321 {
03322 #if DEBUG
03323         DXF_DEBUG_BEGIN
03324 #endif
03325         /* Do some basic checks. */
03326         if (dimstyle == NULL)
03327         {
03328                 fprintf (stderr,
03329                   (_("Error in %s () a NULL pointer was passed.\n")),
03330                   __FUNCTION__);
03331                 return (NULL);
03332         }
03333         dimstyle->dimalt = dimalt;
03334 #if DEBUG
03335         DXF_DEBUG_END
03336 #endif
03337         return (dimstyle);
03338 }
03339 
03340 
03347 int
03348 dxf_dimstyle_get_dimaltd
03349 (
03350         DxfDimStyle *dimstyle
03353 )
03354 {
03355 #if DEBUG
03356         DXF_DEBUG_BEGIN
03357 #endif
03358         /* Do some basic checks. */
03359         if (dimstyle == NULL)
03360         {
03361                 fprintf (stderr,
03362                   (_("Error in %s () a NULL pointer was passed.\n")),
03363                   __FUNCTION__);
03364                 return (EXIT_FAILURE);
03365         }
03366 #if DEBUG
03367         DXF_DEBUG_END
03368 #endif
03369         return (dimstyle->dimaltd);
03370 }
03371 
03372 
03377 DxfDimStyle *
03378 dxf_dimstyle_set_dimaltd
03379 (
03380         DxfDimStyle *dimstyle,
03383         int dimaltd
03386 )
03387 {
03388 #if DEBUG
03389         DXF_DEBUG_BEGIN
03390 #endif
03391         /* Do some basic checks. */
03392         if (dimstyle == NULL)
03393         {
03394                 fprintf (stderr,
03395                   (_("Error in %s () a NULL pointer was passed.\n")),
03396                   __FUNCTION__);
03397                 return (NULL);
03398         }
03399         dimstyle->dimaltd = dimaltd;
03400 #if DEBUG
03401         DXF_DEBUG_END
03402 #endif
03403         return (dimstyle);
03404 }
03405 
03406 
03414 int
03415 dxf_dimstyle_get_dimtofl
03416 (
03417         DxfDimStyle *dimstyle
03420 )
03421 {
03422 #if DEBUG
03423         DXF_DEBUG_BEGIN
03424 #endif
03425         /* Do some basic checks. */
03426         if (dimstyle == NULL)
03427         {
03428                 fprintf (stderr,
03429                   (_("Error in %s () a NULL pointer was passed.\n")),
03430                   __FUNCTION__);
03431                 return (EXIT_FAILURE);
03432         }
03433 #if DEBUG
03434         DXF_DEBUG_END
03435 #endif
03436         return (dimstyle->dimtofl);
03437 }
03438 
03439 
03444 DxfDimStyle *
03445 dxf_dimstyle_set_dimtofl
03446 (
03447         DxfDimStyle *dimstyle,
03450         int dimtofl
03453 )
03454 {
03455 #if DEBUG
03456         DXF_DEBUG_BEGIN
03457 #endif
03458         /* Do some basic checks. */
03459         if (dimstyle == NULL)
03460         {
03461                 fprintf (stderr,
03462                   (_("Error in %s () a NULL pointer was passed.\n")),
03463                   __FUNCTION__);
03464                 return (NULL);
03465         }
03466         dimstyle->dimtofl = dimtofl;
03467 #if DEBUG
03468         DXF_DEBUG_END
03469 #endif
03470         return (dimstyle);
03471 }
03472 
03473 
03480 int
03481 dxf_dimstyle_get_dimsah
03482 (
03483         DxfDimStyle *dimstyle
03486 )
03487 {
03488 #if DEBUG
03489         DXF_DEBUG_BEGIN
03490 #endif
03491         /* Do some basic checks. */
03492         if (dimstyle == NULL)
03493         {
03494                 fprintf (stderr,
03495                   (_("Error in %s () a NULL pointer was passed.\n")),
03496                   __FUNCTION__);
03497                 return (EXIT_FAILURE);
03498         }
03499 #if DEBUG
03500         DXF_DEBUG_END
03501 #endif
03502         return (dimstyle->dimsah);
03503 }
03504 
03505 
03510 DxfDimStyle *
03511 dxf_dimstyle_set_dimsah
03512 (
03513         DxfDimStyle *dimstyle,
03516         int dimsah
03519 )
03520 {
03521 #if DEBUG
03522         DXF_DEBUG_BEGIN
03523 #endif
03524         /* Do some basic checks. */
03525         if (dimstyle == NULL)
03526         {
03527                 fprintf (stderr,
03528                   (_("Error in %s () a NULL pointer was passed.\n")),
03529                   __FUNCTION__);
03530                 return (NULL);
03531         }
03532         dimstyle->dimsah = dimsah;
03533 #if DEBUG
03534         DXF_DEBUG_END
03535 #endif
03536         return (dimstyle);
03537 }
03538 
03539 
03546 int
03547 dxf_dimstyle_get_dimtix
03548 (
03549         DxfDimStyle *dimstyle
03552 )
03553 {
03554 #if DEBUG
03555         DXF_DEBUG_BEGIN
03556 #endif
03557         /* Do some basic checks. */
03558         if (dimstyle == NULL)
03559         {
03560                 fprintf (stderr,
03561                   (_("Error in %s () a NULL pointer was passed.\n")),
03562                   __FUNCTION__);
03563                 return (EXIT_FAILURE);
03564         }
03565 #if DEBUG
03566         DXF_DEBUG_END
03567 #endif
03568         return (dimstyle->dimtix);
03569 }
03570 
03571 
03576 DxfDimStyle *
03577 dxf_dimstyle_set_dimtix
03578 (
03579         DxfDimStyle *dimstyle,
03582         int dimtix
03585 )
03586 {
03587 #if DEBUG
03588         DXF_DEBUG_BEGIN
03589 #endif
03590         /* Do some basic checks. */
03591         if (dimstyle == NULL)
03592         {
03593                 fprintf (stderr,
03594                   (_("Error in %s () a NULL pointer was passed.\n")),
03595                   __FUNCTION__);
03596                 return (NULL);
03597         }
03598         dimstyle->dimtix = dimtix;
03599 #if DEBUG
03600         DXF_DEBUG_END
03601 #endif
03602         return (dimstyle);
03603 }
03604 
03605 
03613 int
03614 dxf_dimstyle_get_dimsoxd
03615 (
03616         DxfDimStyle *dimstyle
03619 )
03620 {
03621 #if DEBUG
03622         DXF_DEBUG_BEGIN
03623 #endif
03624         /* Do some basic checks. */
03625         if (dimstyle == NULL)
03626         {
03627                 fprintf (stderr,
03628                   (_("Error in %s () a NULL pointer was passed.\n")),
03629                   __FUNCTION__);
03630                 return (EXIT_FAILURE);
03631         }
03632 #if DEBUG
03633         DXF_DEBUG_END
03634 #endif
03635         return (dimstyle->dimsoxd);
03636 }
03637 
03638 
03643 DxfDimStyle *
03644 dxf_dimstyle_set_dimsoxd
03645 (
03646         DxfDimStyle *dimstyle,
03649         int dimsoxd
03652 )
03653 {
03654 #if DEBUG
03655         DXF_DEBUG_BEGIN
03656 #endif
03657         /* Do some basic checks. */
03658         if (dimstyle == NULL)
03659         {
03660                 fprintf (stderr,
03661                   (_("Error in %s () a NULL pointer was passed.\n")),
03662                   __FUNCTION__);
03663                 return (NULL);
03664         }
03665         dimstyle->dimsoxd = dimsoxd;
03666 #if DEBUG
03667         DXF_DEBUG_END
03668 #endif
03669         return (dimstyle);
03670 }
03671 
03672 
03679 int
03680 dxf_dimstyle_get_dimclrd
03681 (
03682         DxfDimStyle *dimstyle
03685 )
03686 {
03687 #if DEBUG
03688         DXF_DEBUG_BEGIN
03689 #endif
03690         /* Do some basic checks. */
03691         if (dimstyle == NULL)
03692         {
03693                 fprintf (stderr,
03694                   (_("Error in %s () a NULL pointer was passed.\n")),
03695                   __FUNCTION__);
03696                 return (EXIT_FAILURE);
03697         }
03698 #if DEBUG
03699         DXF_DEBUG_END
03700 #endif
03701         return (dimstyle->dimclrd);
03702 }
03703 
03704 
03709 DxfDimStyle *
03710 dxf_dimstyle_set_dimclrd
03711 (
03712         DxfDimStyle *dimstyle,
03715         int dimclrd
03718 )
03719 {
03720 #if DEBUG
03721         DXF_DEBUG_BEGIN
03722 #endif
03723         /* Do some basic checks. */
03724         if (dimstyle == NULL)
03725         {
03726                 fprintf (stderr,
03727                   (_("Error in %s () a NULL pointer was passed.\n")),
03728                   __FUNCTION__);
03729                 return (NULL);
03730         }
03731         dimstyle->dimclrd = dimclrd;
03732 #if DEBUG
03733         DXF_DEBUG_END
03734 #endif
03735         return (dimstyle);
03736 }
03737 
03738 
03745 int
03746 dxf_dimstyle_get_dimclre
03747 (
03748         DxfDimStyle *dimstyle
03751 )
03752 {
03753 #if DEBUG
03754         DXF_DEBUG_BEGIN
03755 #endif
03756         /* Do some basic checks. */
03757         if (dimstyle == NULL)
03758         {
03759                 fprintf (stderr,
03760                   (_("Error in %s () a NULL pointer was passed.\n")),
03761                   __FUNCTION__);
03762                 return (EXIT_FAILURE);
03763         }
03764 #if DEBUG
03765         DXF_DEBUG_END
03766 #endif
03767         return (dimstyle->dimclre);
03768 }
03769 
03770 
03775 DxfDimStyle *
03776 dxf_dimstyle_set_dimclre
03777 (
03778         DxfDimStyle *dimstyle,
03781         int dimclre
03784 )
03785 {
03786 #if DEBUG
03787         DXF_DEBUG_BEGIN
03788 #endif
03789         /* Do some basic checks. */
03790         if (dimstyle == NULL)
03791         {
03792                 fprintf (stderr,
03793                   (_("Error in %s () a NULL pointer was passed.\n")),
03794                   __FUNCTION__);
03795                 return (NULL);
03796         }
03797         dimstyle->dimclre = dimclre;
03798 #if DEBUG
03799         DXF_DEBUG_END
03800 #endif
03801         return (dimstyle);
03802 }
03803 
03804 
03811 int
03812 dxf_dimstyle_get_dimclrt
03813 (
03814         DxfDimStyle *dimstyle
03817 )
03818 {
03819 #if DEBUG
03820         DXF_DEBUG_BEGIN
03821 #endif
03822         /* Do some basic checks. */
03823         if (dimstyle == NULL)
03824         {
03825                 fprintf (stderr,
03826                   (_("Error in %s () a NULL pointer was passed.\n")),
03827                   __FUNCTION__);
03828                 return (EXIT_FAILURE);
03829         }
03830 #if DEBUG
03831         DXF_DEBUG_END
03832 #endif
03833         return (dimstyle->dimclrt);
03834 }
03835 
03836 
03841 DxfDimStyle *
03842 dxf_dimstyle_set_dimclrt
03843 (
03844         DxfDimStyle *dimstyle,
03847         int dimclrt
03850 )
03851 {
03852 #if DEBUG
03853         DXF_DEBUG_BEGIN
03854 #endif
03855         /* Do some basic checks. */
03856         if (dimstyle == NULL)
03857         {
03858                 fprintf (stderr,
03859                   (_("Error in %s () a NULL pointer was passed.\n")),
03860                   __FUNCTION__);
03861                 return (NULL);
03862         }
03863         dimstyle->dimclrt = dimclrt;
03864 #if DEBUG
03865         DXF_DEBUG_END
03866 #endif
03867         return (dimstyle);
03868 }
03869 
03870 
03877 int
03878 dxf_dimstyle_get_dimunit
03879 (
03880         DxfDimStyle *dimstyle
03883 )
03884 {
03885 #if DEBUG
03886         DXF_DEBUG_BEGIN
03887 #endif
03888         /* Do some basic checks. */
03889         if (dimstyle == NULL)
03890         {
03891                 fprintf (stderr,
03892                   (_("Error in %s () a NULL pointer was passed.\n")),
03893                   __FUNCTION__);
03894                 return (EXIT_FAILURE);
03895         }
03896         if (dimstyle->dimunit < 0)
03897         {
03898                 fprintf (stderr,
03899                   (_("Warning in %s () a negative value was found in the dimunit member.\n")),
03900                   __FUNCTION__);
03901         }
03902         if (dimstyle->dimunit > 4)
03903         {
03904                 fprintf (stderr,
03905                   (_("Warning in %s () an out of range value was found in the dimunit member.\n")),
03906                   __FUNCTION__);
03907         }
03908 #if DEBUG
03909         DXF_DEBUG_END
03910 #endif
03911         return (dimstyle->dimunit);
03912 }
03913 
03914 
03919 DxfDimStyle *
03920 dxf_dimstyle_set_dimunit
03921 (
03922         DxfDimStyle *dimstyle,
03925         int dimunit
03928 )
03929 {
03930 #if DEBUG
03931         DXF_DEBUG_BEGIN
03932 #endif
03933         /* Do some basic checks. */
03934         if (dimstyle == NULL)
03935         {
03936                 fprintf (stderr,
03937                   (_("Error in %s () a NULL pointer was passed.\n")),
03938                   __FUNCTION__);
03939                 return (NULL);
03940         }
03941         if (dimunit < 0)
03942         {
03943                 fprintf (stderr,
03944                   (_("Warning in %s () a negative value was passed in the dimunit member.\n")),
03945                   __FUNCTION__);
03946         }
03947         if (dimunit > 4)
03948         {
03949                 fprintf (stderr,
03950                   (_("Warning in %s () an out of range value was passed in the dimunit member.\n")),
03951                   __FUNCTION__);
03952         }
03953         dimstyle->dimunit = dimunit;
03954 #if DEBUG
03955         DXF_DEBUG_END
03956 #endif
03957         return (dimstyle);
03958 }
03959 
03960 
03969 int
03970 dxf_dimstyle_get_dimdec
03971 (
03972         DxfDimStyle *dimstyle
03975 )
03976 {
03977 #if DEBUG
03978         DXF_DEBUG_BEGIN
03979 #endif
03980         /* Do some basic checks. */
03981         if (dimstyle == NULL)
03982         {
03983                 fprintf (stderr,
03984                   (_("Error in %s () a NULL pointer was passed.\n")),
03985                   __FUNCTION__);
03986                 return (EXIT_FAILURE);
03987         }
03988 #if DEBUG
03989         DXF_DEBUG_END
03990 #endif
03991         return (dimstyle->dimdec);
03992 }
03993 
03994 
04000 DxfDimStyle *
04001 dxf_dimstyle_set_dimdec
04002 (
04003         DxfDimStyle *dimstyle,
04006         int dimdec
04010 )
04011 {
04012 #if DEBUG
04013         DXF_DEBUG_BEGIN
04014 #endif
04015         /* Do some basic checks. */
04016         if (dimstyle == NULL)
04017         {
04018                 fprintf (stderr,
04019                   (_("Error in %s () a NULL pointer was passed.\n")),
04020                   __FUNCTION__);
04021                 return (NULL);
04022         }
04023         dimstyle->dimdec = dimdec;
04024 #if DEBUG
04025         DXF_DEBUG_END
04026 #endif
04027         return (dimstyle);
04028 }
04029 
04030 
04039 int
04040 dxf_dimstyle_get_dimtdec
04041 (
04042         DxfDimStyle *dimstyle
04045 )
04046 {
04047 #if DEBUG
04048         DXF_DEBUG_BEGIN
04049 #endif
04050         /* Do some basic checks. */
04051         if (dimstyle == NULL)
04052         {
04053                 fprintf (stderr,
04054                   (_("Error in %s () a NULL pointer was passed.\n")),
04055                   __FUNCTION__);
04056                 return (EXIT_FAILURE);
04057         }
04058 #if DEBUG
04059         DXF_DEBUG_END
04060 #endif
04061         return (dimstyle->dimtdec);
04062 }
04063 
04064 
04070 DxfDimStyle *
04071 dxf_dimstyle_set_dimtdec
04072 (
04073         DxfDimStyle *dimstyle,
04076         int dimtdec
04080 )
04081 {
04082 #if DEBUG
04083         DXF_DEBUG_BEGIN
04084 #endif
04085         /* Do some basic checks. */
04086         if (dimstyle == NULL)
04087         {
04088                 fprintf (stderr,
04089                   (_("Error in %s () a NULL pointer was passed.\n")),
04090                   __FUNCTION__);
04091                 return (NULL);
04092         }
04093         dimstyle->dimtdec = dimtdec;
04094 #if DEBUG
04095         DXF_DEBUG_END
04096 #endif
04097         return (dimstyle);
04098 }
04099 
04100 
04107 int
04108 dxf_dimstyle_get_dimaltu
04109 (
04110         DxfDimStyle *dimstyle
04113 )
04114 {
04115 #if DEBUG
04116         DXF_DEBUG_BEGIN
04117 #endif
04118         /* Do some basic checks. */
04119         if (dimstyle == NULL)
04120         {
04121                 fprintf (stderr,
04122                   (_("Error in %s () a NULL pointer was passed.\n")),
04123                   __FUNCTION__);
04124                 return (EXIT_FAILURE);
04125         }
04126 #if DEBUG
04127         DXF_DEBUG_END
04128 #endif
04129         return (dimstyle->dimaltu);
04130 }
04131 
04132 
04137 DxfDimStyle *
04138 dxf_dimstyle_set_dimaltu
04139 (
04140         DxfDimStyle *dimstyle,
04143         int dimaltu
04146 )
04147 {
04148 #if DEBUG
04149         DXF_DEBUG_BEGIN
04150 #endif
04151         /* Do some basic checks. */
04152         if (dimstyle == NULL)
04153         {
04154                 fprintf (stderr,
04155                   (_("Error in %s () a NULL pointer was passed.\n")),
04156                   __FUNCTION__);
04157                 return (NULL);
04158         }
04159         dimstyle->dimaltu = dimaltu;
04160 #if DEBUG
04161         DXF_DEBUG_END
04162 #endif
04163         return (dimstyle);
04164 }
04165 
04166 
04175 int
04176 dxf_dimstyle_get_dimalttd
04177 (
04178         DxfDimStyle *dimstyle
04181 )
04182 {
04183 #if DEBUG
04184         DXF_DEBUG_BEGIN
04185 #endif
04186         /* Do some basic checks. */
04187         if (dimstyle == NULL)
04188         {
04189                 fprintf (stderr,
04190                   (_("Error in %s () a NULL pointer was passed.\n")),
04191                   __FUNCTION__);
04192                 return (EXIT_FAILURE);
04193         }
04194 #if DEBUG
04195         DXF_DEBUG_END
04196 #endif
04197         return (dimstyle->dimalttd);
04198 }
04199 
04200 
04206 DxfDimStyle *
04207 dxf_dimstyle_set_dimalttd
04208 (
04209         DxfDimStyle *dimstyle,
04212         int dimalttd
04216 )
04217 {
04218 #if DEBUG
04219         DXF_DEBUG_BEGIN
04220 #endif
04221         /* Do some basic checks. */
04222         if (dimstyle == NULL)
04223         {
04224                 fprintf (stderr,
04225                   (_("Error in %s () a NULL pointer was passed.\n")),
04226                   __FUNCTION__);
04227                 return (NULL);
04228         }
04229         dimstyle->dimalttd = dimalttd;
04230 #if DEBUG
04231         DXF_DEBUG_END
04232 #endif
04233         return (dimstyle);
04234 }
04235 
04236 
04244 int
04245 dxf_dimstyle_get_dimaunit
04246 (
04247         DxfDimStyle *dimstyle
04250 )
04251 {
04252 #if DEBUG
04253         DXF_DEBUG_BEGIN
04254 #endif
04255         /* Do some basic checks. */
04256         if (dimstyle == NULL)
04257         {
04258                 fprintf (stderr,
04259                   (_("Error in %s () a NULL pointer was passed.\n")),
04260                   __FUNCTION__);
04261                 return (EXIT_FAILURE);
04262         }
04263         if (dimstyle->dimaunit < 0)
04264         {
04265                 fprintf (stderr,
04266                   (_("Warning in %s () a negative value was found in the dimaunit member.\n")),
04267                   __FUNCTION__);
04268         }
04269         if (dimstyle->dimaunit > 4)
04270         {
04271                 fprintf (stderr,
04272                   (_("Warning in %s () an out of range value was found in the dimaunit member.\n")),
04273                   __FUNCTION__);
04274         }
04275 #if DEBUG
04276         DXF_DEBUG_END
04277 #endif
04278         return (dimstyle->dimaunit);
04279 }
04280 
04281 
04286 DxfDimStyle *
04287 dxf_dimstyle_set_dimaunit
04288 (
04289         DxfDimStyle *dimstyle,
04292         int dimaunit
04295 )
04296 {
04297 #if DEBUG
04298         DXF_DEBUG_BEGIN
04299 #endif
04300         /* Do some basic checks. */
04301         if (dimstyle == NULL)
04302         {
04303                 fprintf (stderr,
04304                   (_("Error in %s () a NULL pointer was passed.\n")),
04305                   __FUNCTION__);
04306                 return (NULL);
04307         }
04308         if (dimaunit < 0)
04309         {
04310                 fprintf (stderr,
04311                   (_("Warning in %s () a negative value was passed in the dimaunit variable.\n")),
04312                   __FUNCTION__);
04313         }
04314         if (dimaunit > 4)
04315         {
04316                 fprintf (stderr,
04317                   (_("Warning in %s () an out of range value was passed in the dimaunit variable.\n")),
04318                   __FUNCTION__);
04319         }
04320         dimstyle->dimaunit = dimaunit;
04321 #if DEBUG
04322         DXF_DEBUG_END
04323 #endif
04324         return (dimstyle);
04325 }
04326 
04327 
04334 int
04335 dxf_dimstyle_get_dimjust
04336 (
04337         DxfDimStyle *dimstyle
04340 )
04341 {
04342 #if DEBUG
04343         DXF_DEBUG_BEGIN
04344 #endif
04345         /* Do some basic checks. */
04346         if (dimstyle == NULL)
04347         {
04348                 fprintf (stderr,
04349                   (_("Error in %s () a NULL pointer was passed.\n")),
04350                   __FUNCTION__);
04351                 return (EXIT_FAILURE);
04352         }
04353         if (dimstyle->dimjust < 0)
04354         {
04355                 fprintf (stderr,
04356                   (_("Warning in %s () a negative value was found in the dimjust member.\n")),
04357                   __FUNCTION__);
04358         }
04359         if (dimstyle->dimjust > 4)
04360         {
04361                 fprintf (stderr,
04362                   (_("Warning in %s () an out of range value was found in the dimjust member.\n")),
04363                   __FUNCTION__);
04364         }
04365 #if DEBUG
04366         DXF_DEBUG_END
04367 #endif
04368         return (dimstyle->dimjust);
04369 }
04370 
04371 
04376 DxfDimStyle *
04377 dxf_dimstyle_set_dimjust
04378 (
04379         DxfDimStyle *dimstyle,
04382         int dimjust
04385 )
04386 {
04387 #if DEBUG
04388         DXF_DEBUG_BEGIN
04389 #endif
04390         /* Do some basic checks. */
04391         if (dimstyle == NULL)
04392         {
04393                 fprintf (stderr,
04394                   (_("Error in %s () a NULL pointer was passed.\n")),
04395                   __FUNCTION__);
04396                 return (NULL);
04397         }
04398         if (dimjust < 0)
04399         {
04400                 fprintf (stderr,
04401                   (_("Warning in %s () a negative value was passed in the dimjust variable.\n")),
04402                   __FUNCTION__);
04403         }
04404         if (dimjust > 4)
04405         {
04406                 fprintf (stderr,
04407                   (_("Warning in %s () an out of range value was passed in the dimjust variable.\n")),
04408                   __FUNCTION__);
04409         }
04410         dimstyle->dimjust = dimjust;
04411 #if DEBUG
04412         DXF_DEBUG_END
04413 #endif
04414         return (dimstyle);
04415 }
04416 
04417 
04424 int
04425 dxf_dimstyle_get_dimsd1
04426 (
04427         DxfDimStyle *dimstyle
04430 )
04431 {
04432 #if DEBUG
04433         DXF_DEBUG_BEGIN
04434 #endif
04435         /* Do some basic checks. */
04436         if (dimstyle == NULL)
04437         {
04438                 fprintf (stderr,
04439                   (_("Error in %s () a NULL pointer was passed.\n")),
04440                   __FUNCTION__);
04441                 return (EXIT_FAILURE);
04442         }
04443         if (dimstyle->dimsd1 < 0)
04444         {
04445                 fprintf (stderr,
04446                   (_("Warning in %s () a negative value was found in the dimsd1 member.\n")),
04447                   __FUNCTION__);
04448         }
04449         if (dimstyle->dimsd1 > 1)
04450         {
04451                 fprintf (stderr,
04452                   (_("Warning in %s () an out of range value was found in the dimsd1 member.\n")),
04453                   __FUNCTION__);
04454         }
04455 #if DEBUG
04456         DXF_DEBUG_END
04457 #endif
04458         return (dimstyle->dimsd1);
04459 }
04460 
04461 
04466 DxfDimStyle *
04467 dxf_dimstyle_set_dimsd1
04468 (
04469         DxfDimStyle *dimstyle,
04472         int dimsd1
04475 )
04476 {
04477 #if DEBUG
04478         DXF_DEBUG_BEGIN
04479 #endif
04480         /* Do some basic checks. */
04481         if (dimstyle == NULL)
04482         {
04483                 fprintf (stderr,
04484                   (_("Error in %s () a NULL pointer was passed.\n")),
04485                   __FUNCTION__);
04486                 return (NULL);
04487         }
04488         if (dimsd1 < 0)
04489         {
04490                 fprintf (stderr,
04491                   (_("Warning in %s () a negative value was passed in the dimsd1 variable.\n")),
04492                   __FUNCTION__);
04493         }
04494         if (dimsd1 > 1)
04495         {
04496                 fprintf (stderr,
04497                   (_("Warning in %s () an out of range value was passed in the dimsd1 variable.\n")),
04498                   __FUNCTION__);
04499         }
04500         dimstyle->dimsd1 = dimsd1;
04501 #if DEBUG
04502         DXF_DEBUG_END
04503 #endif
04504         return (dimstyle);
04505 }
04506 
04507 
04515 int
04516 dxf_dimstyle_get_dimsd2
04517 (
04518         DxfDimStyle *dimstyle
04521 )
04522 {
04523 #if DEBUG
04524         DXF_DEBUG_BEGIN
04525 #endif
04526         /* Do some basic checks. */
04527         if (dimstyle == NULL)
04528         {
04529                 fprintf (stderr,
04530                   (_("Error in %s () a NULL pointer was passed.\n")),
04531                   __FUNCTION__);
04532                 return (EXIT_FAILURE);
04533         }
04534         if (dimstyle->dimsd2 < 0)
04535         {
04536                 fprintf (stderr,
04537                   (_("Warning in %s () a negative value was found in the dimsd2 member.\n")),
04538                   __FUNCTION__);
04539         }
04540         if (dimstyle->dimsd2 > 1)
04541         {
04542                 fprintf (stderr,
04543                   (_("Warning in %s () an out of range value was found in the dimsd2 member.\n")),
04544                   __FUNCTION__);
04545         }
04546 #if DEBUG
04547         DXF_DEBUG_END
04548 #endif
04549         return (dimstyle->dimsd2);
04550 }
04551 
04552 
04557 DxfDimStyle *
04558 dxf_dimstyle_set_dimsd2
04559 (
04560         DxfDimStyle *dimstyle,
04563         int dimsd2
04566 )
04567 {
04568 #if DEBUG
04569         DXF_DEBUG_BEGIN
04570 #endif
04571         /* Do some basic checks. */
04572         if (dimstyle == NULL)
04573         {
04574                 fprintf (stderr,
04575                   (_("Error in %s () a NULL pointer was passed.\n")),
04576                   __FUNCTION__);
04577                 return (NULL);
04578         }
04579         if (dimsd2 < 0)
04580         {
04581                 fprintf (stderr,
04582                   (_("Warning in %s () a negative value was passed in the dimsd2 variable.\n")),
04583                   __FUNCTION__);
04584         }
04585         if (dimsd2 > 1)
04586         {
04587                 fprintf (stderr,
04588                   (_("Warning in %s () an out of range value was passed in the dimsd2 variable.\n")),
04589                   __FUNCTION__);
04590         }
04591         dimstyle->dimsd2 = dimsd2;
04592 #if DEBUG
04593         DXF_DEBUG_END
04594 #endif
04595         return (dimstyle);
04596 }
04597 
04598 
04605 int
04606 dxf_dimstyle_get_dimtolj
04607 (
04608         DxfDimStyle *dimstyle
04611 )
04612 {
04613 #if DEBUG
04614         DXF_DEBUG_BEGIN
04615 #endif
04616         /* Do some basic checks. */
04617         if (dimstyle == NULL)
04618         {
04619                 fprintf (stderr,
04620                   (_("Error in %s () a NULL pointer was passed.\n")),
04621                   __FUNCTION__);
04622                 return (EXIT_FAILURE);
04623         }
04624         if (dimstyle->dimtolj < 0)
04625         {
04626                 fprintf (stderr,
04627                   (_("Warning in %s () a negative value was found in the dimtolj member.\n")),
04628                   __FUNCTION__);
04629         }
04630         if (dimstyle->dimtolj > 2)
04631         {
04632                 fprintf (stderr,
04633                   (_("Warning in %s () an out of range value was found in the dimtolj member.\n")),
04634                   __FUNCTION__);
04635         }
04636 #if DEBUG
04637         DXF_DEBUG_END
04638 #endif
04639         return (dimstyle->dimtolj);
04640 }
04641 
04642 
04647 DxfDimStyle *
04648 dxf_dimstyle_set_dimtolj
04649 (
04650         DxfDimStyle *dimstyle,
04653         int dimtolj
04656 )
04657 {
04658 #if DEBUG
04659         DXF_DEBUG_BEGIN
04660 #endif
04661         /* Do some basic checks. */
04662         if (dimstyle == NULL)
04663         {
04664                 fprintf (stderr,
04665                   (_("Error in %s () a NULL pointer was passed.\n")),
04666                   __FUNCTION__);
04667                 return (NULL);
04668         }
04669         if (dimtolj < 0)
04670         {
04671                 fprintf (stderr,
04672                   (_("Warning in %s () a negative value was passed in the dimtolj variable.\n")),
04673                   __FUNCTION__);
04674         }
04675         if (dimtolj > 2)
04676         {
04677                 fprintf (stderr,
04678                   (_("Warning in %s () an out of range value was passed in the dimtolj variable.\n")),
04679                   __FUNCTION__);
04680         }
04681         dimstyle->dimtolj = dimtolj;
04682 #if DEBUG
04683         DXF_DEBUG_END
04684 #endif
04685         return (dimstyle);
04686 }
04687 
04688 
04695 int
04696 dxf_dimstyle_get_dimtzin
04697 (
04698         DxfDimStyle *dimstyle
04701 )
04702 {
04703 #if DEBUG
04704         DXF_DEBUG_BEGIN
04705 #endif
04706         /* Do some basic checks. */
04707         if (dimstyle == NULL)
04708         {
04709                 fprintf (stderr,
04710                   (_("Error in %s () a NULL pointer was passed.\n")),
04711                   __FUNCTION__);
04712                 return (EXIT_FAILURE);
04713         }
04714         if (dimstyle->dimtzin < 0)
04715         {
04716                 fprintf (stderr,
04717                   (_("Warning in %s () a negative value was found in the dimtzin member.\n")),
04718                   __FUNCTION__);
04719         }
04720         if (dimstyle->dimtzin > 1)
04721         {
04722                 fprintf (stderr,
04723                   (_("Warning in %s () an out of range value was found in the dimtzin member.\n")),
04724                   __FUNCTION__);
04725         }
04726 #if DEBUG
04727         DXF_DEBUG_END
04728 #endif
04729         return (dimstyle->dimtzin);
04730 }
04731 
04732 
04737 DxfDimStyle *
04738 dxf_dimstyle_set_dimtzin
04739 (
04740         DxfDimStyle *dimstyle,
04743         int dimtzin
04746 )
04747 {
04748 #if DEBUG
04749         DXF_DEBUG_BEGIN
04750 #endif
04751         /* Do some basic checks. */
04752         if (dimstyle == NULL)
04753         {
04754                 fprintf (stderr,
04755                   (_("Error in %s () a NULL pointer was passed.\n")),
04756                   __FUNCTION__);
04757                 return (NULL);
04758         }
04759         if (dimtzin < 0)
04760         {
04761                 fprintf (stderr,
04762                   (_("Warning in %s () a negative value was passed in the dimtzin variable.\n")),
04763                   __FUNCTION__);
04764         }
04765         if (dimtzin > 1)
04766         {
04767                 fprintf (stderr,
04768                   (_("Warning in %s () an out of range value was passed in the dimtzin variable.\n")),
04769                   __FUNCTION__);
04770         }
04771         dimstyle->dimtzin = dimtzin;
04772 #if DEBUG
04773         DXF_DEBUG_END
04774 #endif
04775         return (dimstyle);
04776 }
04777 
04778 
04787 int
04788 dxf_dimstyle_get_dimaltz
04789 (
04790         DxfDimStyle *dimstyle
04793 )
04794 {
04795 #if DEBUG
04796         DXF_DEBUG_BEGIN
04797 #endif
04798         /* Do some basic checks. */
04799         if (dimstyle == NULL)
04800         {
04801                 fprintf (stderr,
04802                   (_("Error in %s () a NULL pointer was passed.\n")),
04803                   __FUNCTION__);
04804                 return (EXIT_FAILURE);
04805         }
04806         if (dimstyle->dimaltz < 0)
04807         {
04808                 fprintf (stderr,
04809                   (_("Warning in %s () a negative value was found in the dimaltz member.\n")),
04810                   __FUNCTION__);
04811         }
04812         if (dimstyle->dimaltz > 1)
04813         {
04814                 fprintf (stderr,
04815                   (_("Warning in %s () an out of range value was found in the dimaltz member.\n")),
04816                   __FUNCTION__);
04817         }
04818 #if DEBUG
04819         DXF_DEBUG_END
04820 #endif
04821         return (dimstyle->dimaltz);
04822 }
04823 
04824 
04830 DxfDimStyle *
04831 dxf_dimstyle_set_dimaltz
04832 (
04833         DxfDimStyle *dimstyle,
04836         int dimaltz
04840 )
04841 {
04842 #if DEBUG
04843         DXF_DEBUG_BEGIN
04844 #endif
04845         /* Do some basic checks. */
04846         if (dimstyle == NULL)
04847         {
04848                 fprintf (stderr,
04849                   (_("Error in %s () a NULL pointer was passed.\n")),
04850                   __FUNCTION__);
04851                 return (NULL);
04852         }
04853         if (dimaltz < 0)
04854         {
04855                 fprintf (stderr,
04856                   (_("Warning in %s () a negative value was passed in the dimaltz variable.\n")),
04857                   __FUNCTION__);
04858         }
04859         if (dimaltz > 1)
04860         {
04861                 fprintf (stderr,
04862                   (_("Warning in %s () an out of range value was passed in the dimaltz variable.\n")),
04863                   __FUNCTION__);
04864         }
04865         dimstyle->dimaltz = dimaltz;
04866 #if DEBUG
04867         DXF_DEBUG_END
04868 #endif
04869         return (dimstyle);
04870 }
04871 
04872 
04881 int
04882 dxf_dimstyle_get_dimalttz
04883 (
04884         DxfDimStyle *dimstyle
04887 )
04888 {
04889 #if DEBUG
04890         DXF_DEBUG_BEGIN
04891 #endif
04892         /* Do some basic checks. */
04893         if (dimstyle == NULL)
04894         {
04895                 fprintf (stderr,
04896                   (_("Error in %s () a NULL pointer was passed.\n")),
04897                   __FUNCTION__);
04898                 return (EXIT_FAILURE);
04899         }
04900         if (dimstyle->dimalttz < 0)
04901         {
04902                 fprintf (stderr,
04903                   (_("Warning in %s () a negative value was found in the dimalttz member.\n")),
04904                   __FUNCTION__);
04905         }
04906         if (dimstyle->dimalttz > 1)
04907         {
04908                 fprintf (stderr,
04909                   (_("Warning in %s () an out of range value was found in the dimalttz member.\n")),
04910                   __FUNCTION__);
04911         }
04912 #if DEBUG
04913         DXF_DEBUG_END
04914 #endif
04915         return (dimstyle->dimalttz);
04916 }
04917 
04918 
04924 DxfDimStyle *
04925 dxf_dimstyle_set_dimalttz
04926 (
04927         DxfDimStyle *dimstyle,
04930         int dimalttz
04933 )
04934 {
04935 #if DEBUG
04936         DXF_DEBUG_BEGIN
04937 #endif
04938         /* Do some basic checks. */
04939         if (dimstyle == NULL)
04940         {
04941                 fprintf (stderr,
04942                   (_("Error in %s () a NULL pointer was passed.\n")),
04943                   __FUNCTION__);
04944                 return (NULL);
04945         }
04946         if (dimalttz < 0)
04947         {
04948                 fprintf (stderr,
04949                   (_("Warning in %s () a negative value was passed in the dimalttz variable.\n")),
04950                   __FUNCTION__);
04951         }
04952         if (dimalttz > 1)
04953         {
04954                 fprintf (stderr,
04955                   (_("Warning in %s () an out of range value was passed in the dimalttz variable.\n")),
04956                   __FUNCTION__);
04957         }
04958         dimstyle->dimalttz = dimalttz;
04959 #if DEBUG
04960         DXF_DEBUG_END
04961 #endif
04962         return (dimstyle);
04963 }
04964 
04965 
04972 int
04973 dxf_dimstyle_get_dimfit
04974 (
04975         DxfDimStyle *dimstyle
04978 )
04979 {
04980 #if DEBUG
04981         DXF_DEBUG_BEGIN
04982 #endif
04983         /* Do some basic checks. */
04984         if (dimstyle == NULL)
04985         {
04986                 fprintf (stderr,
04987                   (_("Error in %s () a NULL pointer was passed.\n")),
04988                   __FUNCTION__);
04989                 return (EXIT_FAILURE);
04990         }
04991         if (dimstyle->dimfit < 0)
04992         {
04993                 fprintf (stderr,
04994                   (_("Warning in %s () a negative value was found in the dimfit member.\n")),
04995                   __FUNCTION__);
04996         }
04997         if (dimstyle->dimfit > 3)
04998         {
04999                 fprintf (stderr,
05000                   (_("Warning in %s () an out of range value was found in the dimfit member.\n")),
05001                   __FUNCTION__);
05002         }
05003 #if DEBUG
05004         DXF_DEBUG_END
05005 #endif
05006         return (dimstyle->dimfit);
05007 }
05008 
05009 
05014 DxfDimStyle *
05015 dxf_dimstyle_set_dimfit
05016 (
05017         DxfDimStyle *dimstyle,
05020         int dimfit
05023 )
05024 {
05025 #if DEBUG
05026         DXF_DEBUG_BEGIN
05027 #endif
05028         /* Do some basic checks. */
05029         if (dimstyle == NULL)
05030         {
05031                 fprintf (stderr,
05032                   (_("Error in %s () a NULL pointer was passed.\n")),
05033                   __FUNCTION__);
05034                 return (NULL);
05035         }
05036         if (dimfit < 0)
05037         {
05038                 fprintf (stderr,
05039                   (_("Warning in %s () a negative value was passed in the dimfit variable.\n")),
05040                   __FUNCTION__);
05041         }
05042         if (dimfit > 3)
05043         {
05044                 fprintf (stderr,
05045                   (_("Warning in %s () an out of range value was passed in the dimfit variable.\n")),
05046                   __FUNCTION__);
05047         }
05048         dimstyle->dimfit = dimfit;
05049 #if DEBUG
05050         DXF_DEBUG_END
05051 #endif
05052         return (dimstyle);
05053 }
05054 
05055 
05063 int
05064 dxf_dimstyle_get_dimupt
05065 (
05066         DxfDimStyle *dimstyle
05069 )
05070 {
05071 #if DEBUG
05072         DXF_DEBUG_BEGIN
05073 #endif
05074         /* Do some basic checks. */
05075         if (dimstyle == NULL)
05076         {
05077                 fprintf (stderr,
05078                   (_("Error in %s () a NULL pointer was passed.\n")),
05079                   __FUNCTION__);
05080                 return (EXIT_FAILURE);
05081         }
05082         if (dimstyle->dimupt < 0)
05083         {
05084                 fprintf (stderr,
05085                   (_("Warning in %s () a negative value was found in the dimupt member.\n")),
05086                   __FUNCTION__);
05087         }
05088         if (dimstyle->dimupt > 1)
05089         {
05090                 fprintf (stderr,
05091                   (_("Warning in %s () an out of range value was found in the dimupt member.\n")),
05092                   __FUNCTION__);
05093         }
05094 #if DEBUG
05095         DXF_DEBUG_END
05096 #endif
05097         return (dimstyle->dimupt);
05098 }
05099 
05100 
05105 DxfDimStyle *
05106 dxf_dimstyle_set_dimupt
05107 (
05108         DxfDimStyle *dimstyle,
05111         int dimupt
05114 )
05115 {
05116 #if DEBUG
05117         DXF_DEBUG_BEGIN
05118 #endif
05119         /* Do some basic checks. */
05120         if (dimstyle == NULL)
05121         {
05122                 fprintf (stderr,
05123                   (_("Error in %s () a NULL pointer was passed.\n")),
05124                   __FUNCTION__);
05125                 return (NULL);
05126         }
05127         if (dimupt < 0)
05128         {
05129                 fprintf (stderr,
05130                   (_("Warning in %s () a negative value was passed in the dimupt variable.\n")),
05131                   __FUNCTION__);
05132         }
05133         if (dimupt > 1)
05134         {
05135                 fprintf (stderr,
05136                   (_("Warning in %s () an out of range value was passed in the dimupt variable.\n")),
05137                   __FUNCTION__);
05138         }
05139         dimstyle->dimupt = dimupt;
05140 #if DEBUG
05141         DXF_DEBUG_END
05142 #endif
05143         return (dimstyle);
05144 }
05145 
05146 
05153 char *
05154 dxf_dimstyle_get_dimtxsty
05155 (
05156         DxfDimStyle *dimstyle
05159 )
05160 {
05161 #if DEBUG
05162         DXF_DEBUG_BEGIN
05163 #endif
05164         /* Do some basic checks. */
05165         if (dimstyle == NULL)
05166         {
05167                 fprintf (stderr,
05168                   (_("Error in %s () a NULL pointer was passed.\n")),
05169                   __FUNCTION__);
05170                 return (NULL);
05171         }
05172 #if DEBUG
05173         DXF_DEBUG_END
05174 #endif
05175         return (strdup (dimstyle->dimtxsty));
05176 }
05177 
05178 
05183 DxfDimStyle *
05184 dxf_dimstyle_set_dimtxsty
05185 (
05186         DxfDimStyle *dimstyle,
05189         char *dimtxsty
05192 )
05193 {
05194 #if DEBUG
05195         DXF_DEBUG_BEGIN
05196 #endif
05197         /* Do some basic checks. */
05198         if (dimstyle == NULL)
05199         {
05200                 fprintf (stderr,
05201                   (_("Error in %s () a NULL pointer was passed.\n")),
05202                   __FUNCTION__);
05203                 return (NULL);
05204         }
05205         if (dimtxsty == NULL)
05206         {
05207                 fprintf (stderr,
05208                   (_("Error in %s () a NULL pointer was passed.\n")),
05209                   __FUNCTION__);
05210                 return (NULL);
05211         }
05212         dimstyle->dimtxsty = strdup (dimtxsty);
05213 #if DEBUG
05214         DXF_DEBUG_END
05215 #endif
05216         return (dimstyle);
05217 }
05218 
05219 
05228 DxfDimStyle *
05229 dxf_dimstyle_get_next
05230 (
05231         DxfDimStyle *dimstyle
05234 )
05235 {
05236 #if DEBUG
05237         DXF_DEBUG_BEGIN
05238 #endif
05239         /* Do some basic checks. */
05240         if (dimstyle == NULL)
05241         {
05242                 fprintf (stderr,
05243                   (_("Error in %s () a NULL pointer was passed.\n")),
05244                   __FUNCTION__);
05245                 return (NULL);
05246         }
05247         if (dimstyle->next == NULL)
05248         {
05249                 fprintf (stderr,
05250                   (_("Error in %s () a NULL pointer was found in the next member.\n")),
05251                   __FUNCTION__);
05252                 return (NULL);
05253         }
05254 #if DEBUG
05255         DXF_DEBUG_END
05256 #endif
05257         return ((DxfDimStyle *) dimstyle->next);
05258 }
05259 
05260 
05265 DxfDimStyle *
05266 dxf_dimstyle_set_next
05267 (
05268         DxfDimStyle *dimstyle,
05271         DxfDimStyle *next
05274 )
05275 {
05276 #if DEBUG
05277         DXF_DEBUG_BEGIN
05278 #endif
05279         /* Do some basic checks. */
05280         if (dimstyle == NULL)
05281         {
05282                 fprintf (stderr,
05283                   (_("Error in %s () a NULL pointer was passed.\n")),
05284                   __FUNCTION__);
05285                 return (NULL);
05286         }
05287         if (next == NULL)
05288         {
05289                 fprintf (stderr,
05290                   (_("Error in %s () a NULL pointer was passed.\n")),
05291                   __FUNCTION__);
05292                 return (NULL);
05293         }
05294         dimstyle->next = (struct DxfDimStyle *) next;
05295 #if DEBUG
05296         DXF_DEBUG_END
05297 #endif
05298         return (dimstyle);
05299 }
05300 
05301 
05311 DxfDimStyle *
05312 dxf_dimstyle_get_last
05313 (
05314         DxfDimStyle *dimstyle
05317 )
05318 {
05319 #if DEBUG
05320         DXF_DEBUG_BEGIN
05321 #endif
05322         /* Do some basic checks. */
05323         if (dimstyle == NULL)
05324         {
05325                 fprintf (stderr,
05326                   (_("Error in %s () a NULL pointer was passed.\n")),
05327                   __FUNCTION__);
05328                 return (NULL);
05329         }
05330         if (dimstyle->next == NULL)
05331         {
05332                 fprintf (stderr,
05333                   (_("Warning in %s () a NULL pointer was found in the next member.\n")),
05334                   __FUNCTION__);
05335                 return ((DxfDimStyle *) dimstyle);
05336         }
05337         DxfDimStyle *iter = (DxfDimStyle *) dimstyle->next;
05338         while (iter->next != NULL)
05339         {
05340                 iter = (DxfDimStyle *) iter->next;
05341         }
05342 #if DEBUG
05343         DXF_DEBUG_END
05344 #endif
05345         return ((DxfDimStyle *) iter);
05346 }
05347 
05348 
05349 /* EOF */