Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixed Ubuntu 20.04 build issues and changed Travis CI to test builds on it#41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
dura0ok wants to merge1 commit intopostgrespro:masterfromdura0ok:pg16-fixes
Closed
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletionssrc/output.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
#include "types.h"
#include <stdarg.h>

#if !defined(PGSPHERE_VERSION)
#error "PGSPHERE_VERSION macro is not set"
Expand DownExpand Up@@ -384,7 +385,7 @@ spheretrans_out(PG_FUNCTION_ARGS)
{
SEuler *se = (SEuler *) PG_GETARG_POINTER(0);
char *buffer = (char *) palloc(255);
charbuf[100];
char *buf;
charetype[4];
SPointval[3];
unsigned char i,
Expand DownExpand Up@@ -412,21 +413,26 @@ spheretrans_out(PG_FUNCTION_ARGS)
{

case OUTPUT_DEG:
sprintf(&buf[0],
buf = psprintf(
"%.*gd",
sphere_output_precision, RADIANS * val[i].lng);
sphere_output_precision, RADIANS * val[i].lng
);
break;

case OUTPUT_HMS:
case OUTPUT_DMS:
rad_to_dms(val[i].lng, &rdeg, &rmin, &rsec);
sprintf(&buf[0],
buf = psprintf(
"%2ud %2um %.*gs",
rdeg, rmin, sphere_output_precision, rsec);
rdeg, rmin, sphere_output_precision, rsec
);
break;

default:
sprintf(&buf[0], "%.*g", sphere_output_precision, val[i].lng);
buf = psprintf(
"%.*g",
sphere_output_precision, val[i].lng
);
break;
}
strcat(&buf[0], ", ");
Expand DownExpand Up@@ -461,7 +467,7 @@ spheretrans_out(PG_FUNCTION_ARGS)
}
etype[3] = '\0';
strcat(buffer, etype);

pfree(buf);
PG_RETURN_CSTRING(buffer);
}

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp